3
$\begingroup$

So, i was trying to improve mr LR model performing multiple linear regression on a dataset. I had a categorical variable region

Region(variable): Midwest Northeast South West

I made dummy variable for each of them and it did improved my model a bit.

Previous Model Summary enter image description here

After adding these variable(Which i made using a different variable) enter image description here

I am getting NA's in the coefficient for west, which i don't understand why. can someone explain?

$\endgroup$
2
  • $\begingroup$ Which tool / framework did you get these results with? Please add it to your post title and tags if possible. $\endgroup$ Commented Jan 13, 2020 at 5:35
  • $\begingroup$ The output is from R studio $\endgroup$ Commented Jan 13, 2020 at 21:16

1 Answer 1

1
$\begingroup$

You've given all four regions a dummy variable, so these are perfectly multicollinear, and the (unpenalized?) regression doesn't have a unique solution. R automatically drops a column in this situation and reports the NA.

https://stats.stackexchange.com/q/212903/232706
https://stackoverflow.com/q/7337761/10495893
https://stats.stackexchange.com/q/25804/232706

(You can see where R calls C and subsequently FORTRAN functions, then inserts the NAs at
https://github.com/wch/r-source/blob/0f07757ad10ca31251b28a2c332812e63c0acf38/src/library/stats/R/lm.R#L117
A nice article that helped me find that: http://madrury.github.io/jekyll/update/statistics/2016/07/20/lm-in-R.html )

$\endgroup$

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.