For a two-way repeated measures design, we can specify the model using aov in the following fashion:

aov(dv ~ iv1 + iv2 + Error(subject/(iv1*iv2)), data=dataset)

Take the sample data from personality-project.org (see code below), the error term for this particular model is Error(Subject/(Task*Valence)).

data.ex4=read.table(datafilename,header=T)   #read the data into a table
data.ex4                                      #show the data
aov.ex4=aov(Recall~(Task*Valence)+Error(Subject/(Task*Valence)),data.ex4 )

What if I specify the error term instead as Error(Subject). What kind of design is this?

From what I recall, whether you include a factor - e.g., whether Task and Valence are included - in the error term depends on whether a factor is a "within-subjects" factor. If, say, this particular recall study also included "sex" as a predictor, then we would not include it in the error term because it is a between-subjects factor. But I am not sure what it means when we don't include any of the predictors in the error term. Is it basically an intercept-only model much like the one below specified using lmer?

lmer(Recall~Task*Valence + (1|Subject), data=data.ex4)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.