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

Hello all,

I appreciate you to help me understand what is the difference between these two models. In the first model, in random statement trt1 and trt2 are entered, while in the second model it is empty. (these codes and data are from sas tutorial video)



proc mixed data=test;
class patient trt1 trt2 time;
model resp=trt1 trt2 trt1*trt2 time;
random int  trt1 trt2 / subject=patient;
repeated time/ subject=patient*trt1*trt2 type=ar(1);
run;
proc mixed data=test;
class patient trt1 trt2 time;
model resp=trt1 trt2 trt1*trt2 time;
random int / subject=patient;
repeated time/ subject=patient*trt1*trt2 type=ar(1);
run;
patienttrt1trt2timeresp
11114.3
11123.8
11133.1
11142.7
11214.3
11223.4
11233.2
11243.5
12113
12123.3
12132.5
12143.4
12213.3
12223.2
12233
12243.2

 

1 ACCEPTED SOLUTION

Accepted Solutions
jiltao
SAS Super FREQ

Model 1 essentially models two more random effects compared to model 2: trt1*patient and trt2*patient. Because each patient gets multiple trt1's and multiple trt2's, modeling these two random effects is reasonable. Both models are valid models. Which one is better for your data might be evaluated by examining the Fit Statistics table from PROC MIXED output -- the smaller the fit statistic such as AICC or BIC, the better fit of the model.

View solution in original post

2 REPLIES 2
jiltao
SAS Super FREQ

Model 1 essentially models two more random effects compared to model 2: trt1*patient and trt2*patient. Because each patient gets multiple trt1's and multiple trt2's, modeling these two random effects is reasonable. Both models are valid models. Which one is better for your data might be evaluated by examining the Fit Statistics table from PROC MIXED output -- the smaller the fit statistic such as AICC or BIC, the better fit of the model.

jiltao
SAS Super FREQ
I forgot to mention that you might also want to examine the log to be sure there is no message such as G matrix not positive definite, before interpreting the output.

Ready to join fellow brilliant minds for the SAS Hackathon?

Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.

Register today!
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
  • 2 replies
  • 492 views
  • 2 likes
  • 2 in conversation