When to use it
Predict a continuous outcome when you expect only a few predictors to matter: lasso shrinks coefficients and drives the irrelevant ones to exactly zero, giving a sparse, interpretable model.
When not to: Predictors are highly correlated in groups you want kept or dropped together (lasso's selection among correlated predictors is unstable and somewhat arbitrary; use Elastic Net), or you need valid p-values and confidence intervals on individual coefficients (refit ordinary least squares on the selected predictors, with the post-selection-inference caveat in mind, or use ordinary linear regression from the start).
Step by step
Open it from the menu
Click Regression in the menu bar; under Shrinkage choose Lasso Regression.
Fill in the form
Choose the columns: What you want to predict or explain, Columns that may explain it. The form lists only columns whose type fits each field.
Check the options
The options start at their defaults: λ selection, Alpha (λ), CV folds, Standardize predictors. Change one only when your question needs it.
Run the analysis
Press Run analysis. The Result Card opens on its Results tab.
What to choose in the form
| What you want to predict or explain Response required | One numeric column. Continuous outcome variable (Y / dependent). |
|---|---|
| Columns that may explain it Predictors required | One numeric column. One or more numeric predictor columns (X). |
| λ selection | How to choose the penalty strength λ: 'cv' picks it by cross-validation (recommended; avoids the all-coefficients-zero trap of a fixed λ); 'manual' uses the Alpha you set below. Default: cv. |
| Alpha (λ) | Regularization strength when λ selection = manual. Larger = stronger penalty / more shrinkage. Default: 1. |
| CV folds | Number of cross-validation folds when λ selection = cv (lasso; ridge uses efficient leave-one-out). Default: 5. |
| Standardize predictors | Z-score predictors before fitting so the penalty is scale-fair (recommended). Default: on. |
How to read the card
The Results tab starts with what to know first (rows left out, checks that did not pass), then the interpretation in words and the Key Results; charts and assumption checks follow further down. Learn More explains the method in plain words. Read a Result Card covers all four tabs.
What it assumes
- Linearity
If it does not hold: Lasso regression models the outcome as a LINEAR function of the (possibly transformed) predictors; genuine curvature in the true relationship is not captured and biases predictions systematically in regions where the relationship bends.
How to check: Not checked by KernelStats: no residual or linearity diagnostic is run for this method, unlike Linear Regression's diagnostics; inspect residual plots manually or compare against a nonlinear alternative (e.g. Generalized Additive Model (GAM), Spline Regression).
- Normality (of residuals, not of the raw data)
If it does not hold: Any informal reading of the coefficient path implicitly leans on the same normal-errors assumption as ordinary least squares; non-normal or heteroscedastic residuals are not flagged here the way they are for Linear Regression.
How to check: Not checked by KernelStats: no residual normality or homoscedasticity diagnostic is computed for this method.
A worked example
Predicting penguin body mass from bill length, bill depth and flipper length (standardized), with lambda chosen by 5-fold cross-validation. Only numeric predictors are accepted; a text column such as sex is refused until it is encoded.
Result: Cross-validation selects lambda = 1.61; no coefficient is driven exactly to zero, but flipper length dominates (+702 g per SD) while bill depth (+36 g) and bill length (+23 g) are shrunk close to zero; R-squared = 0.76.
Almost all of the predictive signal runs through flipper length; the two bill measurements add little once it is in the model. The cross-validated lambda did not zero them, which is a reminder that lasso selection depends on where lambda lands: a slightly larger penalty would drop them, and neither outcome is a verdict on whether bill size is related to body mass in general.
From the Statistics Library.
The code tabs
Code gives this analysis as Python, R and MATLAB code (and SAS where the tab offers it), reading the data the way KernelStats did. Export sends the card to a report or to slides. See The Code tab.
Understand the statistics
Ask Oobi
Type one of these into Ask Oobi beside your data:
- Which of these measurements actually drive penguin body mass?
- Explain the lasso regression in plain words.
- What does overfitting mean?
Last reviewed November 16, 2026.
