BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
tka726
Obsidian | Level 7

 

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?

1 ACCEPTED SOLUTION

Accepted Solutions
jiltao
SAS Super FREQ

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

 

View solution in original post

4 REPLIES 4
SteveDenham
Jade | Level 19

This looks as though it should work.  Is there something in the log or listing that indicates that there is an issue?

 

SteveDenham

jiltao
SAS Super FREQ

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

 

SteveDenham
Jade | Level 19

Follow @jiltao 's advice. She is who I would turn to if I had any questions.

 

SteveDenham

tka726
Obsidian | Level 7

Thank you, both.

This paper perfectly answers my questions!

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

Register now!

What is ANOVA?

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.

Discussion stats
  • 4 replies
  • 1824 views
  • 1 like
  • 3 in conversation