Statsly
regression

Lasso regression

Fit a linear regression with coefficient shrinkage and possible variable selection.

Requirements

  • continuous outcome
  • predictor(s)
  • penalty alpha

Avoid when

  • highly correlated predictors where ridge is preferred
  • unpenalized inference with p-values is required

Formula

arg minβ ||y−Xβ||² + λ||β||₁

Interpretation

Some coefficients may be shrunk exactly to zero; p-values are not reported.

Worked example

Fit a sparse continuous-outcome model when predictor selection is exploratory.

Open example datasets