In An Introduction to Statistical Learning, James and colleagues state
"In contrast, the ridge regression coefficient estimates can change substantially when multiplying a given predictor by a constant. Therefore, it is best to apply ridge regression after standardizing the predictors."
I am using the glmnet
package to conduct ridge and lasso regression, however none of the predictors that were highly significant predictors in a backwards stepwise regression are greater than zero using the glmnet()
and cv.glmnet()
functions. I am willing to accept that the stepwise regression may have delivered spurious results (there are MANY posts warning against it), however I just wanted to make certain that the lack of even a single non-zero predictor in the lasso procedure was due to the flaws in stepwise regression rather than some scaling error on my part.
I have read that the glmnet
function scales and then unscales predictors automatically, 'under the hood' as it were. Can anyone verify this?