0
$\begingroup$

I am running a linear regression on the house prices dataset from Kaggle and I was trying to see if I can find collinearity between some variables in order to improve my prediction.

To this purpose I wanted to use the VIF function in R (package car) but I get the error: 'there are aliased coefficients in the model' What are 'aliased coefficients'? helped to get a better understanding as to why I am getting this error, so I did the analysis and I found out that indeed two predictors are always matching.

My problem is that these predictors are dummy levels on two categorical variables, BldgTypeDuplex and MSSubClass90. So my question is how do I deal with this? I cannot remove those two predictors as I have examples in the test set with these values and I do not want to remove the whole variables BldgType or MSSubClass as they contain useful information.

$\endgroup$
2
  • $\begingroup$ The two factor variables are basically telling you the same thing, so you can drop either one from the train and test, you won't lose much. $\endgroup$ Commented Aug 29, 2019 at 9:56
  • $\begingroup$ Thank you for the feedback! These two specific factor levels are telling me the same thing, so in the case when I have a class 90 I have a building type Duplex but this is not the case in general for MSSUbClass and BldgType. So I was wondering how to deal with this. $\endgroup$
    – User2321
    Commented Aug 29, 2019 at 10:02

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.