I am wondering if there is an order in which covariates have to be listed in a mixed model?
For example, if I have 20 covariates that I am trying to look for confounding in my model, does it matter which order they are listed in the mixed model or not really?
Thanks!
Unfortunately, we have run into an occasional case where parameter estimates and test results have been affected by variable order in mixed model analyses, comparing results from two analysts who have different orders in the model statement AND different sort orders. We assume that is due to the iterative nature of the analysis which can magnify collinearity issues. Cholesky representation usually solves this issue, as does a sort of the data by the order of variables in the model statement.
But @PaigeMiller is right - Type 3 tests should be order independent, so unless you have someone doing a separate QC of your results, you will probably never notice the small changes with different variable orders.
SteveDenham
I don't think the order matters for most modeling in SAS. Especially since many procedures report the Type III effects, which are order independent.
Can you be more specific about the actual PROC and model you are using?
If there's anything to worry about in your situation, it is the effect of multicollinearity on your model estimates, which could have major negative impacts.
@Yughaber wrote:
Do you say multicollinearity may be an issue because I have 20 covariates? And if so, how do you approach this issue?
Repeating my earlier questions: "Can you be more specific about the actual PROC and model you are using?"
Multicollinearity in PROC MIXED with repeated measurements ... tough one, and not something I have experience with.
It would help if we could see the actual code.
If I was right, the order of variables only affect the fixed effect ,not for mixed effect.
But maybe @SteveDenham @StatDave @lvm know the answer .
Unfortunately, we have run into an occasional case where parameter estimates and test results have been affected by variable order in mixed model analyses, comparing results from two analysts who have different orders in the model statement AND different sort orders. We assume that is due to the iterative nature of the analysis which can magnify collinearity issues. Cholesky representation usually solves this issue, as does a sort of the data by the order of variables in the model statement.
But @PaigeMiller is right - Type 3 tests should be order independent, so unless you have someone doing a separate QC of your results, you will probably never notice the small changes with different variable orders.
SteveDenham
@SteveDenham wrote:
Unfortunately, we have run into an occasional case where parameter estimates and test results have been affected by variable order in mixed model analyses, comparing results from two analysts who have different orders in the model statement AND different sort orders. We assume that is due to the iterative nature of the analysis which can magnify collinearity issues.
I was not aware of this. Thank you for bringing it up.
Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
Register now!
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.