Dear all,
Recently I was running sas proc mixed to validate my counterpart's results. Below is the statement I used (-note, 'Base' in the model statement):
proc mixed data=indata method=reml;
class TRTPN(ref='1') SITEGR1 AVISITN SUBJID;
model CHG = BASE TRTPN SITEGR1 AVISITN TRTPN*AVISITN / DDFM=KENWARDROGER;
repeated AVISITN / type=un sub=SUBJID;
lsmeans trtpn*avisitn/pdiff cl ;
run;
My counterpart runs like this:
proc mixed data=indata method=reml;
class TRTPN(ref='1') SITEGR1 AVISITN SUBJID;
model CHG = TRTPN SITEGR1 AVISITN TRTPN*AVISITN BASE / DDFM=KENWARDROGER;
repeated AVISITN / type=un sub=SUBJID;
lsmeans trtpn*avisitn/pdiff cl ;
run;
Surprisingly, the standard error estimates from the lsmeans statement are quite different.
Take one example:
mean (SE) for model-adjusted means for one visit of one treatment group:
9.78 (4.896) 9.78 (2.150)
The adjusted means are the same but the standard errors change a lot; and the standard error values depend on the location/order of the covariates.
I do not understand why. Am i doing something wrong or the variance-covariance changes with the order of the covariates?
thanks all.
Yes; I tried to use DDFM=KENWARDROGER2 and the problem is the same. Thanks
Just want to add one more piece of information: I have tried the same model to generate multiple tables for different endpoints - it is odd that only one single table that had such problem: the order of the 'Base' in the model statement changed the standard error. All other tables had no difference.
Save $250 on SAS Innovate and get a free advance copy of the new SAS For Dummies book! Use the code "SASforDummies" to register. Don't miss out, May 6-9, in Orlando, Florida.
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.