Lecture 8 - Statistical Tests IV: ANOVA, Kruskal-Wallis, ANCOVA Flashcards
the three statistical tests used for comparing two groups against a continuous variable:
students t-test: both groups are parametric with equal variances
welch’s t-test: both groups parametric but with unequal variance
Mann-Whitney U Test / Wilcoxon Test: non-parametric data (no assumptions
what does ANOVA stand for?
ANOVA means “analysis of variance”
what sort of variables are present in ANOVA testing?
response variables are continuous and explanatory variables are categorical
ANOVA and linear regression are identical except for:
the type of explanatory variable
what does ANOVA actually do?
ANOVA compares means of factor levels (treatment levels), by analysing variances associated with them
ANOVA procedure:
(1) choose a model
(2) estimate the parameters of the model
(3) model fit: how well does the model describe out data?
command for creating an ANOVA model in R:
> m1<-aov(y.v~x.v)
m1 = model name (can be anything)
> summary.aov(m1)
summary.lm(m1)
tapply(y.v, x.v, mean)
ANOVA assumptions:
- residuals are normally distributed
- variance is associated with the distribution of the residuals is constant (i.e. variation in Y does not differ among the factor levels)
- individual measurements are independent
- data comes from a random sample
diagnostic ANOVA plot in R:
> plot(m1)
- we want “sky at night” and a normal-q-q line with data stuck to the line
after completing your ANOVA diagnostic plots [plot(m1)] you have results that show non-parametric data, what do you do?
if you dont recieve “sky at night” or residuals following the line tightly you must use the non-parametric equivalent of the ANOVA test - the Kruskal-Wallis test
kruskal-wallis test command:
kruskal.test(y-variable ~ x-variable)
what is the difference between the ANOVA and Kruskal-Wallis Test?
the difference is that ANOVA testing has assumptions but Kruskal-Wallis has no assumptions
similarities in ANOVA and linear regression testing:
- both are parametric tests
- response variable continuous and explanatory variable categorical
- compares means of factor levels (treatment levels) by analysing variances associated with them
- assumptions: residuals are parametric, variance homogeneity; individual measurements are independent; data from random sample
what is ANCOVA?
ancova is a analysis of co-variance
what does ANCOVA combine?
ANCOVA combines elements of linear regression and ANOVA