It is generally advisable to normalize (or standardize, or rescale) independent variables before running a LASSO/ridge regression, so that they are all on the same scale. This may not be advisable (or may be irrelevant) for categorical variables. Many machine learning libraries automatically normalize variables for LASSO/ridge/elastic net. Do the official Statacorp
and
commands automatically normalize predictors? If so, what normalization/standardization/rescaling procedure does it use? I could not find documentation on this.
Code:
lasso
Code:
elasticnet
Comment