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

Hi all,

 

If a repeated measures model with proc mixed is run with

 

proc mixed data=data plots=none method=reml;

   class treat sex age visit subject;

   model chg=treat sex age visit base / solution;

   repeated visit / type=un sub=subject(treat ) rcorr;

   lsmeans treat *visit / slice=visit cl e diff;

run;

 

and the same repeated measures model is run with a different order of variables.

 

proc mixed data=data plots=none method=reml;

   class treat sex age visit subject;

   model chg=base treat sex age visit / solution;

   repeated visit / type=un sub=subject(treat ) rcorr;

   lsmeans treat *visit / slice=visit cl e diff;

run;

 

The results are not exactly the same. Any explanation of this? Would there be any guidance to define an ideal order of variables? SAS helps seems to suggest effects with more importance first.

 

https://support.sas.com/documentation/cdl/en/statug/63033/HTML/default/viewer.htm#statug_mixed_sect0...

Rearranging effects in the MODEL statement so that the most significant ones are first can help, because PROC MIXED sweeps the estimate of in the order of the MODEL effects and the sweep is more stable if larger pivots are dealt with first. If this does not help, specifying starting values with the PARMS statement can place the optimization on a different and possibly more stable path.

 

Thanks

 

1 ACCEPTED SOLUTION

Accepted Solutions
ballardw
Super User

Use any measure of influence you like to pick importance order. And then test the result with different orders.

 

This is not unique to Proc Mixed repeated measures or even to SAS. I first ran into this with modeling procedures in SPSS. Our household rule when using the procedure, which I can't remember the name of since it has been 12 or more years now, was to move the most "influential" variable of the model to the last position in the model statement and see if it retained its influence or if it was even still statistically significant.

 

Why? Order of operations and the algorithm has to start somewhere, so some of the process is done in the order of the varaible appearance. Since there could be significant "cost" in terms of performance the internal process doesn't do all permutations of the variables to get "ideal" solution. Of course defining "ideal" might be challenge all by itself. If I get different r-squares, for example, using a different order of variables then which is the correct r-square to actually use?

View solution in original post

2 REPLIES 2
ballardw
Super User

Use any measure of influence you like to pick importance order. And then test the result with different orders.

 

This is not unique to Proc Mixed repeated measures or even to SAS. I first ran into this with modeling procedures in SPSS. Our household rule when using the procedure, which I can't remember the name of since it has been 12 or more years now, was to move the most "influential" variable of the model to the last position in the model statement and see if it retained its influence or if it was even still statistically significant.

 

Why? Order of operations and the algorithm has to start somewhere, so some of the process is done in the order of the varaible appearance. Since there could be significant "cost" in terms of performance the internal process doesn't do all permutations of the variables to get "ideal" solution. Of course defining "ideal" might be challenge all by itself. If I get different r-squares, for example, using a different order of variables then which is the correct r-square to actually use?

bambrosi
Fluorite | Level 6

Thank you very much, I did not know it could be also like this with SPSS or any other software. I just noticed this when using SAS recently. Ok thanks I will investigate this issue more deeply using your advice.

Happy to hear any other experience here.

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
  • 2 replies
  • 1567 views
  • 1 like
  • 2 in conversation