Skip to content

Regularized Regression (Lasso, Ridge, Elastic Net)

Linear regression with a penalty that shrinks coefficients. The lasso also sets some coefficients to exactly zero, selecting predictors.

  • Many predictors, relative to the number of cases, or strongly correlated predictors.
  • Prediction accuracy matters more than unbiased coefficients and p-values.
  • A linear relationship; cases are independent.
  • Predictors are standardized (the default) so the penalty treats them equally.
  • The penalty is chosen by cross-validation; results depend somewhat on the random fold split (fixed by the seed).
  • Cross-Validation: mean squared error for each penalty; the chosen one is marked in the footnote. The 1 SE rule picks a simpler model whose error is within one standard error of the best.
  • Coefficients at the chosen penalty, on the original and standardized scales; zero means the predictor was dropped.
  • Coefficient Trace shows how coefficients shrink as the penalty grows.

A lasso regression with the penalty chosen by 10-fold cross-validation (1-SE rule) retained 3 of 12 predictors; the model explained 81% of the variance in price.

Syntax: REGULARIZED price WITH sqft rooms age lot /METHOD=LASSO /CROSSVALID=FOLDS(10) RULE(1SE) /PLOT=TRACE CVERROR.


This page comes from OrcStat’s built-in help (the same text as in the app’s Help panel). To suggest a change, open an issue.