I have a plot of residual values of a linear model in function of the fitted values where the heteroscedasticity is very clear. However I'm not sure how I should proceed now because as far as I understand this heteroscedasticity makes my linear model invalid right?

So I have been doing some reading about this subjet and I found two suggestions in other stackoverflow threads.

1) Use robut linear fitting using the rlm() function of the MASS package because it's apparently robust to heteroscedasticity.

2) As the standard errors of my coefficients are wrong because of the heteroscedasticity, I can just adjust the standard errors to be robust to the heteroskedasticity? Using the method posted here

Which would be the best method to use to deal with my problem? If I use solution 2 is my predicting capability of my model completely useless?

My residuals in function of the fitted values looks like this http://i.gyazo.com/9407a829a168492b31dfa3d1dd33a21d.png and the Breusch-Pagan test confirmed that the variance is not constant.


migrated from stackoverflow.com Apr 19 '15 at 10:58

This question came from our site for professional and enthusiast programmers.

  • $\begingroup$ This really isn't an R coding question. You should consult a statistician, not a programmer. You should post to Cross Validated instead. (I've flagged for automatic migration but it can take a while to get enough votes.) $\endgroup$ – MrFlick Apr 18 '15 at 22:26
  • $\begingroup$ The residuals in the image you linked to shows misspecification of the linear part of the model, not (just) heteroscedasticity. If your data looks like that, you first need fix the linear predictor. (That might also fix the problem with heteroscedasticity).) $\endgroup$ – Karl Ove Hufthammer Apr 19 '15 at 13:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.