24  Multiple Regression

NoteWhat you’ll be able to do

By the end of this chapter you will be able to:

  1. Interpret a partial slope: the effect of one predictor holding the others constant.
  2. Read multiple regression output, separating the model-level test (overall F) from the predictor-level tests.
  3. Explain why R² is not additive across predictors, and when to prefer adjusted R².
  4. Avoid equating a coefficient’s size with a predictor’s importance.
  5. Check for multicollinearity with VIF.

Does study time predict exam score? Probably — but students who study more may also sleep better and carry higher prior GPAs, and any of those could be doing the real work. Multiple regression puts all the candidate predictors into one model, so each coefficient answers a sharper question: what does this predictor add, holding the others constant?

Multiple regression extends simple regression to more than one predictor. Instead of predicting Y from a single X, you predict Y from a set of predictors \(X_1, X_2, X_3, \ldots\) simultaneously.

This is what makes regression a serious tool for observational research: it lets you ask how Y differs across values of X among cases that match on the other variables in the model.

24.1 The model

\[ Y = \beta_0 + \beta_1 X_1 + \beta_2 X_2 + \ldots + \beta_k X_k + \epsilon \]

Each \(\beta_j\) is the partial slope for predictor j: the expected change in Y for a one-unit change in \(X_j\) when all other predictors are held constant.

That phrase “holding other predictors constant” is the headline feature of multiple regression. It separates X’s association with Y from the other variables in the model — which is narrower than removing confounding, as the analogy below explains.

NoteAnalogy: comparing equals

Want to know whether study time itself raises exam scores, when students who study more also sleep more and have higher GPAs? Imagine lining up only the students who are identical on sleep and GPA, and comparing exam scores among just them as study time varies. The partial slope is the statistical version of that comparison — performed across all values at once, without literally finding identical students.

Mapping: identical students = predictors held constant; the score difference within that matched group = the partial slope for study time.

Where this breaks: regression can only hold constant what’s in the model, and only linearly. Unmeasured confounds are still uncontrolled — this is matching on paper, not random assignment, so the causal warning from Chapter 22 still applies.

24.2 When to use it

Use multiple regression when you have:

  • One continuous outcome.
  • Two or more predictors (continuous, categorical, or both).
  • An interest in either (a) the unique effect of one predictor controlling for others, or (b) the predictive value of a set of predictors together.

Examples:

  • Does study time predict exam score, controlling for prior GPA?
  • What predicts birth weight: mother’s age, mother’s weight, smoking status, gestation length?
  • Are exercise frequency and sleep both unique predictors of well-being, or does one explain the other?

24.3 R syntax

model <- lm(Y ~ X1 + X2 + X3, data = data)
summary(model)

+ adds predictors. To include all variables in your data frame as predictors, use lm(Y ~ ., data = data) — but be deliberate about which predictors you include.

For interactions, use *:

# Both main effects and the interaction
model <- lm(Y ~ X1 * X2, data = data)

# The same model written out in full: X1 * X2 means X1 + X2 + X1:X2
model <- lm(Y ~ X1 + X2 + X1:X2, data = data)

# The interaction term alone, without main effects (rarely what you want)
model <- lm(Y ~ X1:X2, data = data)

24.3.1 Worked example

Predicting baby birth weight from mother’s weight and smoking status.

# Step 0: Load and prepare the Baby Dataset (see Chapter 7), then:
data <- babies

# Step 1: Inspect & set factor type
str(data)
data$smoke_bi <- as.factor(data$smoke_bi)

# Step 2: Visualize
library(ggplot2)
ggplot(data, aes(x = weight, y = bwt, color = smoke_bi)) +
  geom_point() +
  geom_smooth(method = "lm", se = FALSE)

# Step 3: Fit
model <- lm(bwt ~ weight + smoke_bi, data = data)

# Step 4: Diagnostics
par(mfrow = c(2, 2)); plot(model); par(mfrow = c(1, 1))

# Step 5: Read
summary(model)
confint(model)

24.3.2 Reading the output

Coefficients:
             Estimate Std. Error t value Pr(>|t|)    
(Intercept) 104.85604    3.47804  30.148  < 2e-16 ***
weight        0.13748    0.02616   5.255 1.81e-07 ***
smoke_bi1    -8.34704    1.11246  -7.503 1.38e-13 ***
---
Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1

