1
$\begingroup$

I'm running a LASSO regression on a continuous outcome, and am standardizing the features. Should I standardize the outcome as well?

Specifically I'm using the glmnet R package.

$\endgroup$
  • 2
    $\begingroup$ I have a response down but I'm not sure it is answering your question. Is your question more about what changes in the model, or what assumptions are required to standardize? Of course you always can standardize but that doesn't mean it is a good idea, one example where it would not help anything is on an outcome that is binary. $\endgroup$ – Lucas Roberts Feb 15 '18 at 23:21
1
$\begingroup$

From the glmnet doc:

Note also that for "gaussian" , glmnet standardizes y to have unit variance (using 1/n rather than 1/(n-1) formula) before computing its lambda sequence (and then unstandardizes the resulting co- efficients); if you wish to reproduce/compare results with other software, best to supply a stan- dardized y.

It depends on the distribution you are using/assuming as your response variable. If Gaussian or mgaussian in glmnet nomenclature, then you can center scale.

The answer of whether it makes any difference really depends on the outcome type. If the outcome is binary, the standardization will make no difference. If Gaussian there are some differences between standardized and non-standardized outcomes which are already handled by an argument into the glmnet function.

$\endgroup$
  • $\begingroup$ Thanks, I'm looking for best practice for a continuous/Gaussian y. Since it already standardizes by variance, it sounds like centering will only affect the intercept, is that right? $\endgroup$ – Max Ghenis Feb 16 '18 at 19:08
  • $\begingroup$ In the non-regularized case that is definitely true and should also be true in this case if the covariates are orthogonal. I'm not sure how that would impact things in highly correlated features. In that case you can observe some weird behavior, especially w/large number of features. $\endgroup$ – Lucas Roberts Feb 16 '18 at 22:05

Your Answer

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

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