[R-sig-ME] How do I check whether the assumptions of equal variances and normality are fulfilled for ezANOVA() ?
Seth W. Bigelow
seth at swbigelow.net
Fri Nov 9 17:31:37 CET 2012
Marianne:
I'm not an R or statistics expert, but I've gotten a lot of good advice from
those who are in this listserv, so I will attempt to pay it forward. (And I
don't know anything about EZ anova).
What you've said about your data suggests that a mixed model might be a good
way to analyze it. Group and Session would be fixed effects, and presumably
there is subject, let's say a person, on whom a response measurement is
taken at both sessions. Why start with a non-parametric model if you might
be able to use a parametric one?
There are two packages commonly used for r mixed models: nlme (older) and
lme4 (newer). Syntax for a simple analysis of your model in lme4 would look
like
m0 <- lmer(response~Group+Session+(1|PersonsName)) # this model does not
have an interaction effect
m1 <- lmer(response~Group*Session+(1|PersonsName)) # this model has an
interaction effect.
You can compare these models with a likelihood ratio test, e.g.
Anova(m0,m1)
It should give you a p value that will help to decide whether the
interaction model is justified.
Pinheiro & Bates (mixed effects models in S & S-Plus) is the standard mixed
models reference, it is more oriented toward nlme but is very useful.
I, and others on this listserv no doubt, would be happy to provide advice
re: residuals checking, if you decide to pursue the mixed models route.
Sincerely, Seth W. Bigelow
-----Original Message-----
From: r-sig-mixed-models-bounces at r-project.org
[mailto:r-sig-mixed-models-bounces at r-project.org] On Behalf Of Marianne K.
Sent: Friday, November 09, 2012 8:40 AM
To: r-sig-mixed-models at r-project.org
Subject: [R-sig-ME] How do I check whether the assumptions of equal
variances and normality are fulfilled for ezANOVA() ?
Hello R and statistics experts,
(Sorry for this probably basic question. I know there is a lot written about
this topic, but it is still not clear to me.)
My data has one between-subject factor ("group", 2 levels, n=10 per group)
and one within-subject factor ("session", 2 levels). I would like to use the
ezANOVA function to test for main effects and interactions.
Now, how do I check whether the assumptions of equal variance and normality
are fulfilled (which have to be fulfilled in order to use ezANOVA, right)?
As I understood, Mauchlys test (which would give me an information about
the equality of variances) is only calculated by ezANOVA if I have more than
two within-subject levels.
Do I have to check the normality of the residuals for each of the 4
condition combinations with e.g. the following functions: qqnorm(mpg),
qqline(mpg), shapiro.test(x)? How do I however get the residuals in order to
do this? Then, should I use for example the Fligner-Killeen test for
homogeneity of variances of all 4 condition combinations?
I would be grateful for any advice!
Thanks,Marianne
[[alternative HTML version deleted]]
More information about the R-sig-mixed-models
mailing list