Residual standard error: 17.47 on 993 degrees of freedom
  (240 observations deleted due to missingness)
Multiple R-squared:  0.08293,   Adjusted R-squared:  0.08108 
F-statistic:  44.9 on 2 and 993 DF,  p-value: < 2.2e-16

Interpretation:

  • Intercept = 104.86 — predicted birth weight for a non-smoker (smoke_bi = 0) with mother weight = 0. Mathematical, not substantively meaningful.
  • weight slope = 0.14, p < .001 — for each additional pound of mother’s weight, baby birth weight is 0.14 oz higher, holding smoking status constant. Significant.
  • smoke_bi1 slope = −8.35, p < .001 — smokers have babies that weigh 8.35 oz less than non-smokers, holding mother’s weight constant. Significant.
  • \(R^2\) = .083 — the two predictors together explain 8.3% of birth weight variance. Small, but with 996 babies it is estimated precisely.
  • F(2, 993) = 44.90, p < .001 — the model as a whole is significant.
  • 240 observations deleted due to missingness — R silently drops any baby missing bwt, weight, or smoke_bi. Always read this line: it tells you the analysis sample is 996, not 1,236.

24.3.3 A bigger coefficient is not a more important predictor

Smoking’s slope (−8.35) is about 60 times weight’s (0.14), but that compares ounces per smoker-vs-non-smoker with ounces per pound. Mothers in this sample vary by about 21 lb (one SD), and 21 × 0.14 ≈ 2.9 oz. So a typical difference in mother’s weight goes with about 3 oz of birth weight, and smoking with about 8. To compare predictors, first put them on a common scale. A p-value doesn’t measure importance either: it mixes the size of the effect with the sample size.

ImportantCommon Misconception: adding more predictors always improves the model

Multiple \(R^2\) increases (or stays the same) every time you add a predictor — even if that predictor is random noise. This makes it a poor criterion for choosing between models. Adjusted \(R^2\) penalizes for unnecessary predictors: if adding a predictor doesn’t explain enough additional variance to offset the penalty, adjusted \(R^2\) drops. When comparing models, use adjusted \(R^2\) or the nested model F-test via anova() — not whichever model has the largest Multiple \(R^2\).

24.4 Adjusted R-squared

In simple regression, \(R^2\) is the main effect-size statistic. In multiple regression, you get two:

  • Multiple \(R^2\) — the proportion of variance explained. Always increases (or stays the same) when you add predictors, even if those predictors are random noise.
  • Adjusted \(R^2\) — \(R^2\) with a penalty for the number of predictors. Used for comparing models with different numbers of predictors.

Use adjusted \(R^2\) when:

  • You’re comparing two models with different numbers of predictors.
  • You want a more honest estimate of how much variance is genuinely explained.

For reporting in a single model, both are useful — multiple \(R^2\) for the “raw” explained variance, adjusted \(R^2\) for the more conservative version.

24.5 The overall F-test (model gateway)

Same as simple regression but with bigger consequences:

  • \(H_0\): All slopes are zero (the model explains no variance).
  • \(H_1\): At least one slope is nonzero.

If the overall F-test is not significant, do not interpret individual coefficients. This is the gateway test for the whole model.

If the F-test is significant but none of the individual coefficient t-tests are, that suggests multicollinearity — the predictors are correlated with each other, so no single one stands out as the unique contributor.

24.6 Multicollinearity

NoteAnalogy: overlapping witnesses

Two witnesses describe the same event. If the second witness only repeats the first’s story, the case gains almost nothing — the testimony overlaps. A useful second witness adds details the first couldn’t see. Predictors work the same way: a new predictor raises explained variance only by what it uniquely contributes beyond the predictors already in the model.

Mapping: the event = variance in Y; each witness = a predictor; overlapping testimony = shared variance between predictors (multicollinearity); new details = unique variance, the part a partial slope tests.

Where this breaks: in court, agreeing witnesses strengthen a case (corroboration). In regression, overlap is pure redundancy — and occasionally two predictors together explain more than the sum of their solo stories (suppression), which no courtroom analogy predicts.

