Skip to main content
Search type Search syntax
Tags [tag]
Exact "words here"
Author user:1234
user:me (yours)
Score score:3 (3+)
score:0 (none)
Answers answers:3 (3+)
answers:0 (none)
isaccepted:yes
hasaccepted:no
inquestion:1234
Views views:250
Code code:"if (foo != bar)"
Sections title:apples
body:"apples oranges"
URL url:"*.example.com"
Saves in:saves
Status closed:yes
duplicate:no
migrated:no
wiki:no
Types is:question
is:answer
Exclude -[tag]
-apples
For more details on advanced search visit our help page
Results tagged with
Search options questions only not deleted user 12492

ANOVA stands for ANalysis Of VAriance, a statistical model and set of procedures for comparing multiple group means. The independent variables in an ANOVA model are categorical, but an ANOVA table can be used to test continuous variables as well.

11 votes
2 answers
43k views

Why does adding more terms into a linear model always increase the r-squared value?

Many statistics textbooks state that adding more terms into a linear model always reduces the sum of squares and in turn increases the r-squared value. This has led to the use of the adjusted r-square …
luciano's user avatar
  • 14.6k
7 votes
2 answers
5k views

Proportion of variance in dependent variable accounted for by predictors in a mixed effects ...

Let say I've ran this linear regression: lm_mtcars <- lm(mpg ~ wt + vs, mtcars) I can use anova() to see the amount of variance in the dependent variable accounted for by the two predictors: anova( … (Intr) wt wt -0.846 vs -0.272 0.006 The variance accounted for by each fixed effect now drops because the random intercept for cyl is now accounting for some of the variance in mpg: anova
luciano's user avatar
  • 14.6k
2 votes
3 answers
708 views

Test for effect of groups in a mixed effects model

I tried this but it threw an error: anova(mtcars_mixed_effects, mtcars_lm) (please disregard the fact that cyl only has three groups, I'm just using one of R's built in datasets to make question reprodicible …
luciano's user avatar
  • 14.6k
2 votes
2 answers
16k views

Calculating sum of squares between groups

I have carried out this ANOVA: summary(aov(drat ~ cyl, mtcars)) Df Sum Sq Mean Sq F value Pr(>F) cyl 1 4.342 4.342 28.81 8.24e-06 *** Residuals 30 4.521 0.151 …
luciano's user avatar
  • 14.6k
5 votes
2 answers
9k views

How to compute $\eta^2$ in ANOVA by hand?

This R code outputs the eta squared from an ANOVA: y <- c(rnorm(30, 3), rnorm(30, 4), rnorm(30, 5)) x <- sort(rep(paste("treatment", 1:3), 30)) xy <- data.frame(x,y) xyaov <- aov(y ~ x, xy) …
luciano's user avatar
  • 14.6k
2 votes
3 answers
3k views

ANOVA sum of squares between groups

I'm trying to get an intuitive understanding of why the sum of squares between groups needs to be multiplied by the number of observations within each group. Using the iris dataset in R as an example, …
luciano's user avatar
  • 14.6k
1 vote
1 answer
11k views

Degrees of freedom ANOVA table for regression

I've calculated the following ANOVA table for a linear regression in R: anova(lm(mpg ~ drat, mtcars)) Analysis of Variance Table Response: mpg Df Sum Sq Mean Sq F value Pr(>F) drat 1 522.48 522.48 …
luciano's user avatar
  • 14.6k
4 votes
2 answers
1k views

Rationale behind using ANOVA to compare means

Instead, an ANOVA is advised. But if 21 t-tests were performed using these data and because there are only 7 groups, some of the same data would be used in each test. …
luciano's user avatar
  • 14.6k
3 votes
2 answers
5k views

calculating ANOVA 'by hand'

I've calculated an ANOVA in R using the aov() function, then calculated it semi-manually using my own code. … create fake data set.seed(50) x = data.frame(length=rnorm(9), site = c(rep('a', 3), rep('b', 3), rep('c', 3)), stringsAsFactors=F) # ANOVA
luciano's user avatar
  • 14.6k
7 votes
2 answers
8k views

Difference between a 2 factor ANOVA and mixed effects model

The first model is a 2 factor ANOVA: summary(aov(angle ~ temperature + recipe, cake)) Df Sum Sq Mean Sq F value Pr(>F) temperature 5 2100 420.1 6.918 4.37e-06 *** recipe … 1.315 Correlation of Fixed Effects: (Intr) recipB recipeB -0.438 recipeC -0.438 0.500 Is someone able to provide a summary of what the mixed effect model has done differently to the ANOVA
luciano's user avatar
  • 14.6k
4 votes
2 answers
944 views

Should a mixed effects model be used?

Should a type of mixed effects model be applied, or would a two-way ANOVA be more appropriate? If a mixed effects model is needed, then what type? …
luciano's user avatar
  • 14.6k
4 votes
1 answer
195 views

ANOVA using day numbers

I am considering carrying out an ANOVA to test to see if the date of the maximum count is different among sites. … Example R code: summary(aov(day.number ~ site, data=df)) Is an ANOVA appropriate here? Is there a better way of looking at differences in day number of maximum count among sites? …
luciano's user avatar
  • 14.6k