Hello -
I’m running a repeated measures mixed model with lab data. For each patient - lab value is measured at 4 timepoints, but at each timepoint the lab data value is measured by 2 separate devices. Each patient was also randomized to one of 2 treatments. I am interested in testing the difference in lab values by treatment, timepoint, and device.
Each patient has results at 4 timepoints, for 2 devices (8 records per patient). I am unsure how to specify the nested/clustered nature of device and patient. In the repeated statement, I included subject = ptno(device) - is this correct?
Thanks!!
PROC MIXED DATA=labdat;
CLASS ptno device time trt;
MODEL labval = device time trt device*time trt*device trt*time trt*device*time;
REPEATED time / subject=ptno(device) type=cs;
LSMeans device*time*trt/ cl DIFF;
run;
Each patient has 8 records (2 devices, 4 timepoints each):
ptno trt device time labval
1 1 1 1 99
1 1 1 2 105
1 1 1 3 520
1 1 1 4 467
1 1 2 1 267
1 1 2 2 325
1 1 2 3 261
1 1 2 4 313
....
20 2 1 1 119
20 2 1 2 127
20 2 1 3 618
20 2 1 4 529
20 2 2 1 267
20 2 2 2 320
20 2 2 3 290
20 2 2 4 400
@SteveDenham, any suggestions?
There are different ways to model the correlations in this data. One approach is to use the kronecker product covariance structure --
repeated device time / subject=patno type=un@ar(1); *** or un@un or un@cs;
Other ways are also possible, including using both RANDOM and REPEATED statements. See my paper below (pages 4 and 5 are relevant here).
https://support.sas.com/resources/papers/proceedings15/SAS1919-2015.pdf
Hope this helps,
Jill
This looks as though it should work. Is there something in the log or listing that indicates that there is an issue?
SteveDenham
There are different ways to model the correlations in this data. One approach is to use the kronecker product covariance structure --
repeated device time / subject=patno type=un@ar(1); *** or un@un or un@cs;
Other ways are also possible, including using both RANDOM and REPEATED statements. See my paper below (pages 4 and 5 are relevant here).
https://support.sas.com/resources/papers/proceedings15/SAS1919-2015.pdf
Hope this helps,
Jill
Thank you, both.
This paper perfectly answers my questions!
Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
Register now!
ANOVA, or Analysis Of Variance, is used to compare the averages or means of two or more populations to better understand how they differ. Watch this tutorial for more.
Find more tutorials on the SAS Users YouTube channel.