Questions tagged [anova]

ANOVA is an acronym for "analysis of variance". It is a widely used statistical technique to analyze the source of variance within a data set.

Overview

Although ANOVA stands for ANalysis Of VAriance, it is about comparing means of data from different groups. It is part of the general linear model which also includes linear regression and ANCOVA. In matrix algebra form, all three are:

Y=XB+e

Where Y is a vector of values for the dependent variable (these must be numeric), X is a matrix of values for the independent variables and e is error.

Tag usage

  • SO questions on ANOVA should be about implementation and programming problems, not about the statistical or theoretical properties of the technique.

  • Consider whether your question might be better suited to CrossValidated, the StackExchange site for statistics, machine learning and data analysis.

In scientific software for statistical computing and graphics, function aov implements ANOVA. Note that function anova does something else. See When should I use aov() and when anova()?

1456 questions
5
votes
1 answer

ezANOVA R check error normally distributed

I am using ezANOVA to implement the analysis of an experimental design having a within subject variable and a between subject variable. I successfully implemented ezANOVA as follows: structure(list(Sub = structure(c(3L, 3L, 3L, 4L, 4L, 4L, 1L, 1L,…
Matilde
  • 353
  • 5
  • 14
5
votes
1 answer

How do I get R to spit out the critical value for F-statistic based on ANOVA?

The one thing missing from an ANOVA analysis in R is that it doesn't automatically display the critical value. Everything else is given. I can tell that my F-value is way higher than it should be, but I want to know the margin at where the cut-off…
Tom
  • 919
  • 3
  • 9
  • 22
5
votes
1 answer

overly patches which represent the significants points over contour map

I am trying to add hatching (like dots, hashes, .. ) over contour map. Such hatching could represent the only the statistically significant contours, or contours with certain criteria. Like the following image on nature article (second and third…
Kernel
  • 591
  • 12
  • 23
5
votes
0 answers

ANOVA error on R

I get this error when I run an ANOVA on R: Warning messages: 1: In model.response(mf, "numeric") : using type = "numeric" with a factor response will be ignored 2: In Ops.factor(y, z$residuals) : ‘-’ not meaningful for factors I don't really…
user3403745
  • 83
  • 1
  • 2
  • 7
5
votes
1 answer

Power analysis for unbalanced one-way ANOVA

I'm trying to calculate a power analysis (using pwr package in R) for an unbalanced one-way ANOVA. I'm unsure how to appropriately weight the means or account for the unbalanced design. I currently have: groups = 4 n = n for each group (here,…
cc26
  • 59
  • 3
5
votes
1 answer

Why do R and statsmodels give slightly different ANOVA results?

Using a small R sample dataset and the ANOVA example from statsmodels, the degrees of freedom for one of the variables are reported differently, & the F-values results are also slightly different. Perhaps they have slightly different default…
cphlewis
  • 15,759
  • 4
  • 46
  • 55
5
votes
2 answers

extracting t value out of pairwise.t.test

I would like to know if I could extract t values out of the pairwise.t.test function since it is only reporting the p values. I used the pairwise.t.test() for multiple comparisons after running a repeated-measures anova which reported a significant…
GuestSB
5
votes
1 answer

Adjust degrees of freedom for sphericity correction in repeated measure Anova from car package

I am running a repeated measures ANOVA using the car package. Which works fine and returns an output similar to this: Univariate Type III Repeated-Measures ANOVA Assuming Sphericity SS num Df Error SS den Df F Pr(>F) …
JereB
  • 137
  • 8
5
votes
0 answers

ANOVA and TukeyHSD/post-hoc in R - groups for TukeyHSD?

I'm very new to R and need some help getting it to do the analysis I want (an analysis that I've been doing in GraphPad Prism but this can't handle large datasets) please. I have a dataframe like this (simplified): Gene Seq RBP Sites.length 1 …
5
votes
0 answers

R: not clear how to bootstrap eta value for repeated measures ANOVA

The goal: calculate 95% confidence intervals for eta values from a repeated measures ANOVA. The design is a two factor design (Factor 1 has 3 levels, Factor 2 has 7 levels) that is fully crossed with 30 subjects. However, I am unsure I am doing the…
5
votes
3 answers

Defining dependent and independent variables dynamically in the ezANOVA function

I want to run an ezANOVA from the ez package on multiple dependent variables in a loop and save the result into several variables. Each dependent variable is within a separate column of the same data frame. all.dependent.variables <- c("dv1",…
crsh
  • 1,699
  • 16
  • 33
5
votes
1 answer

How do I run a two-way ANOVA that uses type III errors and looks at pairwise comparisons?

I have a dataset with which I would like to compare the effect of species and habitat on homerange size - while using type III errors and pairwise comparisons within species and habitat. Here's a subset of the data: species<-…
Luke
  • 4,769
  • 5
  • 28
  • 36
5
votes
1 answer

Facilities in R to verify published ANOVA from cell means, SE, and n

I would like to be able to take something like a two-way table of cell means with standard errors and sample sizes from a journal article and compute an ANOVA table, create interaction plots, and other things that are possible. I can do this…
Jdub
  • 589
  • 5
  • 14
5
votes
2 answers

How to hide anova significance levels on the bottom of the table

Suppose I compared two models of nested random effects using anova(), and the result is below: new.model: new current.model: new Df AIC BIC logLik Chisq Chi Df Pr(>Chisq) new.model 8 299196 299259 -149590 …
Alex
  • 4,030
  • 8
  • 40
  • 62
4
votes
1 answer

R: In anova.lm(g) : ANOVA F-tests on an essentially perfect fit are unreliable

I am pairing up online guides with an old text to learn R (page 182 - http://cran.r-project.org/doc/contrib/Faraway-PRA.pdf). When I use data from a package from R (as in the tutorial examples) there is no problem. However, when I use data from my…
tora0515
  • 2,479
  • 12
  • 33
  • 40