When two predictors are highly correlated with each other, the regression has trouble assigning unique credit to either one. Symptoms:

  • Coefficients with unexpected signs (positive when you expected negative).
  • Huge standard errors on coefficients.
  • Significant overall F-test but no significant individual predictors.
  • Coefficients that change wildly when you add or remove other predictors.

24.6.1 How to check

library(car)
vif(model)

VIF is the variance inflation factor. Rules of thumb:

VIF Status
< 5 Generally fine
5–10 Worth noting, possibly problematic
> 10 Serious multicollinearity

24.6.2 What to do about it

  • Drop one of the correlated predictors (if they measure essentially the same thing).
  • Combine them into a single composite (e.g., average two highly correlated scales).
  • Use ridge regression or partial least squares (advanced, beyond this course).
  • Accept it and report it — sometimes the predictors are conceptually distinct and you want to keep both.

24.7 Model comparison: nested models

Two models are nested when one is a subset of the other (e.g., one has fewer predictors). To test whether the additional predictors in the larger model add value:

# Both models must use exactly the same rows. Adding gestation drops more
# babies to missing data, so fit both on the complete cases for all variables.
complete <- na.omit(data[, c("bwt", "weight", "smoke_bi", "gestation")])

model_small <- lm(bwt ~ weight, data = complete)
model_large <- lm(bwt ~ weight + smoke_bi + gestation, data = complete)

anova(model_small, model_large)

Without the complete step, anova() stops with the error models were not all fitted to the same size of dataset — R’s own guard against the unfair comparison in the Common mistakes table below.

This produces an F-test asking whether the larger model explains significantly more variance than the smaller one. If yes, the added predictors are doing real work.

Analysis of Variance Table

Model 1: bwt ~ weight
Model 2: bwt ~ weight + smoke_bi + gestation
  Res.Df    RSS Df Sum of Sq      F    Pr(>F)    
1    985 317573                                  
2    983 255496  2     62077 119.42 < 2.2e-16 ***
---
Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1

Here the 987 complete cases give F(2, 983) = 119.42, p < .001: adding smoking and gestation explains significantly more birth-weight variance than mother’s weight alone.

24.8 Assumptions

Same four as simple regression:

  1. Linearity of the Y-X relationships.
  2. Independence of residuals.
  3. Normality of residuals.
  4. Homoscedasticity of residuals.

Plus one additional concern for multiple predictors:

  1. No severe multicollinearity (VIF check).

The four-panel plot(model) output checks linearity, normality, and constant variance. Independence comes from the study design, not a plot, and multicollinearity is checked with vif(). See Chapter 25 for the plots.

NoteInterpret the Output

Read this output carefully. The R code that produced it is not shown.

Coefficients:
              Estimate Std. Error t value Pr(>|t|)    
(Intercept)   53.32944    6.79975   7.843  1.1e-11 ***
study_hours    1.37431    0.35313   3.892 0.000196 ***
anxiety_score -0.14482    0.08328  -1.739 0.085624 .  
sleep_hours    0.71567    0.86650   0.826 0.411130    
---
Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1

Residual standard error: 8.98 on 86 degrees of freedom
Multiple R-squared:  0.1612,    Adjusted R-squared:  0.1319 
F-statistic: 5.508 on 3 and 86 DF,  p-value: 0.001652
  1. How many predictors are in this model? What is the outcome variable (infer from context)?
  2. The overall F is significant, but two of the three predictors are not. Is this pattern a sign of multicollinearity? What does explain the significant F, and how would you check for overlap?
  3. Interpret the slope for study_hours in one complete sentence. Use the phrase “holding other predictors constant.”
  4. Adjusted \(R^2\) = .132 but Multiple \(R^2\) = .161. Which should you use when comparing this model to a simpler one, and why?
  5. A researcher adds four more predictors to this model. Will Multiple \(R^2\) necessarily increase? Will adjusted \(R^2\) necessarily increase? Explain the difference.
  6. Write one APA 7 sentence for the study_hours coefficient.

24.9 Reporting

A multiple regression was conducted to predict baby birth weight from mother’s weight and maternal smoking status (N = 996 with complete data). The overall model was significant, F(2, 993) = 44.90, p < .001, \(R^2\) = .08, adjusted \(R^2\) = .08. Mother’s weight was a significant positive predictor, b = 0.14, SE = 0.03, 95% CI [0.09, 0.19], t(993) = 5.26, p < .001. Maternal smoking was associated with significantly lower birth weight, b = −8.35, SE = 1.11, 95% CI [−10.53, −6.16], t(993) = −7.50, p < .001. Holding mother’s weight constant, babies of smokers weighed an average of 8.35 ounces less than babies of non-smokers.

