I'm running repeated-measures ANOVAs using aov
in R, and all variables are within-subjects.
But R is not showing main effects. Several people have looked at my code, and no one knows why. It looks like:
test1 = aov(y ~ (a*b+c) + Error(Subject/a*b+c), mydata))
But when I run summary(test1)
, I only get one P value:
Df Sum Sq Mean Sq F value Pr(>F)
a:b 4 431859 107965 2.637 0.185
For main effects a, b, c
I am only getting Df Sum Sq Mean Sq
.
I also tried switching to "afex"
, and doing this:
test1 <- aov_ez("Subject", "y", mydata, within = c("a", "b", "c"))
But then the summary does not allow me to do a complex interaction, like a*b+c
. Not all variables interact in my model. I need two to interact, but I have to control for the main effect of the other.