Ask Mallard

Linear regression

Linear regression estimates how a continuous outcome changes, on average, with one or more predictors.

What question does this help answer?

“How much does the expected value of a continuous outcome differ for a one-unit change in a predictor or between groups?”

When to use it

Use linear regression when the primary outcome is continuous and the scientific question concerns adjusted mean differences or trends. It is flexible enough to include categorical predictors, nonlinear terms, and interactions.

When not to use it

It is usually not appropriate for binary, count, or time-to-event outcomes without a clear justification. Strongly nonlinear relationships, severe heteroscedasticity, influential observations, or complex correlation structures may require extensions or different models.

How it works in plain language

The model finds the line or surface that best describes the expected outcome given the predictors. Each coefficient represents an adjusted average difference, conditional on the other variables in the model.

What a fitted line looks like

PredictorOutcome
Illustrative placeholder. Every value in this figure is invented to show the shape of the result, and is not an estimate of anything.

Why Mallard may recommend it

Mallard may recommend linear regression when your outcome is a measurement such as blood pressure, score, weight, cost, or length of stay and the modeling assumptions are plausible.

Key assumptions

  • The model form adequately captures the relationship between predictors and the conditional mean.
  • Residual variation is handled appropriately.
  • Observations are independent unless correlation is modeled.
  • Predictors are measured and coded appropriately.
  • Extreme influential observations are assessed.

What to watch out for

“Linear” refers to the model’s coefficients, not a requirement that every relationship be a straight line. Nonlinear relationships can be modeled with transformations or splines. A statistically significant coefficient does not establish causality.

Clinical example

Estimate the adjusted difference in systolic blood pressure associated with treatment group, age, and baseline blood pressure.

How to interpret it

If the adjusted coefficient for treatment is −4.2 mmHg, the model estimates that the treatment group has an average systolic blood pressure 4.2 mmHg lower than the reference group, conditional on included covariates.

Code for this method
Loading…
Recent studies that used this
Searching PubMed…
Work it out
Related Learn pages
Sources & further reading
  1. Linear Regression in Medical Research (opens in a new tab) · Anesth Analg · doi 10.1213/ANE.0000000000005206
  2. Regression: The Apple Does Not Fall Far From the Tree (opens in a new tab) · Anesth Analg · doi 10.1213/ANE.0000000000003424
Study-design and statistical guidance should be combined with context-specific model diagnostics rather than relying on a coefficient table alone.
Last source review: 2026-09-05
AI-generated educational content
Mallard uses reputable methodological and reporting sources, but this material may contain errors or omit important context. Verify important methodological decisions with the cited sources and, when appropriate, a qualified research methodologist or statistician.