BookmarkSubscribeRSS Feed
simonli
Calcite | Level 5

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.

 

 

 

 

 

 

 

3 REPLIES 3
PGStats
Opal | Level 21

Do you get the same problem when asking for

 

DDFM=KENWARDROGER2  ?

PG
simonli
Calcite | Level 5

Yes; I tried to use DDFM=KENWARDROGER2 and the problem is the same. Thanks

simonli
Calcite | Level 5

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. 

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

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
  • 3 replies
  • 1279 views
  • 0 likes
  • 2 in conversation