top of page
2 x 2 ANOVA, within subjects variables
ds = dataset you are currently using.
DV = dependent variable of interest
IV = independent variable of interest
Subject = name of subject number column
XYXY = dummy name for a variable, matrix, or data frame into which you are moving information.
Did you remember to turn your subjects into a factor?????
Command-wise, the explicit difference from between-subjects data is the need to tell R that it needs to account for the fact that the same people are used in each condition.
This information is conveyed through the inclusion of "+Error(subject(IV1*IV2))"
XYXY<-aov(DV ~ IV1 * IV2 + Error(Subject / (IV1*IV2)), data=ds)
bottom of page