# How to analyze repeated measurements in two matched but unequal samples

For a manuscript intended for submission to a medical (or psychological) journal, I have cognitive data from 16 patients and 32 age- and gender-matched healthy controls at four time points (pre-treatment T0, and three post-treatment time points T1, T2, and T3 in patients; in controls at the same intervals), i.e., I have two healthy controls matched with each patient. The cognitive measure, though technically discrete, can for most purposes be thought of as normally distributed.

Example of what the data looks like:

subject gender age  T0  T1  T2  T3
p1      male   12   30  39  44  45
p2      female 15   37  38  40  36
...     ...    ...  ... ... ... ...
ca1     male   12   38  41  52  48
ca2     female 15   43  42  40  41
...     ...    ...  ... ... ... ...
cb1     male   12   29  39  49  61
cb2     female 15   49  52  53  59
...     ...    ...  ... ... ... ...


I want to know: 1. Do patients differ from controls before treatment (T0)? 2a. Do patients differ from controls after treatment? 2b. Do pre-existing differences as in 1, if any, change?

However, I know that the cognitive measure is (normally, i.e., in healthy controls) significantly predicted by
a. age, gender, and their interaction
b. repeated measurement

I would therefore like to retain the matching in the analysis. However, I am not sure how to achieve this. Would it be feasible to perform a repeated measures analysis of variance with two "within-subject" factors (time: T0,T1,T2,T3, and subject type: patient, controla, controlb) and then use contrasts to achieve the desired grouping? If so, how do I set this up properly in R?

Another option I came up with is to calculate a set of 32 difference scores for each assessment (p1T0-ca1T0,...,p16T0-ca16T0,p1T0-cb1T0,...,p16T0-cb16T0) and then use one-sample t-tests to test for the significance of the average difference (although that may require explicit correction for multiple comparisons). However, I am not certain that is statistically valid (at least in terms of the degrees of freedom applied, normally 32-1 = 31).

Is the anova technique feasible and proper? Should I go with the simple t-test method, and in that case, would it be correct to use 31 degrees of freedom? Or do I need another class of methods entirely?

I think you probably want a linear multilevel model. If you are using SAS, look at PROC MIXED. If using R then nlme or lme4.