The paper often suggests both standardized and unstandardized coefficients in the lasso model (glmnet in R).

However, when I run glmnet, the selected variable is different depending on standardized = True and False.

If I get standardized cofficients from six variables in lasso model, how do I get unstandardized coffiencients from those six variables?

Simply selecting standardized = FALSE in glmnet showed different variables.

(I got 6 variables from standardize = TRUE, but I got 2 variables from standardize = FALSE)

  • 2
    $\begingroup$ If standardize=T then glmnet will standardize the values during optimization, but it will return the results on the original scale. Post some data with an example. $\endgroup$ Sep 6, 2019 at 7:42
  • $\begingroup$ Main point is that for whatever data set, glmnet estimates a single hyperparameter $\lambda$ value. Therefore, usually standartization is expected and is enabled by default, since we want that one value of $\lambda$ to give an appropriate penalty for all variables simultaneously. On the other hand, Adaptive LASSO solves this problem differently -- here re-weighting the $\hat\lambda_j := \hat w_j \lambda_j, \forall j$ allows for standardized = F since the weights now also account for the scale, among other important qualities. $\endgroup$
    – runr
    Sep 9, 2019 at 15:29

1 Answer 1


If your variables measure different things on different scales (e.g., age of a person and weight loss/gain after treatment), you should standardize the data.

If your variables measure similar things on the same scale (e.g., number of bugs on 10 different plots in some field), you might not need to standardize. But this case happens rarely.

In any case, glmnet in R gives you the coefficients for the unstandardized data.

If the variable selection yields wildly differing results for standardized vs unstandardized data, this implies

a) that you should indeed standardize, because for the unstandardized data some varibales might dominate the lasso procedure wrongfully,

b) that maybe some of the variables are highly correlated. If two variables are highly correlated, lasso selects one of them by random and discards the other one. Elastic net reduces this problem, but you might want to check the correlation structure of your variables.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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