Skip to content
Scintria
ToolsGrant writerFunding
HomeLiteratureClinical trialsEvidence LabProtocol packData analysisLearnProjectsLibraryReferencesApplications
Start free
ScintriaStart free

Learn / Biostatistics / Correlation and linear regression

Multiple regression: adjusting for several variables

14 minute read · 6-question quiz

Download this lesson as a colour Word or PDF study guide with the figures and answers. Included in paid plans; reading and quizzes stay free.Sign in

What you will learn

  • Interpret coefficients in a model with several predictors, including binary and categorical ones

  • Explain how adjustment changes an estimate and how to decide which variables to include

  • Recognise overfitting, multicollinearity and the importance of model checking

Real outcomes depend on many things at once. Multiple linear regression extends the model:

Y = β_0 + β_1 X_1 + β_2 X_2 + … + β_k X_k + ε

Each coefficient β_j is the expected change in Y for a one-unit increase in X_j, holding all the other predictors constant. That 'holding constant' is what lets us adjust for confounders.

Predictor types

  • Continuous (age): coefficient per unit.
  • Binary (sex, coded 0/1): the coefficient is the difference between the groups at the same values of other variables.
  • Categorical with k levels (district): create k − 1 dummy variables against a reference level; each coefficient is the difference from the reference.

Worked example: BMI and blood pressure

In 200 adults, we model SBP from age, BMI and sex (simulated data for illustration).

PredictorCoefficient95% CIMeaning
Intercept90.4SBP for a woman aged 0 with BMI 0 (not meaningful)
Age (per year)0.670.56 to 0.79+0.67 mmHg per year, at fixed BMI and sex
BMI (per kg/m²)1.150.70 to 1.60+1.15 mmHg per BMI unit, at fixed age and sex
Male sex2.0−0.7 to 4.7Men 2 mmHg higher than women, same age and BMI; not clearly different from 0

R² = 0.54: the three predictors together explain about 54% of the variance in SBP.

Adjustment matters. BMI alone gives a slope of 2.07 mmHg per unit (older people have higher BMI and higher BP). Once age is in the model, the BMI slope falls to 1.15, nearly half. The crude association was inflated by confounding by age.

StudyEstimate (95% CI)BMI: crude2.07 (1.53–2.62)BMI: adjusted for age, sex1.15 (0.7–1.6)012mmHg change in SBP per BMI unit
Adjusting for age shrinks the BMI coefficient from about 2.1 to 1.15.

Choosing variables

  • Confounders: include variables related to both exposure and outcome, chosen from subject knowledge and a causal diagram (see chapter 5), not from p-values.
  • Do not add everything. Variables that lie on the causal path (mediators) or are consequences of the outcome bias the estimate.
  • Stepwise selection (automatically adding or dropping variables by p-value) produces optimistic, unreliable models and is discouraged for explanatory work.
  • Events-per-variable: in regression, avoid more than roughly one predictor per 10 to 15 participants (for continuous outcomes) to prevent overfitting, where the model describes noise and fails on new data.

Problems to watch for

  • Multicollinearity: predictors that are strongly correlated with each other (weight and BMI, or systolic and mean arterial pressure) give unstable coefficients with huge SEs. Check variance inflation factors (VIF > 5 to 10 is a warning), and keep one of the pair.
  • Interaction: the effect of one predictor depends on another. Add a product term (age × sex) and test it.
  • Influential points: a few observations pulling the line (check Cook's distance).
  • Missing data: most software drops any person with a missing value in any variable (complete-case analysis). If many are dropped, bias and loss of power result; consider multiple imputation (chapter 10).

Association versus prediction

Two different goals call for different modelling. Explanatory (what is the effect of BMI on BP, free of confounders?) uses a causal diagram to choose adjustment variables and focuses on one coefficient. Predictive (who is at highest risk?) cares about accuracy in new patients, uses cross-validation, and may include any useful predictor. Mixing the two is a common source of misinterpretation: the coefficients of a predictive model should not be read causally.

Table 2 fallacy

In a multivariable model built to estimate one exposure's effect, the coefficients of the other variables are not necessarily interpretable as causal effects, because they were not adjusted for their own confounders. Reporting every coefficient as if it were a finding invites misreading.

A checklist for reporting a regression

State the outcome and its unit; list the predictors and how each was coded; give each coefficient with a 95% CI; say how many people were included and how many dropped for missing data; report R² (or adjusted R²) and the assumption checks you ran.

Summary

  • Each coefficient is the change in Y per unit of that X holding other variables fixed.

  • Dummy variables handle categorical predictors against a reference level.

  • Compare crude and adjusted coefficients to see confounding.

  • Choose variables by causal reasoning, not automatic p-value selection; limit the number of predictors.

  • Watch multicollinearity, interactions, influential points and missing data.

Check your understanding

Question 1
1

In a model with age, BMI and sex, the coefficient for BMI is the effect of:

Question 2
2

A categorical variable with 4 districts requires how many dummy variables?

Question 3
3

Weight, height and BMI are all entered in one model and the SEs explode. The likely problem is:

Question 4
4

Which variable should NOT usually be adjusted for in estimating the effect of salt intake on stroke?

Question 5
5

A dataset has 40 participants. Which model is most at risk of overfitting?

Question 6
6

The crude slope of 2.07 fell to 1.15 after adjusting for age. This implies:

Draft study guide. Spotted an error or something unclear? Tell us at hello@scintria.com. This is educational material, not clinical or regulatory advice.

Simple linear regressionLogistic regression: modelling a yes/no outcome