# How to apply heteroscedasticity to multiple linear regression in R?

I have trying to improve a multiple regression model (reducing RMSE further), and have found heteroscedasticity evidence for 2 variables. I have found 2 options for reducing heteroscedasticity in linear regression: first is to get square root Y (response variable), and second is to use box-cox transformation (as per https://www.r-bloggers.com/how-to-detect-heteroscedasticity-and-rectify-it/). All examples I have found show single input variable solutions. I'm trying to figure out how this will play out in multiple linear regression analysis. In analysis of each of the 3 relationships (predictors and responses) individually, only 2 show evidence of heteroscedasticity. How do I apply to only 2 out of 3? I am playing around eg square root of y to entire multiple regression.

In R, below, I've created a new column which is squareroot of output variable y (using caret library):

  model2 <- train (ysqrt ~ x1 + x2 + x3, trainX, method = "lm", trControl = trainControl (method="cv", number=10))


This just doesn't seem right though.

What about using White robust standard errors?

https://en.wikipedia.org/wiki/Heteroscedasticity-consistent_standard_errors

Take a look at this to apply this method with R:

Replicating Stata's "robust" option in R

• Thanks, I gave this a go. It's the best info I've seen so far. – user637251 Nov 20 '17 at 7:01
• I'm glad info was useful for you. Sorry if I don't give in depth explanations. Sometimes it's hard for me to write in english. – Alejandro Carrera Nov 22 '17 at 5:57