What Is Linear Regression?
Linear regression is a statistical method that models the relationship between a continuous outcome and one or more predictor variables, estimating how much the outcome is expected to change as each predictor changes. It draws the "best-fitting straight line" (or, with multiple predictors, a best-fitting flat plane) through the data, chosen specifically to minimize the total distance between the observed values and the line's predicted values.
In medical research, linear regression answers questions like: how much does systolic blood pressure change per additional year of age? How much does a new drug change LDL cholesterol after adjusting for baseline levels and BMI? Any time your outcome is a continuous, roughly normally distributed measurement, linear regression is likely the tool you reach for.
When Should Linear Regression Be Used?
Use linear regression when your outcome variable is continuous (blood pressure, cholesterol, hospital stay in days, a symptom score treated as continuous) and you want to quantify its relationship with one or more predictors — whether those predictors are continuous (age, dose) or categorical (treatment group, sex).
| Clinical Scenario | Why Linear Regression Fits |
|---|---|
| Predicting LDL change from a new statin dose, adjusted for baseline LDL and age | Continuous outcome, continuous + categorical predictors |
| Relationship between BMI and systolic blood pressure | Both variables continuous — a classic simple linear regression |
| Predicting hospital length of stay from comorbidity count and surgical complexity | Continuous outcome, multiple predictors — multiple linear regression |
If your outcome is binary (event/no event), use logistic regression instead. If your outcome is time-to-event with censoring, use Cox regression. Linear regression is specifically for continuous outcomes.
Simple vs Multiple Linear Regression
Simple linear regression has exactly one predictor and one outcome — for example, predicting weight from height alone. Multiple linear regression includes two or more predictors in the same model simultaneously, allowing you to estimate each predictor's effect on the outcome while statistically holding the others constant.
Simple: Systolic BP = f(Age) only — one predictor, describes the raw relationship between age and blood pressure with no adjustment for anything else.
Multiple: Systolic BP = f(Age, BMI, Sodium intake, Smoking status) — four predictors together, each coefficient now represents that variable's effect independent of the other three.
Multiple regression is far more common in medical research, because clinical outcomes are almost always influenced by several factors at once, and adjusting for known confounders is usually necessary to get a meaningful estimate of any one predictor's effect. See our full guide on choosing covariates for how to decide which predictors belong in a multiple regression model.
Dependent and Independent Variables
The dependent variable (also called the outcome or response variable) is what you are trying to predict or explain — it goes on the left side of the regression equation and must be continuous for linear regression. The independent variables (also called predictors, covariates, or explanatory variables) are what you use to predict or explain the outcome — they can be continuous or categorical.
A categorical predictor with more than two categories needs to be entered as a set of dummy (indicator) variables — a 4-category variable like disease stage (I–IV) becomes 3 dummy variables, each comparing one stage against a chosen reference stage, not a single variable coded 1–4 treated as if it were continuous.
Regression Coefficients Explained (B)
The unstandardized coefficient, labeled B in SPSS output, tells you exactly how much the outcome is predicted to change, in its own original units, for a one-unit increase in that predictor, holding all other predictors in the model constant.
B = 0.71 for age (in years) predicting systolic blood pressure (in mmHg) means: for every additional year of age, systolic blood pressure is predicted to increase by 0.71 mmHg, holding all other model predictors constant. A 10-year age difference predicts a 7.1 mmHg difference in systolic BP, all else equal.
The sign of B tells you the direction: positive means the outcome increases as the predictor increases; negative means the outcome decreases as the predictor increases. The magnitude of B is only meaningful in the context of the predictor's own unit — a B of 0.71 per year of age is not directly comparable to a B of 1.12 per kg/m² of BMI, which is exactly why standardized Beta (covered next) exists.
Beta Coefficients: Standardized vs Unstandardized
Standardized Beta re-expresses every variable in the model — predictors and outcome alike — in standard deviation units instead of their original units. This removes the original scale entirely, which means standardized Beta coefficients from different predictors, even ones measured in completely different units, become directly comparable to each other in terms of relative strength.
| Situation | Use |
|---|---|
| Explaining real-world clinical magnitude ("each year of age adds X mmHg") | Unstandardized B |
| Comparing which predictor has the strongest relative effect | Standardized Beta |
| Predictors measured in wildly different units (age in years vs a biomarker in pg/mL) | Standardized Beta, for fair comparison |
"Age (B = 0.71) is a stronger predictor of blood pressure than BMI (B = 1.12) because 1.12 > 0.71" — comparing unstandardized B across two predictors measured in different units.
Compare standardized Beta instead: if age's Beta = 0.47 and BMI's Beta = 0.24, age is actually the stronger relative predictor, despite its smaller unstandardized B.
Confidence Intervals for Coefficients
The 95% confidence interval around a coefficient B gives the plausible range for the true population value, based on your sample. If the CI does not cross zero, the coefficient is statistically significant at the conventional threshold — consistent with the p-value, but the CI additionally conveys the precision and plausible range of the effect, which a p-value alone cannot.
B = 0.71, 95% CI [0.48, 0.94] for age predicting SBP. The true effect of age is estimated to lie somewhere between 0.48 and 0.94 mmHg per year, with 95% confidence — a fairly precise, clearly positive estimate. Compare this to B = 0.71, 95% CI [-0.12, 1.54] from a smaller study: same point estimate, but this CI crosses zero, meaning the effect is not statistically significant and much less precisely estimated.
Always report the 95% CI alongside every coefficient you discuss, not only the primary predictor of interest. See our confidence interval guide for the general concept behind this.
P Values in Regression Output
The p-value (Sig. column in SPSS) tests the null hypothesis that a given predictor's true coefficient is zero — no relationship with the outcome, after adjusting for the other predictors in the model. A p-value below your threshold (almost always 0.05) means the observed coefficient is unlikely to have arisen by chance if the true coefficient were really zero.
Report the exact p-value (e.g., p = 0.007), not just "p < 0.05," and convert SPSS's ".000" to "p < 0.001" rather than reporting it literally. See our p-value interpretation guide for the general logic behind this threshold.
R²: How Much Variance Is Explained
R² (R-squared) is the proportion of the total variability in the outcome that is explained by all the predictors in the model combined, expressed as a value from 0 to 1 (or 0% to 100%). An R² of 0.32 means the model's predictors together explain 32% of why the outcome varies from person to person in your sample — the remaining 68% is due to factors not captured by the model, plus random variability.
A model predicting LDL cholesterol change from diet, baseline LDL, and statin dose reports R² = 0.41. This means 41% of the variability in LDL change across patients is explained by these three predictors together — a moderately strong model for a clinical outcome, though the majority of variability still comes from factors outside the model (genetics, adherence, other unmeasured factors).
Adjusted R²
Plain R² has a mechanical flaw: it always increases, or at worst stays the same, every time you add another predictor to the model — even a completely irrelevant one — simply because more predictors give the model more flexibility to fit the specific sample's noise. Adjusted R² corrects for this by applying a penalty based on the number of predictors relative to the sample size, giving a more honest estimate of how well the model would generalize.
"Adding a fifth predictor raised R² from 0.41 to 0.43, so it clearly improved the model" — reporting plain R² alone as evidence a predictor is worth keeping.
Check adjusted R² too: if it dropped from 0.39 to 0.37 despite plain R² rising, the fifth predictor added essentially no real explanatory value and may not be worth keeping in the model.
Always report adjusted R² alongside plain R² once your model has more than one or two predictors — it is the more honest number for judging whether your model is genuinely informative.
Regression Assumptions
Linear regression rests on four key assumptions. SPSS will calculate a full set of results whether or not these assumptions hold — checking them is your responsibility, not something the software warns you about automatically.
| Assumption | What It Means | How to Check |
|---|---|---|
| Linearity | The relationship between predictors and outcome is a straight line, not curved | Residuals vs. fitted values plot — no clear curve pattern |
| Homoscedasticity | The spread of residuals is roughly constant across all predicted values | Residuals vs. fitted values plot — no funnel/cone shape |
| Independence of residuals | Residuals are not correlated with each other (important for repeated/clustered data) | Durbin-Watson statistic (for time-ordered data); study design review |
| Normality of residuals | Residuals are approximately normally distributed | Q-Q plot of residuals; Shapiro-Wilk test on residuals |
If linearity or homoscedasticity is meaningfully violated, consider transforming the outcome (e.g., a log transformation for a right-skewed outcome) or adding a non-linear term. If normality of residuals is violated in a large sample, this is often a minor concern due to the Central Limit Theorem; in a small sample, it is a more serious issue.
Multicollinearity
Multicollinearity occurs when two or more predictors in the same model are strongly correlated with each other, making it statistically difficult for the model to separate their individual, independent effects on the outcome — coefficients become unstable, standard errors inflate, and a genuinely important predictor can appear falsely non-significant.
A model predicting cardiovascular risk includes both waist circumference and BMI, which are typically correlated above r = 0.85. VIF for both predictors comes out above 8, confirming problematic collinearity — the fix is to retain only one of the two, chosen on clinical grounds, not to keep both and interpret their individual coefficients as if they were reliable.
Check the Variance Inflation Factor (VIF) for every predictor — a VIF above 5 to 10 is generally treated as concerning. See our full guide on choosing covariates, which covers multicollinearity and overadjustment bias in depth.
Residual Analysis
A residual is the difference between an observed value and the value the model predicted for that same case — residual analysis is how you actually verify the assumptions above, rather than just assuming they hold. Two plots do most of the work.
Outliers and Influential Points
A large standardized residual (typically beyond ±3) flags a case the model predicts poorly. Cook's Distance identifies influential points — cases that, if removed, would substantially change the model's coefficients. Investigate flagged cases for data entry errors before deciding whether to exclude them; see our guide on outlier detection for the full decision process.
Interpreting SPSS Linear Regression Output
Run via Analyze → Regression → Linear. Three tables matter: Model Summary, ANOVA, and Coefficients.
What to Interpret, What to Ignore
Interpret B, its 95% CI, Beta, and Sig. for every predictor, plus the overall F-test and adjusted R² for the model as a whole. Ignore the Constant (intercept) row's own p-value in most clinical write-ups — it rarely has a meaningful independent clinical interpretation. See our full SPSS output interpretation guide for how this compares across other tests.
Common Mistakes
Mistake 1: Comparing Unstandardized B Across Predictors
Treating a larger B as automatically "more important" when predictors are measured in different units produces a meaningless comparison.
Mistake 2: Never Checking Assumptions
Reporting coefficients, CIs, and p-values from a model that violates linearity or homoscedasticity produces numbers that look precise but may not be trustworthy.
Mistake 3: Ignoring Multicollinearity
Including two highly correlated predictors and interpreting both coefficients independently, when the model cannot actually separate their effects reliably.
Mistake 4: Using Plain R² Instead of Adjusted R² With Multiple Predictors
Plain R² mechanically rises with every added predictor, overstating how much a specific addition actually improved the model.
Mistake 5: Using Linear Regression for a Binary Outcome
Fitting a linear model to a yes/no outcome produces predicted values outside the 0-1 range and systematically violates model assumptions.
Mistake 6: Claiming Causation From an Observational Regression Model
A significant, adjusted coefficient from an observational study shows an association, not proof of a causal effect, regardless of how many covariates were included.
Complete Worked Medical Example
Question: What predicts fasting glucose level in adults — age, BMI, and physical activity level?
Check assumptions
Residuals-vs-fitted plot shows random scatter, no funnel shape; Q-Q plot shows residuals close to the diagonal — linearity, homoscedasticity, and normality all reasonably satisfied.
Check multicollinearity
VIF for age, BMI, and activity level all below 2 — no meaningful multicollinearity concern.
Run the model and read the ANOVA table
F(3, 196) = 22.4, p < 0.001 — the overall model is statistically significant.
Read the coefficients
Age: B = 0.42, 95% CI [0.21, 0.63], β = 0.24, p < 0.001. BMI: B = 1.08, 95% CI [0.71, 1.45], β = 0.38, p < 0.001. Physical activity (hours/week): B = -1.15, 95% CI [-1.79, -0.51], β = -0.21, p = 0.001.
Read model fit
R² = 0.29, Adjusted R² = 0.28 — the model explains 28% of the variance in fasting glucose after adjustment.
"In a multiple linear regression model, age (B = 0.42, 95% CI [0.21, 0.63], β = 0.24, p < 0.001), BMI (B = 1.08, 95% CI [0.71, 1.45], β = 0.38, p < 0.001), and physical activity (B = -1.15, 95% CI [-1.79, -0.51], β = -0.21, p = 0.001) were all independent significant predictors of fasting glucose. BMI showed the strongest relative association (highest standardized β). The overall model was significant, F(3, 196) = 22.4, p < 0.001, explaining 28% of the variance in fasting glucose (adjusted R² = 0.28)." Run this analysis directly with the linear regression calculator or multiple regression calculator, and see our reporting-by-test guide for more worked examples.
Practical Reporting Checklist
State simple or multiple regression, and every predictor included
Named explicitly, not left implicit.
Report B with its 95% CI for every discussed predictor
Never a coefficient without its interval.
Report standardized Beta when comparing predictor strength
Not raw B, across predictors in different units.
Report the exact p-value for every coefficient
Three decimals, or "p < 0.001" — never "p = 0.000."
Report the overall model F-test
F(df, df) = value, p = value, alongside individual coefficients.
Report both R² and adjusted R²
Especially with more than one or two predictors.
Confirm assumptions were checked
Residuals-vs-fitted and Q-Q plots reviewed, not assumed.
Confirm VIF was checked for multicollinearity
Especially with clinically related predictors.
Frequently Asked Questions
Run Your Linear Regression With Confidence
Use StatClinic's free linear regression calculator to get coefficients, confidence intervals, R², and a journal-ready results sentence generated automatically. Free, no registration required.
Try StatClinic Free →