24.10 Common mistakes

Wrong Right
Interpreting coefficients when overall F is non-significant Don’t — the model isn’t reliably predicting Y
Adding every available variable as a predictor Be deliberate about which predictors are theoretically relevant
Ignoring multicollinearity warnings Always check VIF when predictors might overlap
Reporting only Multiple \(R^2\), never adjusted Report both for multi-predictor models
Interpreting a coefficient without “holding others constant” The “partial slope” interpretation requires that phrasing
Comparing \(R^2\) between models with different n (after listwise deletion) Make sure the same observations are used in both models for fair comparison

24.11 A note on stepwise selection

You’ll see references to “stepwise regression” — automatic procedures that add or remove predictors based on p-values. Don’t use them for inference. Stepwise methods produce p-values that are wildly miscalibrated because they’ve already been selected for significance. They are okay for pure prediction tasks, but for hypothesis testing, you should choose your predictors based on theory.

24.12 Quick reference

Element R code
Multiple regression lm(y ~ x1 + x2 + x3, data = data)
All predictors in data lm(y ~ ., data = data)
With interaction lm(y ~ x1 * x2, data = data)
Confidence intervals confint(model)
Model comparison (nested) anova(model_small, model_large)
Variance inflation factor library(car); vif(model)
Standardized coefficients Refit with scaled variables
Diagnostic plots par(mfrow = c(2, 2)); plot(model)
TipReporting checklist for multiple regression

24.13 The same analysis, different disciplines

Multiple regression applies wherever you want to estimate the unique effect of one predictor while statistically controlling for others.

Discipline Typical use Predictors → Outcome
Psychology Disentangling cognitive and environmental predictors Study time + prior GPA + anxiety → exam score; trauma + social support + coping style → depression
Biology Controlling for organism-level variables Age + weight + strain → drug response; temperature + light + soil type → plant growth
Sociology Modeling social determinants while controlling for demographics Education + income + region → health outcome; gender + race + age → wage

The final regression chapter covers the diagnostic plots themselves — how to read them, what they tell you, and what to do when they go bad.


TipChapter Summary

Core idea: Multiple regression predicts Y from two or more predictors simultaneously. Each slope is a partial effect — the relationship between that predictor and Y, holding all other predictors constant. This is what makes regression more informative than running separate correlations.

You should understand:

  • What “holding other predictors constant” means conceptually
  • Why adjusted R² is reported for multiple regression (it penalizes for adding predictors)
  • What multicollinearity is, why it is a problem, and how VIF detects it
  • Why stepwise regression should not be used for hypothesis testing

You should be able to do in R:

  • Fit the model: lm(Y ~ X1 + X2 + X3, data = data)
  • Check multicollinearity: library(car); vif(model)
  • Compare nested models: anova(model_small, model_large)
  • Diagnostic plots: plot(model)

Plain-language check: Two predictors — study time (hours) and sleep (hours) — both predict exam score. The slope for study time is b = 3.2. What does this mean, given that sleep is also in the model?

The one mistake to avoid: Interpreting individual predictor p-values when the overall F is not significant. If the model as a whole is not reliably predicting Y, individual coefficients cannot be trusted.

Practice: Using mtcars, regress mpg on wt and hp. Interpret the coefficient for wt. Then add cyl and compare the two models with anova(). Does adding cyl improve the model?

Key terms from this chapter are defined in the Glossary.

NoteBaby Dataset Assignment

Practice the skills from this chapter using real data: Assignment 5 — Multiple Regression

TipWork through it with a partner

Module 4: Multiple Regression works on a dataset built to demonstrate the two things this chapter warns about. Adding a genuinely useless predictor raises R² and lowers adjusted R²; adding a near-duplicate of an existing predictor leaves its coefficient almost unchanged while inflating its standard error five-fold. You also fit an interaction that turns out not to be there.

Worked in R alongside the page, in pairs, printed to PDF to hand in.

This module opens in a new tab.