- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
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?
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
This looks as though it should work. Is there something in the log or listing that indicates that there is an issue?
SteveDenham
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Thank you, both.
This paper perfectly answers my questions!