Repeated measures

Please note: work in progress!

The basic idea of repeated measures ANOVA is this: first, remove the subject-mean from all scores, and second, for every effect, reduce the data to the mean scores per level of the effect. So if you have a 3 x 2 within-subjects design (i.e., with six columns, for condition-combinations (1,1), (1,2), (1,3), (2,1), (2,2) and (2,3)) and want to test the second main effect, you'd reduce the data to a two-column matrix consisting of the mean over the respective three columns.

Contrast scores are then tested via ANOVA. In the above example, there is only one contrast score per subject, as this encodes the condition A - condition B difference. Hence there is one degree of freedom for the model, DF(Model), i.e., one parameter to be estimated. The contrast score vectors are appended to become one long dependent variable vector, and dummy codes are used as independent variables (for instance, one condition could be coded as -1, and various others, corresponding to different columns in the reduced data matrix, as +1). Each element of these vectors is thus treated, computationally, as if it were an independent observation. For more than two levels, the ANOVA thus violates an assumption: the observations for the different contrast scores per subject are dependent. This is why the various corrections for degrees of freedom may be necessary. Note that with two levels per condition, as will be quite common, or with an interaction between two two-level variables, there is only one contrast vector and hence no violation of the independence assumption (the test then reduces to a paired t-test).

In repeated measures MANOVA, the contrast scores are kept as separate variables and tested via MANOVA, which already takes the dependence into account.

Interactions involving within-subject variables: take the product of (products of, . . ., recursively for higher-level interactions) lower-level factors and correct them for all lower-level factors. Thus, the interactions test (only) whatever the main effects and lower-order interactions cannot explain. Note that there are also different methods of testing interactions.

See here for an implementation.