I am currently trying to analyse data from a crossover study. In brief, the study is of a crossover design, where each participant takes part in 2 separate sessions, where they play a game. This game repeatedly measures a few different variables, let's call one reaction time. During one session, reaction time is measured 30 times. Before one of the sessions, each participant is given either placebo or treatment, and half the participants receive placebo the first time, and half receive treatment the first time. Consequently, each participant has 60 data points, were 30 are under placebo, and 30 are under treatment.
I am aware that crossover studies have their own considerations, but at the moment I am stuck with how to properly fit a mixed model for this data. The way I understand it, I need to tell the model what a subject is (i.e., that the 60 measurements for every participant are correlated), but it has also been pointed out to me that the 30 measurements of each session are also correlated, and need to be defined as such in the model, before I try to parse out the within-subject effect of the treatment.
Can anyone verify this, and possibly tell me how to best to this? I use SAS, and my code looks like this at the moment:
proc mixed data=test;
class ID Session Drug MeasurePoint Sequence;
model ReactionTime=Drug Sequence Session MeasurePoint / ddfm=kenwardroger;
random int / subject=ID;
repeated MeasurePoint / subject=ID*Drug type=ar(1);
lsmeans Drug / diff;
run;
Sequence
refers to the sequence of drug / placebo, and MeasurePoint
to the order of the measurements during each session. I am not overly interested in the effect of time over each session.
Also, is the ar(1) covariance matrix proper?