07-21-2011 03:54 PM
I am running proc mixed with 1 between factor (group) and 3 within factors (cond, side, time). It is my understanding that the repeated statement can only handle 2 within factors. The following code contains what I've been told is one way to specify the model:
class subj group cond side time;
model resp = group|cond|side|time / ddfm=kr;
random int cond / subject=subj(group);
repeated side time / subject=cond*subj(group) type=un@un;
I'm comparing this to what I've done in the past with proc glm as follows:
model y1-y18 = group/nouni;
repeated cond 3, side 2, time 3/nom;
The proc mixed code works but it doesn't match the proc glm output as well as I'd like (same number of subjects in each group and no missing data). I've run the program where I interchange cond, side and time in the random and repeated statements then compare the fit statistics. My question is does anybody have any other ideas about the random and repeated statements that I could try?
08-02-2011 10:16 AM
There are so many issues with repeated measures that it would be very difficult to give you simple advice. The specific experimental layout will decide what model (including random and repeated) statements to use. But you should know that the approach in GLM is different from the approach in MIXED. There is no direct correspondence of the statistics, etc. You really should do some reading on the topic to become familiar with the issues. A good place to start might be:
It is dated (a lot of new developments since this was written), but it tells you about some of the major issues. Chapters in the book SAS For Linear Models (by Littell, Stroup, and Freund), 4th edition, should be helpful.