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. (Is that right?)
Use robust linear fitting using the
rlm()
function of theMASS
package because it's apparently robust to heteroscedasticity.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 heteroscedasticity? Using the method posted on Stack Overflow here: Regression with Heteroskedasticity Corrected Standard Errors
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?
The Breusch-Pagan test confirmed that the variance is not constant.
My residuals in function of the fitted values looks like this:
(larger version)
gls
and one of the variance structures from package nlme. $\endgroup$