Start a new topic

Multicollinearity among your covariates

I ran Null Model and it gave me an error saying that there is Multicollinearity among my covariates. The covariates are weight, height, age, gender and PCs. 


1 person has this question

Hi Taskeen! I think we did end up getting this issue solved in Office Hours, so I'm just going to comment here for others: 


Taskeen was running the GENESIS Null Model on BDC-Seven Bridges and was getting an error saying that there is multicollinearity. This means that, among several variables, there are some that completely covary with each other, and this can especially happen if you have one variable in your covariates that doesn't change. 


However, Taskeen's variables didn't seem to be problematic the way other phenotype matrices I've seen have been. We finally realized that two of her variables had units listed in them (kg and cm, for weight and height) and that was causing R to read them as character strings -- and that, probably, the script was taking the *length* of the strings as their value, a fun trick that R pulls sometimes. Taskeen fixed the phenotype matrix so that height and weight were numeric instead, and then the task ran successfully. 


The moral of this story, for others who might be facing this issue, is that you need to make sure your phenotype matrix is all numeric, unless you have categorical data, in which case you need to make sure that you've made your categorical data into factors. Otherwise, the GENESIS workflows may not treat your phenotype matrix correctly. 


Had this not worked, our next troubleshooting step would have been to run the Null Model script in RStudio on the Cloud, in order to debug interactively. 

Well said Dr. Cera and thank you again!

Login or Signup to post a comment