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

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!

1 ACCEPTED SOLUTION

Accepted Solutions
SteveDenham
Jade | Level 19

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

View solution in original post

9 REPLIES 9
PaigeMiller
Diamond | Level 26

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.

--
Paige Miller
Yughaber
Quartz | Level 8
Do you say multicollinearity may be an issue because I have 20 covariates? And if so, how do you approach this issue?

Thanks!
PaigeMiller
Diamond | Level 26

@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?"

--
Paige Miller
Yughaber
Quartz | Level 8
Sorry, I am using a proc mixed. A mixed model because I have repeated measurements.
PaigeMiller
Diamond | Level 26

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.

--
Paige Miller
Yughaber
Quartz | Level 8
proc mixed data=prog;
class participant gender classification (ref='group1')'
model PP=OP age gender height weight RR MAP FO peak temp TV VAS (I HAVE LIKE 20 COVARIATES LIKE THIS) / s chisq outpred=mixedout;
random intercept / subject=participant;
repeated / type=VC subject=participant;
run;
Ksharp
Super User

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 .

SteveDenham
Jade | Level 19

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

PaigeMiller
Diamond | Level 26

@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.

--
Paige Miller

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
  • 9 replies
  • 852 views
  • 6 likes
  • 4 in conversation