Skip to main content

Model Assumptions, Diagnostics, and Remediation

A hoard of multiple different dragons stand on scales, shouting out their residuals based on the model estimates (e.g. "My residual is 0.2 tons! My residual is -0.4 tons! My residual is 0.9 tons!" A histogram to the right shows the distribution of these residuals, with text "Check: are residuals normally distributed?"

Artwork by Allison Horst

Learning Objectives

By the end of this Module, you should be able to:

The assumptions and their diagnostics

  • Explain the two assumptions that come first — validity (do the data answer the research question?) and representativeness (does the sample speak for the population you want to describe?) — and why they are checked with design knowledge rather than with a plot.
  • List the five statistical assumptions — additivity, linearity, independence of errors, equal variance (homoscedasticity), and normality of errors — and explain how we explore four of them using the residuals (which are estimates of the unobserved errors) or model comparisons, while independence is judged mainly from the study design.
  • Diagnose linearity by plotting the data with the fitted model and then using the residual–fitted plot, reading the LOESS smoother (a flexible curve that tracks the local average of the residuals) as the conditional-mean check and distinguishing it from a bounded-outcome wedge. Then check each numeric predictor for curvature with a component-plus-residual plot, and use an added-variable plot to see one predictor’s partial relationship and which points pull on its slope.
  • Diagnose normality of errors using the Q–Q plot of the residuals, and explain why this assumption matters little for the coefficients at a reasonable sample size but more for predicting individual outcomes.
  • Diagnose equal variance using the scale–location plot, and explain what heteroscedasticity (unequal residual spread) does to standard errors.
  • Identify influential observations via Cook’s distance, leverage (hat values), and the influence panel of performance::check_model().
  • Diagnose multicollinearity using the variance inflation factor (VIF) via performance::check_collinearity(), and explain why overlap among the covariates leaves a randomized treatment estimate essentially untouched.
  • Explain the additivity assumption — that the treatment effect is the same at every level of the other predictors — and what it means when a check finds otherwise: non-parallel lines mean the treatment effect differs across levels of baseline benevolence (moderation, a scale ceiling, or both), and the additive estimate becomes an overall summary. Fitting and probing interactions is PSY 653 material.

Remediation, the one-stop check, and judgment

  • Apply performance::check_model() as a one-stop visual diagnostic that consolidates the major assumption checks into a single panel.
  • Apply remediation strategies when assumptions fail: response-scale transformations, robust standard errors, bootstrap CIs, and switching to a different model class (the bridge to generalized linear models, such as the logistic regression you’ll meet in PSY 653).
  • Reason about when assumption violations matter — distinguish violations that bias point estimates from violations that distort standard errors, and use sample size to gauge robustness.
  • Run and report a sensitivity analysis — refit the model under a defensible alternative choice, compare the focal estimate across the two fits, and disclose both rather than the more agreeable one.

Overview

Where this fits — the Part 3 regression arc

Part 2 gave you a separate test for each design: a t-test for two groups, an ANOVA for several, a chi-square for a table of counts. Part 3 trades that toolbox for one tool, the linear regression model: an equation for how the average outcome changes with one or more predictors. It is also the foundation for most of the advanced models you’ll meet later in your training, from logistic and multilevel regression to structural equation models, so the ideas built in Part 3 carry forward into every one of them. The two-sample t and the one-way ANOVA from M09 turn out to be special cases of it, and the same model grows to hold several predictors at once, which is how researchers account for where people started and for other differences between them.

With a model as the tool, the work follows three steps. Modules 10–12 take one each, all on the REACH forgiveness trial you met in the Part 2 lectures:

  • M10 · Fit — what relationship does the model estimate? (slopes, intercepts, residuals, fit)
  • M11 · Query — what adjusted estimand answers the research question? (partial effects, adjusted means)
  • M12 · Check — are the model’s assumptions good enough to trust the inference? (diagnostics, remediation) · ← you are here

One workflow, three verbs: fit the model → query it for the estimand you care about → check that it’s trustworthy enough to report. The same workflow carries into those more advanced models; only the model changes.

Picture the moment just before you submit. M11’s model with site is sitting in front of you: the forgiveness workbook raised follow-up benevolence by about half a point, the confidence interval is reassuringly tight, the p-value is tiny. It is a clean, reportable result — and you believe it. Then a co-author replies to your draft with a single line: “Looks great. Did you check the assumptions?”

That question is what M12 answers. Every regression you fit in M10 and M11 came with a set of promises built into its math — that the relationship is a straight line, that the errors around the line are well-behaved, that no lone participant is quietly steering the fit. Your estimates — and the inferences you draw from them — mean what you think they mean only to the extent the relevant assumptions hold. This Module is the toolkit for checking them, and for the honest reporting that turns “I believe this result” into “I checked, and here is why it holds up.”

M10 and M11 did the fitting and the querying — the simple-linear-regression workflow, the partial-effect interpretation, the precision gain, the estimand-centered framing, the Table 2 fallacy, and the assignment-based, complete-case treatment contrast. What that two-Module arc mostly set aside was the checking.

We’ll start with the two assumptions that matter most — validity and representativeness — then list five statistical assumptions, walk through the standard diagnostic for the four that residual plots and model comparisons can explore, name when each violation actually matters (sometimes it doesn’t), and develop a remediation toolkit for the cases where it does. Most of this is hands-on with plots — the diagnostic toolkit is largely visual — and most of the substantive judgments are about magnitude (how much violation is too much?) rather than yes-or-no tests.

To keep the learning concrete and the work continuous with what you’ve already done, the running example is M11’s model with site — lm(t2_benevolence ~ t1_benevolence.c + treat + site, data = analysis) on the REACH data. You already know what this model says substantively (an adjusted treatment effect of about half a benevolence point); M12 asks whether you should believe that estimate, in light of how well the assumptions hold.

The closing section looks ahead to where the principled remedies are developed: PSY 653 takes up moderation, mediation, logistic regression, and multilevel models, and more advanced courses develop the rest — other generalized linear models (Poisson and beyond), DAG-based causal inference for designing the model in the first place, and principled missing-data methods.

What kind of question is this Module answering? M10 and M11 framed three flavors of regression question — associational / predictive, causal (RCT), and descriptive / comparative. M12 is methodological rather than substantive: we’re not asking a new question about benevolence; we’re asking whether the model’s inferences about benevolence are trustworthy under the assumptions OLS rests on. The diagnostic plots themselves are not statistics about the world — they are statistics about the model.

The shape of this Module

Eight parts, in three groups:

  • Parts 1–6 — the toolkit, one diagnostic at a time. Part 1 names the assumptions — two checked by design knowledge, then five statistical ones (four explored through the residuals, independence judged mainly from the design); Parts 2–6 build each diagnostic plot for the model with site, read it carefully, and learn the standard fix. Two practical concerns that aren’t formal assumptions — influence and multicollinearity — are covered here too, because careful analysts routinely check them alongside the assumptions.
  • Part 7 — additivity. What the assumption means for the model with site, and what a check of it finds. Checking it opens onto a whole substantive framework, moderation, that PSY 653 develops in full.
  • Part 8 — judgment. Almost no model passes every check cleanly. The closing question is the one that matters most: when is a violation big enough to change what you report? Three principles, a sensitivity-analysis workflow, a one-call check_model() summary, and an APA-style reporting template.

You don’t have to read this front-to-back to use it. When a specific plot in your own work looks off, jump straight to that Part — each can be read on its own, with pointers back to earlier Parts where it builds on them.

Packages used in this module

library(tidyverse)
library(here)
library(broom)
library(performance)

Meet the data

This Module continues with the REACH Forgiveness intervention study (Ho et al., 2024, BMJ Public Health · PDF) introduced in M10 and developed in M11. Headline facts (from M10 and M11):

  • A multisite waitlist-controlled RCT of a 2–3 hour self-directed forgiveness workbook.
  • N = 4,598 adults across six sites in five countries; 2-week follow-up.
  • Course outcome: the TRIM-18 benevolence subscale (items 13–18 in our file, averaged). Higher = more forgiving. This is our choice; the paper’s primary forgiveness outcome combined all 18 TRIM items into one unforgiveness score.
  • Predictors of central interest: treat (Control vs Treatment), t1_benevolence (continuous, 1–5), and site (six-level factor).

We load the data exactly as in M11 — set the factor reference categories explicitly, listwise-delete on the model’s variables, center baseline benevolence, and refit the model with site as the running example:

reach <- read_rds(here("data", "reach_analysis.Rds"))
analysis <- reach |>
  drop_na(t2_benevolence, t1_benevolence, treat, site) |>
  mutate(
    treat = fct_relevel(treat, "Control"),
    site = fct_relevel(site, "Colombia"),
    t1_benevolence.c = t1_benevolence - mean(t1_benevolence)
  )

m2 <- lm(t2_benevolence ~ t1_benevolence.c + treat + site, data = analysis)

m2 |> tidy(conf.int = TRUE)

The main results from M11: the adjusted treatment effect is about 0.500 benevolence points (95% CI roughly [0.449, 0.550]); the slope for baseline benevolence is about 0.572 (comparing participants whose baseline benevolence differs by one point, in the same arm and site, the model predicts follow-up scores about 0.57 points apart); the model accounts for about 40.0% of the variation in T2 benevolence. Those are the numbers we’ll ask whether to trust.

A note on missing data (carried over from M10 and M11). Throughout PSY 652 we handle missing data with drop_na() — listwise deletion — a placeholder approach that M05 (Describing Data with R) explains in full and that M10 revisited for the risk of differential attrition in a trial. Listwise deletion always costs precision, and it can be biased when whether a participant has a follow-up score is related to the outcome in ways the analysis doesn’t account for. Data missing completely at random (MCAR) protect against that bias, but MCAR is one simple condition that does so, not the only one, and real attrition rarely satisfies it. More advanced courses develop the principled missing-data toolkit (multiple imputation via the mice package, FIML for SEM, the Rubin MCAR / MAR / MNAR taxonomy). For this Module’s diagnostics, we work with the listwise-deleted sample exactly as M11 did so the diagnostics speak to the same fitted model whose substantive interpretation you already know. Ho et al. themselves kept every participant in the analytic sample (an intention-to-treat analysis after multiple imputation), so our model with site is a teaching analysis, not a reproduction of their estimate.


Part 1 — The assumptions and the diagnostic toolkit

Two assumptions that come first

Gelman, Hill, and Vehtari’s Regression and Other Stories (ROS for short; Section 11.1) lists the assumptions of regression “in decreasing order of importance,” and the top two are not about residuals at all. Both are checked with design knowledge — what was measured, who was sampled, who was left out — rather than with a plot.

  1. Validity. “Most important is that the data you are analyzing should map to the research question you are trying to answer.” The question here is whether the workbook increases forgiveness. Our outcome is the TRIM-18 benevolence subscale: a self-report, two weeks after baseline, of benevolent motivations toward the person who hurt the participant. As the data section notes, that subscale is the course’s choice; the trial’s primary forgiveness outcome combined all 18 items. So validity asks: does a two-week self-report of benevolence capture the forgiveness the question is about? The 1–5 scale also has a ceiling — about 10.8% of the analysis sample score the maximum of 5 at follow-up — which limits how much change the measure can register for participants who start near the top.
  2. Representativeness. A regression estimate describes the population the sample stands for. REACH participants were adults who volunteered at six sites in five countries, so the half-point effect speaks most directly to people like them — and how far it generalizes is a substantive judgment, not something a diagnostic plot can settle. ROS adds a rule worth remembering: “Selection on x does not interfere with inferences from the regression model, but selection on y does.” A sample that over-represents people with high baseline benevolence is no threat on its own, because the model conditions on baseline benevolence — as long as the model correctly describes how the outcome depends on it. (Part 7 shows why that caveat matters here: when the treatment effect varies with baseline benevolence, the additive average depends on who was sampled.) But our complete-case sample leaves out 633 enrolled participants — exactly those without a follow-up score. If whether someone has a T2 score is related to what that score would have been — the differential-attrition concern in the missing-data note above — that is selection on the outcome, and it can bias the estimate.

No residual plot can rescue a model whose outcome misses the question or whose sample misses the population, which is why these two come first. The rest of this Module takes up five statistical assumptions; residual plots and model comparisons can explore four of them.

Five statistical assumptions

Beyond validity and representativeness, every OLS regression rests on five assumptions that determine how safely we can interpret its estimates and inferences. They are sometimes assembled under the acronym LINE (Linearity, Independence, Normality, Equal variance), with Additivity as a fifth sibling that’s often folded into linearity but deserves its own attention in MLR. The table below lists them in ROS’s decreasing order of importance (validity and representativeness hold ranks 1 and 2), with the standard diagnostic for each and what failure typically looks like in the data. LINE is a memory aid, not a ranking: its N (normality) is the least important of the five. Four of them — linearity, additivity, equal variance, and normality — can be explored with residual diagnostics or model comparisons. The fifth, independence of errors, calls first for attention to the study design, such as clustering or repeated observations.

Importance Assumption What it says Standard diagnostic What failure looks like
3 Additivity and linearity Each predictor’s slope or contrast is the same across values of the other predictors (additivity), and the conditional mean of the outcome (the average outcome among people with the same predictor values) is a linear function of the predictors (linearity). Interaction-model fit and slopes by subgroup (additivity); residual–fitted plot (linearity) Slopes that fan out or cross when broken out by another predictor; a LOESS smoother that bends away from zero in a systematic shape
4 Independence of errors Conditional on the predictors, the population errors are statistically independent — knowing one tells you nothing about another. The residuals are used as imperfect diagnostics. Design knowledge + (for clustered data) cluster-level diagnostics Residuals correlated within clusters; serial correlation in time-series data
5 Equal variance (homoscedasticity) The variance of the errors is the same whatever the predictor values (checked via the residuals, usually across the range of \(\hat{y}\)). Scale–location plot (\(\sqrt{|\text{standardized residual}|}\) vs \(\hat{y}\)) Visible “funnel” or “wedge” — residuals fanning in or out as \(\hat{y}\) changes
6 Normality of errors The errors follow a Normal distribution — the condition that makes small-sample t/F inference exact; approximately Normal errors give approximately correct inference (checked via the residuals). Q–Q plot Points deviating systematically from the diagonal in the plot’s tails

Two of these we’ve effectively already touched on in M10 and M11. Independence first. M11 added site to the model because of the design: REACH randomized participants within each site, and the site terms absorb the between-site differences in mean benevolence. ROS (Section 18.5) states the general rule — when a design groups participants, the grouping “should be accounted for in the analysis to remove bias and to get appropriate uncertainty bounds.” Whether participants within a site remain correlated after that adjustment is a separate question, and it’s worth being precise about what the site terms buy.

Adding site as a categorical predictor adjusts for systematic between-site mean differences and aligns the model with the multisite design. It does not guarantee that the residuals are independent within a site. If participants from the same site remain correlated after adjusting for site means, the usual OLS standard errors can still be too optimistic — and the fuller remedies are cluster-robust standard errors or mixed-effects models. Both need more than a handful of clusters: with only six sites, cluster-robust standard errors tend to run too small unless small-sample corrections are used (Cameron & Miller, 2015). For the treatment effect specifically, the risk is small: treatment was assigned person by person within each site, so leftover within-site resemblance mainly affects the standard errors of predictors that cluster by site. Notice, too, that independence is the one assumption among these five that never gets a diagnostic figure in this Module. That’s deliberate: any remaining within-site correlation is invisible to a single plot, so the check is design knowledge, not a picture — this paragraph and Part 8’s remediation table are its home in this Module. Multilevel (mixed-effects) models, which PSY 653 takes up, are where within-cluster dependence becomes something you can actually estimate.

Linearity got a brief preview in M10 (M10’s check, before fitting, of whether a straight-line summary is appropriate) — but the post-fit diagnostic is what M12 develops in Part 2. The remaining three — additivity, equal variance, and normality — are new checks for M12. We’ll also add two practical concerns that aren’t strictly OLS assumptions but matter enough to be part of any working diagnostic routine: influence (whether a few observations are disproportionately pulling the fit) and multicollinearity (whether the model can attribute outcome variation between predictors when they’re highly correlated). Only perfect collinearity, where one predictor is an exact linear combination of the others, breaks the fit itself: R can’t estimate the coefficients separately and reports NA for one of them.

A note on what diagnostics are

Before we dive into the toolkit, a small framing point. The diagnostic plots are not hypothesis tests with binary verdicts. Q–Q plots almost never look perfectly straight; residual–fitted plots almost always have some visible pattern; influence metrics almost always identify some point or two with above-average values. The right question is rarely “is this assumption violated?” and almost always “is the violation large enough — given my sample size and inferential goal — to change what I should report?” That judgment is built up over time, and the goal of Part 8 below is to start naming the heuristics that guide it.

With that framing in hand, on to the toolkit.


Part 2 — Linearity

The linearity assumption says that the conditional mean of \(Y\) — the average outcome among people who share the same predictor values — is a linear function of the predictors:

\[E[Y_i \mid X_{1i}, X_{2i}, \ldots, X_{ki}] \;=\; \beta_0 \;+\; \beta_1 X_{1i} \;+\; \beta_2 X_{2i} \;+\; \cdots \;+\; \beta_k X_{ki}\]

If the true conditional-mean surface bends at any one of the predictors — quadratic, exponential, sigmoidal — fitting a straight-line model produces systematically biased predictions in the regions where the curve departs from a line. The standard post-fit diagnostic is the residual–fitted plot — but ROS (Section 11.2) recommends a step before it: plot the data with the fitted model drawn on top.

Start with the data and the fitted model

The figure below puts each participant’s baseline (T1) and follow-up (T2) benevolence on the same axes, colored by arm as in M11, and adds the model’s two fitted lines. The model also contains site, so each line averages the six sites’ predictions, weighting each site by how many participants it contributed (M11’s averaging idea). expand_grid() builds every combination of nine baseline benevolence values (1 to 5 in steps of 0.5), the two arms, and the six sites; predict() gives each row its fitted value; and the weighted average collapses the sites. The points are lightly jittered and nearly transparent, because the benevolence scale takes only a limited set of values and many participants share each one.

t1_mean <- analysis |> pull(t1_benevolence) |> mean()

# Each site's share of the sample, for the weighted average over sites
site_shares <- analysis |>
  count(site) |>
  mutate(share = n / sum(n), site = as.character(site))

# Every combination of baseline benevolence (1 to 5), arm, and site
line_grid <- expand_grid(
  t1_benevolence = seq(1, 5, by = 0.5),
  treat = c("Control", "Treatment"),
  site = site_shares |> pull(site)
) |>
  mutate(t1_benevolence.c = t1_benevolence - t1_mean)   # the centered scale the model uses

# Predict each row, then average over sites, weighted by their shares
m2_lines <- line_grid |>
  mutate(fit = predict(m2, newdata = line_grid)) |>
  left_join(site_shares, by = "site") |>
  group_by(t1_benevolence, treat) |>
  summarize(estimate = sum(fit * share), .groups = "drop")

analysis |>
  ggplot(aes(x = t1_benevolence, y = t2_benevolence, color = treat)) +
  geom_jitter(width = 0.05, height = 0.05, alpha = 0.18, size = 1.0) +
  geom_hline(yintercept = 5, color = "#1C2433", linetype = "dashed",
             linewidth = 0.6) +
  geom_line(data = m2_lines, aes(y = estimate), linewidth = 1.3) +
  scale_color_manual(values = c("Control" = "#348C9E", "Treatment" = "#945297")) +
  scale_x_continuous(breaks = 1:5) +
  scale_y_continuous(breaks = 1:5) +
  labs(
    x = "T1 benevolence (1–5)",
    y = "T2 benevolence (1–5)",
    title = "The data with the model's fitted lines",
    subtitle = "Lines averaged over sites. Dashed line = the scale's ceiling of 5.",
    color = "Condition"
  ) +
  theme(legend.position = "top")

Scatterplot of T1 baseline benevolence (x-axis, 1 to 5) against T2 follow-up benevolence (y-axis, 1 to 5) for the analysis sample, jittered points in teal for Control and heather for Treatment, with the model's two fitted lines averaged over sites. The two lines rise from lower left to upper right and are parallel, with the Treatment line above the Control line by the same amount at every baseline benevolence score. A dense horizontal band of points sits along the top of the plot at T2 = 5, marked by a dashed line, while the fitted lines stay below 5 even at the highest baselines.

Two features of this picture carry through the rest of the Module.

  • The lines are parallel. The model is additive, so it draws the same Treatment − Control gap (about 0.50 points) at every level of baseline benevolence. That is the model’s assumption, not something the data have confirmed — Part 7 looks at what a check of it finds.
  • The data pile up at the ceiling. The dense band along the dashed line is the 10.8% of participants who score 5 at follow-up. Toward the right of the plot, many observed scores sit at exactly 5 while the fitted lines stay below it, so the points there can sit far below the line but only a little above it. Keep this band in mind; it comes back in nearly every diagnostic that follows.

The residual–fitted plot

Before you look at our model’s version, take a guess: the outcome is bounded 1–5, and most participants score high — so what shape must the residual cloud take near the top of the fitted range, even if the model is perfectly specified? Keep that guess in mind. The residual–fitted plot puts \(\hat{y}_i\) on the x-axis and the residual \(y_i - \hat{y}_i\) on the y-axis. (Why fitted values rather than the observed \(y_i\)? Residuals are correlated with the observed outcome even when the model is exactly right, so a plot against \(y_i\) shows a slope no matter what; against \(\hat{y}_i\), OLS residuals have zero correlation by construction, so any leftover pattern is informative. The second Going-further box below, on what a correct model’s residual plot looks like, demonstrates this with simulated data.) If the linearity assumption holds, the residuals should scatter randomly around zero across the whole range of \(\hat{y}\) — no curved trend, no fanning out, no leftover pattern. We add a LOESS smoother that tracks the conditional mean of the residuals at each fitted value; that smoother is the main linearity check: if linearity holds, the average residual is zero at every fitted value. (The part of the model that predicts each participant’s average score, the intercept and the slopes, is often called the model’s mean structure; a smoother that bends says the mean structure is missing a pattern in the data.) (That is a necessary condition, not a sufficient one, because patterns in different predictors can cancel out; see the cautions below.)

How a LOESS smoother works. Picture a window sliding along the x-axis. At each spot, LOESS looks only at the points nearby (by default, the closest 75% of the data, with the very closest counting the most), fits a gentle curve to just those points, and keeps that curve’s height at the center of the window. Slide the window across the x-axis, connect the heights, and you have the smoother. Because each piece uses only nearby points, the smoother can follow a bend that a single straight line would miss, which is what makes it a good detector of leftover curvature. At the sparse ends of the x-axis, the window has fewer neighbors and they all sit on one side, so the smoother there is less certain and wobbles more: trust the middle, where most of the data are, more than the tips.

m2 |>
  augment() |>
  ggplot(aes(x = .fitted, y = .resid)) +
  geom_jitter(width = 0.0, height = 0.05, alpha = 0.18,
              color = "#4E5EAA", size = 1.0) +
  geom_hline(yintercept = 0, color = "#1C2433", linetype = "dashed",
             linewidth = 0.7) +
  geom_smooth(method = "loess", formula = y ~ x, se = FALSE,
              color = "#C05852", linewidth = 1.2) +
  labs(
    x = expression(hat(y) ~ "(predicted T2 benevolence)"),
    y = "Residual (observed − predicted)",
    title = "Residual–fitted plot for the model with site",
    subtitle = "Want: LOESS smoother (rose) close to zero across the fitted range."
  )

Residual-versus-fitted plot for the model with site (predicted T2 benevolence on the x-axis, residual on the y-axis). A rose LOESS smoother tracks the conditional mean of the residuals and hugs the dashed zero line through the middle of the fitted range and dips below zero at both sparse ends, broadly supporting the linearity assumption; the point cloud tilts into a downward wedge that reflects the 1-to-5 bounded outcome, not a linearity violation.

There’s a lot going on in this plot, so it’s worth slowing down. The first thing the eye picks up is a clear downward-slanting edge along the top of the cloud (plus diagonal stripes, one per possible score) — at low \(\hat{y}\), most residuals sit a little below zero while a few run far above it (a long upper tail); at high \(\hat{y}\), most sit a little above zero while a few run far below it (a long lower tail). That slant looks alarming at first glance (an obvious diagonal in a plot that’s “supposed to” look like an unstructured cloud), but most of what you’re seeing is not a linearity violation. It’s a structural consequence of T2 benevolence being bounded between 1 and 5.

The bounded-outcome wedge

To see why, fix \(\hat{y}\) at a value and ask what residuals are arithmetically possible. At \(\hat{y} = 2.5\), residuals can run from \(1 - 2.5 = -1.5\) (an observed score at the floor) to \(5 - 2.5 = +2.5\) (a score at the ceiling). At \(\hat{y} = 4.5\), the same arithmetic squeezes residuals to between \(-3.5\) and \(+0.5\) — positive residuals are mechanically capped on the high end of the predicted range, and negative residuals are capped on the low end. The room between zero and the nearer boundary therefore shrinks as \(\hat{y}\) approaches it — residuals can no longer spread symmetrically — and the residual distribution becomes skewed at high \(\hat{y}\), because the ceiling cuts off large positive residuals long before the floor cuts off large negative ones. The downward wedge appears when many scores press against the bounds of a scale modeled with OLS, regardless of whether the underlying relationship is genuinely linear.

The arithmetic above says the wedge comes from the cap on the scale, not from a bad model. You can watch that happen. The code below makes up 2,000 people whose scores follow an exact straight line plus random noise, then records the same scores twice: once as they are, and once held inside 1 to 5, the way a rating scale records anyone who “would have” scored above 5 as a 5. Nothing else differs between the two versions.

set.seed(652)
wedge_demo <- tibble(
  x = runif(2000, min = 1, max = 5),                             # e.g., a baseline score
  y_uncapped = 1.6 + 0.65 * x + rnorm(2000, mean = 0, sd = 0.8)  # straight-line truth, no limits
) |>
  mutate(y_capped = pmin(pmax(y_uncapped, 1), 5))                # same scores, held inside 1 to 5

fit_uncapped <- lm(y_uncapped ~ x, data = wedge_demo)
fit_capped   <- lm(y_capped ~ x, data = wedge_demo)

wedge_resid <- bind_rows(
  fit_uncapped |> augment() |> mutate(version = "Uncapped scores", at_ceiling = FALSE),
  fit_capped |> augment() |> mutate(version = "Capped at 1 and 5", at_ceiling = y_capped == 5)
) |>
  mutate(version = fct_inorder(version))

wedge_resid |>
  ggplot(aes(x = .fitted, y = .resid)) +
  geom_point(aes(color = at_ceiling), alpha = 0.35, size = 1.0) +
  geom_hline(yintercept = 0, color = "#1C2433", linetype = "dashed", linewidth = 0.7) +
  geom_abline(data = tibble(version = factor("Capped at 1 and 5", levels = wedge_resid |> pull(version) |> levels())),
              aes(intercept = 5, slope = -1), color = "#945297", linetype = "dotted", linewidth = 0.9) +
  geom_smooth(method = "loess", formula = y ~ x, se = FALSE, color = "#C05852", linewidth = 1.2) +
  scale_color_manual(values = c(`FALSE` = "#4E5EAA", `TRUE` = "#945297"),
                     labels = c("Below the ceiling", "Scored exactly 5"), name = NULL) +
  facet_wrap(~ version) +
  labs(
    x = expression(hat(y) ~ "(predicted score)"),
    y = "Residual (observed − predicted)",
    title = "Same people, same straight-line truth: the cap creates the wedge"
  ) +
  theme(legend.position = "top")

Two side-by-side residual-versus-fitted plots for the same 2,000 simulated people. Left panel, uncapped scores: indigo points form an even horizontal band around the dashed zero line, and the rose LOESS smoother runs flat along zero. Right panel, scores capped at 1 and 5: the people who scored exactly 5 are heather and fall on a dotted diagonal line with a slope of minus 1, which forms the top edge of a downward-slanting wedge; the points below that edge spread farther downward than upward near the top of the fitted range, and the rose smoother stays close to zero, dipping slightly at the top end.

Read the two panels side by side:

  • The uncapped panel is an even band around zero, as it should be: the straight-line model is exactly right for these scores.
  • In the capped panel, the people at the ceiling line up. The 9.6% who score exactly 5 (heather) all have a residual of \(5 - \hat{y}\), so they fall on one straight line with a slope of −1 (dotted). That line is the top edge of the wedge: as \(\hat{y}\) climbs toward 5, the biggest possible positive residual shrinks toward zero. In the top tenth of predictions, the largest positive residual is 0.56 with the cap, against 1.75 without it.
  • Below that edge, the residuals stretch downward. Nothing stops a score from falling far below its prediction, so near the top the residuals get a long lower tail: among the highest third of predictions, their skew is -0.77 with the cap, against -0.10 without it. That’s the same negative skew the REACH Q–Q plot shows in Part 3.
  • The smoothers barely move. Both stay close to zero; the capped one dips slightly at the top end, because capping flattens the average score near 5.

So a wedge tells you that many scores press against a ceiling (or a floor). It does not, by itself, tell you the straight-line model is wrong. The smoother is still the part to read.

So the cloud isn’t the right thing to read for the linearity check — read the LOESS smoother instead; as noted above, it estimates the average residual at each fitted value. If the underlying relationship is approximately linear, the conditional mean should be approximately zero across the full range of \(\hat{y}\), and the smoother should stay close to the dashed reference line. Reading our plot through the smoother: it hugs zero through the middle of the fitted range, where most participants sit, and dips at both ends, where few do: in the lowest and highest tenths of the predictions, the average residual is -0.22 and -0.20. Part 7 reports that the treatment effect varies with baseline benevolence, and leaving that out of the model is enough to produce dips like these: for the interaction model, the lowest and highest tenths of its own predictions average -0.01 and -0.08 — once the interaction is in the model, the low-end dip all but disappears and the high-end dip shrinks. A ceiling alone can bend the ends this way too: the average observed score flattens as it nears 5, so a straight line runs above it at both ends. Where most participants sit, the plot shows little evidence against linearity for the model with site; Part 7 takes up what the ends are telling us.

The wedge does carry a second concern — non-constant residual spread, since the typical size of the residuals shrinks toward the ceiling. That’s the equal-variance assumption, which Part 4 takes up. The point for now: the wedge is the boundedness story; the smoother is the linearity story, and they’re separate concerns.

Two cautions before moving on. First, the mechanical wedge is never itself a linearity verdict — but a smoother that bends systematically away from zero is still real evidence that the conditional mean is being missed, and boundedness doesn’t excuse it. Second, the residual–fitted plot is an overall signal: it can tell you the model is missing structure, but in a multiple regression it usually can’t tell you which predictor is responsible — the bend could come from baseline benevolence, from an omitted variable, or from a treatment × baseline-benevolence interaction. To localize the culprit, look at one predictor at a time with a component-plus-residual plot, shown later in this Part (Fox, 2016).

A good way to learn to read a residual plot is to draw one for data where you know the model is right. ROS (Section 11.3) does this with simulation, and the same steps work for our model: simulate a new outcome vector from the fitted model itself (each participant’s fitted mean plus a Normal error with SD \(\hat{\sigma}\)), refit the same formula to the simulated outcome, and redraw the plot.

t2_simulated <- simulate(m2, nsim = 1, seed = 652) |> pull(sim_1)

analysis_sim <- analysis |>
  mutate(t2_simulated = t2_simulated)

m2_sim <- lm(t2_simulated ~ t1_benevolence.c + treat + site, data = analysis_sim)

m2_sim |>
  augment() |>
  ggplot(aes(x = .fitted, y = .resid)) +
  geom_point(alpha = 0.18, color = "#4E5EAA", size = 1.0) +
  geom_hline(yintercept = 0, color = "#1C2433", linetype = "dashed",
             linewidth = 0.7) +
  geom_smooth(method = "loess", formula = y ~ x, se = FALSE,
              color = "#C05852", linewidth = 1.2) +
  labs(
    x = expression(hat(y) ~ "(predicted simulated T2 benevolence)"),
    y = "Residual (simulated − predicted)",
    title = "Residual–fitted plot, refit to simulated data",
    subtitle = "The model is correct by construction here."
  )

Residual-versus-fitted plot for the model with site, refit to one simulated outcome drawn from that model itself. The indigo points form an even horizontal band of roughly constant height around the dashed zero line across the whole fitted range, with no downward wedge, and the rose LOESS smoother stays close to zero.

The downward wedge is gone. The simulated outcomes are not held inside 1–5 — 7.3% land above 5 and 1.1% below 1 — so nothing squeezes the residuals near the top of the range, and the band keeps an even height everywhere. Because the mean structure is the same in both versions, this is consistent with the arithmetic above: the wedge comes from the outcome’s bounded, limited-value scale, not from a mis-specified mean.

The same simulated data show why we plot residuals against fitted values. Here the model is correct by construction, yet the residuals still correlate r = .77 with the simulated outcome — a plot against the outcome would show a strong upward slope for a perfectly good model. Against the fitted values, the correlation is zero. As ROS puts it, “This simulation shows why we prefer to plot residuals versus predicted rather than observed values.”

Reading the residual–fitted plot

What you see What it means
Smoother flat near zero (small wiggles, especially at the sparse ends, are expected by chance) Little evidence against linearity
Smoother bends upward at high \(\hat{y}\) Model under-predicts at the top; relationship may be concave-up
Smoother bends downward at high \(\hat{y}\) Model over-predicts at the top; ceiling effect or concave-down relationship
Smoother U-shaped (or an upside-down U) Something is missing from the mean: a curved term for one predictor, an interaction, or a floor or ceiling of the scale; look one predictor at a time to narrow it down
Wedge or funnel in the cloud Bounded outcome (mechanical) and/or heteroscedasticity — read Part 4
Single outlier far from the cloud Possible outlier — check its influence (Part 5)

A numeric companion to the plot: binned residual checks. The LOESS smoother is a continuous version of a simpler idea you can compute by hand: cut the fitted values into a few equal-count bins (cut_number() from ggplot2), then take the mean and SD of the residuals within each bin. If linearity holds, every bin’s mean residual should sit near zero — the numeric analog of a flat smoother (for the model with site, all three bin means land within a few hundredths of zero, with no monotone drift; three bins are coarse, though: with ten bins, the lowest and highest tenths show the smoother’s end dips, at -0.22 and -0.20). The bin SDs preview Part 4’s equal-variance question: for this model they decline gently from the low-\(\hat{y}\) bin to the high-\(\hat{y}\) bin — the ceiling squeeze, in numbers. The pre-study has you build exactly this check in WebR.

Which predictors need a linearity check?

The linearity assumption is about numeric predictors. For baseline benevolence, it says that each one-point step adds the same amount to predicted T2 benevolence (0.572 points), whether the step is from 1 to 2 or from 4 to 5. If the real relationship bends or flattens, one slope can’t capture it.

The model’s other two predictors have no line that could bend:

  • Treatment has two values. The model gives each arm its own adjusted mean, and the treatment coefficient is the gap between them. A straight line always passes through two points, so there is no curve for it to miss. (Whether the treatment effect is the same at every baseline level is a different assumption, additivity, which Part 7 takes up.)
  • Site enters as five dummy variables, one for each site except the reference site, Colombia. Each site gets its own adjusted mean, and the six sites have no order, so there is no shape across them to get wrong.

So in the model with site, baseline benevolence is the one predictor to check. In your own models, check every numeric predictor. A categorical predictor entered as a factor gets one mean per level, so linearity doesn’t apply to it. If an ordered category (say, education coded 1 to 4) enters as a number instead, the model assumes equal steps between levels, and that predictor needs the same check.

The standard check for one numeric predictor is the component-plus-residual plot (Fox, 2016). For each participant, it adds two pieces you already have:

  1. The component: baseline benevolence’s part of the prediction, its coefficient times the participant’s centered baseline score. Plotted against baseline benevolence, these fall on a straight line: the model’s straight-line assumption for this predictor.
  2. The residual from the full model: what the model missed for that participant.

The sum is each participant’s T2 benevolence with the intercept, treatment, and site parts of the prediction subtracted out. Plot it against baseline benevolence itself and add a LOESS smoother. If the smoother follows the line, the straight line works for this predictor. If it bends away (a U-shape, a wave, or a flattening at one end), the line is missing a curve.

# Baseline benevolence's coefficient in the model with site
b1_baseline <- m2 |>
  tidy() |>
  filter(term == "t1_benevolence.c") |>
  pull(estimate)

m2 |>
  augment(data = analysis) |>
  mutate(
    component = b1_baseline * t1_benevolence.c,    # baseline benevolence's part of the prediction
    component_plus_residual = component + .resid   # plus what the model missed
  ) |>
  ggplot(aes(x = t1_benevolence, y = component_plus_residual)) +
  geom_jitter(width = 0.04, height = 0, alpha = 0.15, color = "#4E5EAA", size = 1.0) +
  geom_line(aes(y = component), color = "#C05852", linewidth = 1.2) +
  geom_smooth(method = "loess", formula = y ~ x, se = FALSE,
              color = "#1C2433", linetype = "dashed", linewidth = 0.9) +
  labs(
    x = "Baseline benevolence (1–5)",
    y = "Component + residual",
    title = "Component-plus-residual plot for baseline benevolence",
    subtitle = "Rose line = the model's straight line for this predictor. Dashed = LOESS smoother."
  )

Component-plus-residual plot for baseline benevolence in the model with site: baseline benevolence from 1 to 5 (x-axis) against each participant's component plus residual (y-axis, about -3 to 2), one indigo point per participant, stacked in narrow columns at the scale's possible scores and densest between 2 and 4.5. The rose line rises from about -1.2 at a baseline of 1 to about 1 at 5. The dashed LOESS smoother lies almost on top of it across the whole range, falling slightly below it at the far right. The cloud's upper edge stays near 2 all the way across, so toward the right, where the line rises, there is less room above the line than below it.

The dashed smoother follows the rose line across almost the whole range: in every tenth of baseline scores, the points’ average sits within 0.11 points of the line. The largest gap is in the top tenth, below the line. Participants who started near 5 had little room to score higher at T2, the same ceiling squeeze you saw in the residual–fitted plot. So there is little evidence that baseline benevolence’s line should bend. A clear U-shape or wave in this plot would point to a missing curve in this predictor, and a poly() term is the first remedy to try (see What to do when linearity fails below).

car::crPlots() draws the same kind of plot for every predictor in one call. For factors such as treatment and site, it draws one box per level instead, because there is no line to bend. The hand-built version above shows what goes into the plot.

One predictor’s partial relationship · the added-variable plot

The component-plus-residual plot asks whether one predictor’s line should bend. The added-variable plot (also called a partial regression plot) asks a different question: what does one predictor’s relationship with the outcome look like once the other predictors are held constant, and which points pull hardest on its slope? It removes from both the outcome and the focal predictor the part the other predictors can explain with a straight line, then plots what’s left of one against what’s left of the other. For baseline benevolence in the model with site, the recipe takes two regressions you already know how to fit:

  1. Regress T2 benevolence on every predictor except baseline benevolence (here, treatment and site), and keep the residuals.
  2. Regress baseline benevolence on those same other predictors, and keep those residuals.
  3. Plot the first set of residuals against the second.
# Step 1: T2 benevolence, with treatment and site partialled out
y_partial <- lm(t2_benevolence ~ treat + site, data = analysis) |>
  augment() |>
  pull(.resid)

# Step 2: baseline benevolence, with treatment and site partialled out
x_partial <- lm(t1_benevolence.c ~ treat + site, data = analysis) |>
  augment() |>
  pull(.resid)

avp_t1 <- tibble(x_partial, y_partial)

avp_t1 |>
  ggplot(aes(x = x_partial, y = y_partial)) +
  geom_point(alpha = 0.15, color = "#4E5EAA", size = 1.0) +
  geom_smooth(method = "lm", formula = y ~ x, se = FALSE,
              color = "#C05852", linewidth = 1.2) +
  geom_smooth(method = "loess", formula = y ~ x, se = FALSE,
              color = "#1C2433", linetype = "dashed", linewidth = 0.9) +
  labs(
    x = "Baseline benevolence, after partialling out treatment and site",
    y = "T2 benevolence, after partialling out treatment and site",
    title = "Added-variable plot for baseline benevolence",
    subtitle = "Rose line = OLS fit (its slope is the model's coefficient). Dashed = LOESS smoother."
  )

Added-variable plot for baseline benevolence in the model with site: baseline benevolence after partialling out treatment and site (x-axis) against T2 benevolence after partialling out treatment and site (y-axis), one indigo point per participant. The cloud rises from lower left to upper right. Its upper edge is flat: participants at the scale's ceiling of 5 form horizontal bands near 1 to 2 on the y-axis, so toward the right, where the line rises toward those bands, there is less room above the line than below it. The rose OLS line and the dashed LOESS smoother nearly coincide across the whole range, with the smoother dipping slightly below the line at the far right.

The slope of the rose line is 0.572, exactly the model’s coefficient on baseline benevolence. That is a mathematical identity (the Frisch–Waugh–Lovell theorem), not a coincidence: the coefficient is the slope of this partialled-out relationship, so the plot is a picture of what “holding the other predictors constant” means. Read it for two things:

  • Whether this one predictor’s relationship looks straight, with a caution. The dashed LOESS smoother tracks the rose line closely across the whole range: in every tenth of the x-axis, the points’ average sits within 0.11 points of the line. The largest gap, in the highest tenth, is below the line, where high-baseline participants press against the ceiling. The caution: because the x-axis is what’s left of baseline benevolence rather than baseline benevolence itself, an added-variable plot tends to straighten out curvature when the focal predictor is correlated with the others (Fox, 2016). That’s why the component-plus-residual plot in the previous section, whose x-axis is the predictor itself, is the curvature check. Here the two plots agree, because randomization leaves baseline benevolence nearly unrelated to treatment and only weakly related to site.
  • Which points have the most pull on this one slope. Points far out on the x-axis, with unusual baseline benevolence for their arm and site, have the most leverage over the baseline-benevolence coefficient. Part 5 measures leverage and influence for the whole model.

For a binary predictor like treatment, the x-axis collapses into two narrow bands, so its added-variable plot shows the adjusted group contrast rather than a curve to inspect; the plot is most useful for continuous predictors.

What to do when linearity fails

None of what follows is needed for the model with site — its smoother stays near zero where most participants sit — but keep these for the day yours doesn’t. When the LOESS smoother shows a substantive bend (not just edge wiggles), the standard remedies are (see also ROS, Section 11.1):

  • Add a polynomial term to the predictor responsible for the bend: lm(y ~ poly(x, 2) + ...) for a quadratic, poly(x, 3) for a cubic.
  • Transform the predictor: replace \(x\) with \(\log(x)\), \(\sqrt{x}\), or \(1/x\) when the bend suggests a particular functional form. These straighten a bend that runs one way; a U-shape needs a polynomial or a spline.
  • Transform the outcome so that an additive, linear model becomes reasonable. ROS (Section 12.4): “It commonly makes sense to take the logarithm of outcomes that are all-positive.” A linear model for \(\log(y)\) is a multiplicative model on the original scale — each predictor multiplies the predicted outcome by a constant factor rather than adding a fixed amount — which often matches how incomes, reaction times, or prices behave. Steadier variance and less skew are a welcome second benefit. Outcome transformations change the model’s interpretation and should be reasoned about substantively. A log does not fix a bounded 1–5 outcome like benevolence: its trouble is the floor and ceiling, not positivity or multiplicative growth.
  • Use splines or generalized additive models (GAMs) for relationships whose shape isn’t well described by a single transformation: a spline is a chain of short polynomial pieces joined smoothly, and a GAM fits one for each predictor.

All four — polynomial regression, transformations, splines, GAMs — are developed in detail in more advanced courses.


Part 3 — Normality of errors

The normality assumption is really about the model’s errors — that they are approximately Normally distributed — which we diagnose using the residuals they leave behind. Where does normality matter? Not for the OLS coefficient estimates themselves — least-squares estimates are unbiased regardless of the error distribution — and, it turns out, not much for large-sample inference either. The usual standard-error formula leans mainly on independence, correct mean specification, and constant variance, not on residuals being perfectly Normal. What normality buys you is exact small-sample t and F inference: it’s the assumption that makes those reference distributions exact when n is small. With a large sample, the coefficient estimates are approximately Normal under much weaker conditions (the Central Limit Theorem), so mild residual non-normality is rarely a serious problem.

The standard diagnostic is the Q–Q plot (quantile–quantile plot) of the standardized residuals: each residual divided by its estimated standard deviation, so it reads in SD units (beyond ±2 is unusual).

The Q–Q plot

A Q–Q plot orders the residuals from smallest to largest and plots them against the corresponding quantiles of a standard Normal distribution. If the residuals are Normal, the points should fall along the diagonal. Deviations from the diagonal — especially in the tails — signal departures from normality. Before you scroll to ours: given the ceiling, which tail of the residuals would you expect to stray from the line — the upper or the lower?

m2 |>
  augment() |>
  ggplot(aes(sample = .std.resid)) +
  stat_qq(color = "#4E5EAA", alpha = 0.30, size = 1.0) +
  stat_qq_line(color = "#C05852", linewidth = 1.0) +
  labs(
    x = "Theoretical quantile (standard Normal)",
    y = "Standardized residual",
    title = "Q–Q plot of the standardized residuals",
    subtitle = "Points on the diagonal = approximately Normal."
  )

Normal quantile-quantile plot of the model's standardized residuals against standard-Normal theoretical quantiles. Points follow the rose diagonal through the middle; the lower-left points droop below the line (a heavier-than-Normal lower tail), while the upper-right points stay close to the line, drifting slightly above it at the very end — a mildly negative-skewed pattern produced by the bounded 1-to-5 outcome. Approximate normality remains adequate at this large n.

Reading our plot: the residuals hug the diagonal across the middle of the distribution, and the tails tell an asymmetric story. The lower-left points droop below the line — the left tail is heavier than a Normal’s, because a participant who ends up with a very low follow-up score lands far below a prediction that sits near the top of the 1–5 scale. The upper-right points stay close to the line, drifting slightly above it at the very end — nowhere near as far as the lower tail strays. The net result is a mildly negatively skewed residual distribution (sample skewness = -0.34): a pattern consistent with a bounded outcome whose predictions sit closer to the ceiling than to the floor.

Is that a problem? A skew-type departure is the kind worth taking seriously at small n, because asymmetric departures distort small-sample intervals more than symmetric ones do — but at this magnitude and this sample size it is not concerning. The Central Limit Theorem makes the sampling distribution of each coefficient approximately Normal under mild conditions, as long as the sample is reasonably large and no coefficient rests on just a handful of participants, and mild skew of this size is comfortably within what the CLT absorbs. With n = 3,965, the coefficients’ confidence intervals and p-values are essentially unaffected. Simulation studies agree: in large samples, linear regression’s tests and intervals hold up for a wide range of error distributions (Lumley et al., 2002), and p-values go wrong mainly with influential outliers or when both the outcome and a predictor are heavily skewed (Knief & Forstmeier, 2021).

ROS goes further than most textbooks here: for estimating the regression line, “the assumption of normality is typically barely important at all,” and the authors “do not recommend diagnostics of the normality of regression residuals.” We keep the Q–Q plot because most statistical software draws it and because, as ROS adds, “There is nothing wrong with making such a plot, and it can be relevant when evaluating the use of the model for predicting individual data points.”

When does the normality assumption actually matter?

  • For the coefficients (the treatment effect, the baseline-benevolence slope): very little once the sample is reasonably large. Normality makes the small-sample t and F reference distributions exact; with a large n, the CLT makes the coefficients’ sampling distributions approximately Normal anyway. The case to watch is strong skew in a small sample, especially when a predictor is also skewed or a coefficient rests on only a few participants (a small group, say): what the CLT needs to be large is the information behind that coefficient, not just the total n.
  • For predicting individuals: more. An interval for one participant’s outcome uses the error distribution directly, so skewed or bounded errors distort it at any sample size.
  • What the assumption is about: the errors — not the raw outcome, and not the predictors. Neither needs to look Normal. “The regression model does not assume or require that predictors be normally distributed” (ROS, p. 155), and an outcome can look far from Normal while the errors around the regression line are close to Normal.

For most behavioral-science regressions, with trial- or survey-sized samples, normality of errors is the least worrying of the five assumptions.

Nothing here is needed for the model with site; keep the list for the residual distribution that genuinely misbehaves in a modest sample — especially heavy tails or strong skew — or for a model whose job is predicting individuals:

  • Bootstrap the CIs. Bootstrap percentile or bias-corrected-and-accelerated (BCa) CIs reduce reliance on the Normal-residual assumption — but they are not assumption-free. The resampling unit has to match the design: rows for independent observations, clusters for clustered data. In small samples or with a few high-leverage points, bootstrap intervals can still perform poorly. M07 and M10 developed the bootstrap workflow.
  • Use robust regression (MASS::rlm(), robustbase::lmrob()) when heavy tails come from a few extreme observations and you want to down-weight them rather than removing them.
  • Transform the outcome when the skew is structural — chiefly when, as in Part 2’s list, a log makes an all-positive outcome’s relationship additive and linear; less skewed errors are a side benefit. A log does not help a bounded scale like benevolence.
  • Switch model classes — count outcomes are usually modeled with Poisson / negative-binomial regression, ordered categorical outcomes in cumulative-logit / ordinal regression, and bounded continuous outcomes may suit beta regression when the values lie strictly inside the bounds. An outcome with many scores at the endpoints, like benevolence, is better served by an extended-support, boundary-aware, or ordinal model instead. More advanced courses develop these.

The first two bullets target the coefficients’ intervals. For prediction intervals, the last two are the ones that help, because a prediction interval is only as good as the error distribution it assumes.


Part 4 — Equal variance (homoscedasticity)

The equal-variance assumption says that the variance of the errors is the same whatever the predictor values. The standard check looks across the range of \(\hat{y}\): is the spread around the regression line roughly the same whether the prediction is low or high? As always, we check it through the residuals. The standard diagnostic is the scale–location plot, which plots \(\sqrt{|\text{standardized residual}|}\) on the y-axis against \(\hat{y}\) on the x-axis. The square-root-of-absolute-value transformation makes the variability of the residuals more directly visible across the fitted range.

The scale–location plot

In the plot below, the rose LOESS smoother tracks the typical residual magnitude across the fitted range: a roughly flat smoother is consistent with constant variance, while a smoother that climbs or falls signals that spread depends on the prediction. (A plot against \(\hat{y}\) checks only whether spread changes with the prediction; spread that differs between groups, such as treatment arms or sites, can hide in it, one more reason the robust-SE comparison below is worth running.) You’ve now met the ceiling squeeze twice — so predict: will our smoother rise, fall, or stay flat as \(\hat{y}\) climbs?

m2 |>
  augment() |>
  mutate(sqrt_abs_std_resid = sqrt(abs(.std.resid))) |>
  ggplot(aes(x = .fitted, y = sqrt_abs_std_resid)) +
  geom_jitter(width = 0.0, height = 0.0, alpha = 0.18,
              color = "#4E5EAA", size = 1.0) +
  geom_smooth(method = "loess", formula = y ~ x, se = FALSE,
              color = "#C05852", linewidth = 1.2) +
  labs(
    x = expression(hat(y) ~ "(predicted T2 benevolence)"),
    y = expression(sqrt(abs("standardized residual"))),
    title = "Scale–location plot for the model with site",
    subtitle = "A flat LOESS smoother is consistent with constant residual variance across the fitted range."
  )

Scale-location plot for the model with site (square-root of the absolute standardized residual on the y-axis against predicted T2 benevolence on the x-axis). The rose LOESS smoother is highest at the lowest predictions, nearly flat through the middle, and lowest near the scale ceiling, indicating approximately constant residual spread with a modest shrinking of typical residual size as predictions rise.

Read the smoother. For our model, the rose curve drifts gently downward from left to right — the typical residual size is largest at the lowest fitted values and mildly smaller at the highest ones. Near the top, that fits the bounded-outcome story we saw in Part 2’s residual–fitted plot: the ceiling of the 1–5 scale squeezes how far most residuals can stray at high \(\hat{y}\). It may not be the whole story, though. In Part 7’s interaction model, which captures a pattern this model misses, the spread no longer falls steadily across the fitted range, so part of the drift may come from the missing interaction rather than the ceiling.

The smoother’s downward drift is small in absolute terms — the typical residual size only shrinks by a modest amount across the fitted range. The treatment effect, the coefficient this Module cares most about, also has a second protection: randomization split participants into two arms of nearly equal size (48.1% in the workbook arm), and in large samples the classical SE for a contrast between equal-sized randomized arms stays close to the robust one whatever pattern the spread takes (Lin, 2013). (Other coefficients’ SEs move more, in both directions, as the worked check below makes visible.) Under heteroscedasticity the usual OLS standard errors can be too small for some coefficients and too large for others — the direction depends on which participants have unusual predictor values and on how the residual spread changes, not on a single “conservative” tilt. Here the pattern is mild, so the treatment effect’s confidence interval is likely close enough to be honest. But a large sample doesn’t by itself fix classical SEs under heteroscedasticity (Principle 2 in Part 8), so a robust-SE sensitivity check is the clean way to find out. The worked example below runs it.

What to do when equal variance fails

Our model’s mild ceiling squeeze doesn’t call for any of these, but keep them for the day yours does. When the scale–location smoother trends strongly upward or downward, or when the residual spread changes markedly across the fitted range, these are the options:

  • Robust (“sandwich”) standard errors are the most practical fix. Robust SEs estimate the standard errors directly from the residuals’ actual variance pattern, without assuming homoscedasticity. The cleanest one-call route is estimatr::lm_robust() (shown just below); the lower-level route computes the robust covariance matrix with sandwich::vcovHC() and hands it to lmtest::coeftest() for the coefficient tests. “Sandwich” describes the shape of the formula, and the HC in HC3 stands for heteroscedasticity-consistent. Among the HC0–HC3 versions, HC3 has performed best in small and modest samples in simulation studies (Long & Ervin, 2000). That is why it is a common choice in behavioral-science work and the default in sandwich::vcovHC(); estimatr::lm_robust() defaults to HC2, so set se_type = "HC3" explicitly, as the code below does. Either way, refitting leaves the point estimates unchanged but reports more honest CIs and p-values, at least in reasonably large samples. Two limits: robust SEs repair the coefficients’ standard errors, not the model. The estimates stay less precise than a model of the variance (such as WLS) could make them, and prediction intervals for individuals get no help at all (Principle 3 in Part 8). And when robust and classical SEs disagree sharply, treat the gap as a clue that something else may be misspecified, such as a missed curve or interaction, and look again at the mean structure (King & Roberts, 2015).
  • Transform the outcome when the unequal variance points to a multiplicative relationship — e.g., an all-positive outcome whose spread grows with its mean, where a log makes the model additive on the log scale (Part 2) and steadies the spread as a side effect. Count outcomes, whose variance grows with the mean, are handled directly by Poisson regression (or negative-binomial regression, when the variance grows faster than the mean). A log won’t steady a bounded scale like benevolence, whose spread shrinks near the bounds.
  • Use weighted least squares (WLS) if you have a model for what’s driving the heteroscedasticity — e.g., if measurement precision varies systematically across observations.
  • Switch model classes if the outcome scale fundamentally violates OLS’s distributional assumptions — count outcomes to Poisson / negative-binomial, and bounded outcomes to a model built for bounds (beta regression when no scores sit exactly at the endpoints; an extended-support or ordinal model when many do, as with benevolence).

A worked robust-SE example

Here is the robust-SE remedy demonstrated on the model with site, using the one-call estimatr::lm_robust() route. The point estimates won’t change; the SEs and CIs will. (This is a brief demonstration only — the full development of robust SEs, including when to choose HC0/HC1/HC2/HC3, comes in more advanced courses.)

# Available via the estimatr package, which we don't load here
# but is a convenient tool for this remediation:
estimatr::lm_robust(
  t2_benevolence ~ t1_benevolence.c + treat + site,
  data = analysis,
  se_type = "HC3"
) |>
  broom::tidy()

Run it and put the focal number side by side with the classical one. For the treatment effect, the HC3-robust SE is 0.6% away from the classical SE — for the coefficient this Module cares most about, the treatment-effect inference doesn’t depend on the choice. The other coefficients tell the more instructive story: across the other seven terms the robust-to-classical SE ratio runs from 0.81 to 1.11, so some SEs shrink and some grow. Heteroscedasticity doesn’t push every classical SE in one “safe” direction, which is why the check is worth running, not assuming.


Part 5 — Influence and leverage

So far the diagnostics have looked at the residuals collectively — does the typical residual behave as the model assumes? A different set of concerns asks about individual observations: is there a single point (or a small handful) pulling the fit disproportionately? Such observations can change a coefficient’s sign, inflate R², or hide a relationship that the rest of the sample agrees on.

Two related concepts:

  • Leverage (\(h_{ii}\), the hat value) measures how unusual an observation’s predictor profile is relative to the rest of the sample. A point with extreme covariate values has high leverage. Leverage doesn’t depend on the outcome — it’s a property of \(X\) alone.
  • Cook’s distance (\(D_i\)) combines leverage with residual size to measure the total effect of removing the observation on the model’s fitted values. A high Cook’s distance means dropping this point would substantially change the coefficients taken together. Because it summarizes all of them at once, it can understate a point’s pull on one particular coefficient, which is why the with-and-without check below looks at the focal estimate itself (Aguinis et al., 2013).

Four checks in one call · check_model()

The performance package’s check_model() draws several diagnostic plots in one call, and its check argument picks which ones. Below, it draws four. Three are the checks you built by hand in Parts 2–4: the residual–fitted plot (linearity), the scale–location plot (equal variance), and the Q–Q plot (normality). The fourth, the influential observations panel, is new. Before the panels render, make one prediction about it: with several thousand participants, how much pull could any single one have on the fit? (check_model() draws its panels with the see package, from the same easystats family of packages as performance. Install it once from the Console with install.packages("see"); you don’t need to load it with library().)

m2 |>
  performance::check_model(check = c("linearity", "homogeneity", "qq", "outliers"))

Four-panel performance::check_model() diagnostic for the model with site. Top left, linearity: residuals against fitted values form a downward-slanting wedge, and a green smoother stays near zero through the middle of the fitted range and dips slightly at both ends. Top right, homogeneity of variance: the square root of the absolute standardized residuals against fitted values, with a green line that drifts gently downward from left to right. Bottom left, influential observations: standardized residuals against leverage; every point sits below a leverage of 0.005 in a thin band near zero, far inside dashed Cook's-distance contour lines labeled 0.9, a few points carry row-number labels, and a green smoother runs along zero. Bottom right, normality of residuals: a detrended Q-Q plot whose dots lie along the flat line at zero except in the lower tail, where they fall below it.

The influential observations panel (bottom left) is the new one. Each point is one participant; the x-axis is the leverage \(h_{ii}\); the y-axis is the standardized residual. The dashed contour lines mark a Cook’s-distance cutoff, and points outside them would be flagged as influential. check_model() sets that cutoff from the number of coefficients and the sample size, so it changes from model to model: about 0.9 here. (Base R’s diagnostic plot uses fixed contours at the conventional 0.5 and 1 instead.) The package also labels at least five points with their row numbers: those with the largest Cook’s distances among the dots it draws, whether or not any is influential, so a label on its own isn’t a flag. With this many participants it draws every point beyond the contour plus a random 1,600 of the rest, so the labels here need not match the top five that augment() lists below. This is also the panel the pre-study has you rebuild yourself in ggplot2 from augment()’s columns: leverage (.hat) on the x-axis, standardized residual on the y-axis, and each point colored by its Cook’s distance via scale_color_gradient().

For the model with site, every point sits at low leverage in absolute terms, and even the largest residuals come at ordinary leverage, well left of the highest values, so no Cook’s distance gets anywhere near the cutoff. The contour lines sit so far above and below the points that the cloud looks flattened against zero. With n = 3,965, no single participant appears to exert enough influence to change the substantive fit — the influence is spread across thousands of observations.

The other three panels repeat Parts 2–4, and the linearity and equal-variance panels add gray 95% confidence bands around their smoothers. The normality panel looks different from your hand-built version: it is a detrended Q–Q plot, which plots each point’s distance from a reference diagonal, so “on the diagonal” becomes “on the flat line at zero.” (That diagonal isn’t quite the one stat_qq_line() draws, and the panel uses a studentized residual, a slightly different kind of standardized residual that rescales each residual with the SD computed with that participant left out, so a tail point can sit a little differently than on your hand-built plot.) With thousands of participants, these three panels each draw a sample of 2,000 of them to keep the dots readable and fit their smoothers to that sample, so their curves can differ slightly from the ones you drew from every participant. (The influence panel draws a sample too, 1,600 participants, but it always keeps any point beyond the contour.) Read that way, the panels agree with Parts 2–4: little sign of curvature, residual spread close to constant apart from the mild squeeze near the ceiling, and approximately Normal residuals apart from the mild negative skew in the lower tail.

You’ll also see base R’s plot() used for this in many online tutorials: plot(m2) draws an unstyled version of the same four checks. Part 8 calls check_model() again without the check argument, to draw all six of its panels.

Identifying specific influential observations

When the influence panel does flag points (which can happen in smaller samples or with extreme outliers), augment() returns Cook’s distance and leverage as columns alongside each row, so you can identify and inspect them directly:

m2_aug <- m2 |> augment(data = analysis)

m2_aug |>
  arrange(desc(.cooksd)) |>
  select(uid, .cooksd, .hat, .std.resid, t2_benevolence,
         t1_benevolence.c, treat, site) |>
  slice_head(n = 5)

The top five participants ranked by Cook’s distance still have small \(D\)-values — the largest is 0.0073, far below the conventional cutoff of 1 — typical of a regression with thousands of participants and no extreme predictor profiles. The more sensitive 4/n screen in the box below does flag 178 participants (4.5%). That doesn’t make them problematically influential: \(4/n\) is a screening heuristic, not a pass/fail threshold. Refitting without all of them — the with-and-without check described below — moves the treatment effect only from 0.500 to 0.521.

The added-variable plot in Part 2 is the one-coefficient version of this idea: the points farthest out on its x-axis are the ones with the most leverage over that slope.

Cutoffs for Cook’s distance and leverage. Three rules of thumb you’ll see:

  • Cook’s distance \(> 1\) is the classic threshold for a point clearly worth investigating. Cook (1977) proposed comparing \(D\) with the median of an F distribution: dropping a point at that value would move the coefficients to the edge of their 50% confidence region. That median sits a little under 1 in most models (close to the contour check_model() draws, about 0.9 here), so \(D > 1\) is a conservative rounding of it. \(D > 4/n\) is the more sensitive screening threshold (with n = 3,965, that’s \(> 0.0010\)). It is a screening heuristic, not a pass/fail threshold: in a large sample it flags many trivially influential points, and a with-and-without sensitivity check matters more than the raw count over the threshold.
  • Leverage \(h_{ii} > 2(k+1)/n\) is a common high-leverage flag: twice the average leverage (Hoaglin & Welsch, 1978). Here \(k\) is the number of slopes, the model columns excluding the intercept, so a multi-level factor like site contributes several dummy columns, not one. Some sources use the stricter \(3(k+1)/n\), especially in small samples (Aguinis et al., 2013). For the model with site, \(k\) = 7 (baseline benevolence, treatment, and five site columns), so the flag is \(2(8)/3{,}965 \approx 0.0040\). It flags 25 participants, and all of them are from Hong Kong. That’s because of site size, not anything special about Hong Kong. The model estimates each site’s average from that site’s own participants, and Hong Kong is the smallest site (323 participants, against 1,066 in Colombia), so each Hong Kong participant counts for more, and every one of them has higher leverage than anyone from the other five sites (the Going further box after this one shows why). The 25 who cross the flag are the Hong Kong participants whose baseline scores sit near one end of the scale; none has a Cook’s distance above 0.005. They are high leverage by the rule, but low in absolute terms, and not influential: the case the paragraph below calls “no action needed.”
  • |Standardized residual| > 2 flags ~5% of well-behaved data; > 3 flags ~0.3%.

None of these are hard cutoffs — they’re screening thresholds. Each rule also looks at one observation at a time, so two or three similar unusual points can hide one another: drop any one and the others still hold the line where it was. When flagged or high-leverage points come in a group, refit without the whole group. The right response to a flagged observation is to investigate it, not delete it. Is the participant’s covariate profile genuinely unusual (high leverage) but their Cook’s distance small, so the fit barely changes without them? That’s a high-leverage but not influential case — no action needed. Judge that by Cook’s distance or a with-and-without refit, not by the residual alone: a high-leverage point can pull the line toward itself, which shrinks its own residual. Is the record a data-entry error, or the participant a special case (e.g., very young, very atypical context) who shouldn’t be in the analysis at all? That’s a substantive judgment, not a statistical one.

Leverage measures how much a participant’s own outcome pulls on their own prediction. Picture raising one participant’s T2 benevolence by one point and refitting the model. Their prediction rises too, by exactly their leverage. That rise has two parts.

  1. Their site’s part. The five site columns give each site its own average, and each site’s average is estimated only from that site’s participants. One extra point, shared among the 323 people in Hong Kong, moves Hong Kong’s average by 1/323 of a point; shared among the 1,066 people in Colombia, it moves Colombia’s average by only 1/1,066.
  2. Their own part. Usually a smaller amount, for how unusual the participant’s baseline score and arm are, compared with their own site’s averages.

For the model with site, every participant’s leverage is exactly the sum: 1 ÷ (the size of their site), plus their own part. You can see the bands this creates by summarizing .hat by site:

m2_aug |>
  group_by(site) |>
  summarize(
    participants = n(),
    one_over_size = 1 / n(),          # the site's part
    lowest_leverage = min(.hat),
    highest_leverage = max(.hat)
  ) |>
  arrange(participants)

The site’s part differs across sites more than the participants’ own parts vary, so each site forms its own band, and Hong Kong’s sits on top: its lowest leverage, 0.0033, is above the highest anywhere else, 0.0031. That’s why, in a plot of residuals against leverage, Hong Kong’s participants sit to the right of everyone else.

The same logic holds in any model with one grouping variable: the smallest group starts with the most leverage. In a model with the grouping variable alone, that is the whole story, and everyone’s leverage is exactly 1 ÷ the size of their group. With other predictors in the model, someone far from their own group’s average on one of them can still outrank people in the smallest group. REACH’s bands separate cleanly because Hong Kong is about half the size of the next-smallest site and nobody’s baseline score sits extremely far from their own site’s average.

So in a model with group indicators, a leverage flag will tend to pick out the smallest group’s members. That comes from how the model is built, not from anything wrong with those participants’ data. Cook’s distance is what tells you whether any of them changes the fit, and here none comes close.

What to do when influential observations are present

No single REACH participant comes close to steering the fit here. In a small sample (your bread_peace lab is one), when one or a few observations are genuinely driving the fit, these are the steps:

  • Fit the model both with and without the flagged points and report both. If the conclusion holds with and without them, it doesn’t depend on those points. If the conclusion flips, the result is driven by those points and you should disclose that.
  • Investigate the flagged observations substantively. Are they data-entry errors? Special cases that shouldn’t be in the analytic sample? Or genuine extreme cases that belong but stretch the model’s range? A very large residual can also mean the error model is the problem rather than the point: ROS (Section 15.6) notes that “When a regression model can have occasional very large errors, it is generally more appropriate to use a t distribution rather than a normal distribution for the errors.”
  • Consider robust regression (MASS::rlm()) when unusual outcome values produce large residuals: it gives those observations less weight rather than removing them. It does not necessarily protect against problematic high-leverage points, because a point that pulls the line toward itself can end up with a modest residual. rlm()’s default is the version with this weakness; its method = "MM" option and robustbase::lmrob() are built to resist bad high-leverage points. So investigating flagged observations and comparing defensible alternative fits remain essential. Note the contrast with the robust standard errors of Part 4: robust SEs leave the coefficients unchanged and only repair inference under heteroscedasticity, whereas robust regression changes the fitted coefficients by down-weighting outliers — different remedies for different problems.

Part 6 — Multicollinearity

Start with a puzzle: suppose you put two questionnaire subscales that correlate at .85 into the same model. Each one predicts the outcome well alone — what happens to their coefficients when they have to share?

Each coefficient now describes what its subscale adds while the other is held fixed, so both usually shrink from their solo values and become unstable from sample to sample. Each one’s SE grows too — at r = .85, to about 1.9 times what it would be with uncorrelated predictors — because the model can’t tell whose credit is whose. That is the concern this Part diagnoses.

The five assumptions above are about the residuals and the outcome. Multicollinearity is a different concern entirely — it’s about the predictors’ relationships with each other. When two predictors in a model are highly correlated with one another, the model can’t cleanly attribute outcome variation between them. Individual coefficient estimates become unstable, their standard errors balloon, and small changes in the data can flip signs. Overall in-sample fit (R², \(\hat{\sigma}\)) is unaffected, and so are predictions for cases like those in the data — multicollinearity mainly hurts interpretation. Predictions for unusual combinations of the correlated predictors, though, can be unstable.

The variance inflation factor (VIF)

The standard diagnostic for multicollinearity is the variance inflation factor (VIF). For predictor \(j\), the VIF is

\[\text{VIF}_j \;=\; \frac{1}{1 - R_j^2}\]

where \(R_j^2\) is the R² from regressing \(X_j\) on all the other predictors. (Because it uses all the other predictors at once, the VIF can flag overlap that no single pairwise correlation reveals.) For a predictor with a single coefficient, a VIF of 1 means the other predictors don’t linearly predict it at all (values near 1 mean very little collinearity); a VIF of 4 means its standard error is twice as large (\(\sqrt{4} = 2\)) as it would be if it were uncorrelated with them; values above 5 or 10 are conventionally flagged, though these rules of thumb say nothing about whether the resulting standard error is too large for your question (O’Brien, 2007). Treat the VIF as a quick look rather than a separate test. ROS (Section 10.7) makes the point that when two predictors are hard to untangle, “This instability should be reflected in large standard errors for the estimated coefficients” — so the standard errors you already report carry the consequence, and the VIF helps explain why one of them is large. performance::check_collinearity() reports VIF for every predictor in the model in one call. Before you read its output: random assignment made treat unrelated, in expectation, to everything measured before assignment — so predict its VIF first.

m2 |>
  performance::check_collinearity()

For the model with site, every VIF is below 1.5 — there’s essentially no multicollinearity. That’s expected for a model with three approximately independent predictors: random assignment makes treatment roughly uncorrelated with baseline benevolence and with site; site and baseline benevolence are weakly correlated (mean baseline benevolence differs slightly across sites) but nowhere near the high-correlation territory that produces problematic VIFs.

The randomized design protects the treatment estimate in a stronger way, too. Because treat is roughly unrelated to the covariates, overlap among the covariates — say, two highly correlated baseline questionnaires entered in the same model — would make their coefficients unstable but would leave the treatment estimate and its standard error essentially untouched. ROS makes the same point while discussing propensity-score models for observational studies (Section 20.8): “since our focus is only on estimating the treatment effect, … we are not particularly concerned about issues of multicollinearity among our covariates.” Multicollinearity becomes a real concern when the coefficient you want to interpret is itself one of the overlapping predictors.

One wrinkle to expect: because site is a multi-level factor, check_collinearity() reports it at the term level — a generalized VIF that accounts for its several dummy columns — rather than as a single numeric predictor. The interpretation is the same broad question: does this predictor overlap so strongly with the others that its coefficient estimates become unstable? For a factor with several dummy columns, the output’s adj. VIF column (the generalized VIF raised to the power 1/(2 × df), as Fox and Monette (1992) recommend) is the number to compare across predictors; for a one-column predictor it equals \(\sqrt{\text{VIF}}\), the standard-error inflation factor itself.

A high VIF is not by itself a reason to change the model: the standard errors already report the cost, and with a large sample even a VIF above 10 can leave a confidence interval narrow enough to answer your question (O’Brien, 2007). Ask instead whether the confidence interval for a coefficient you need to interpret is too wide for your purpose. If it is, the most direct fixes add information: more data, or a design that separates the predictors. Short of that, the standard remedies below run in increasing order of structural change, and each one changes either the estimate or the question it answers (Vanhove, 2021):

  1. Center the offending predictor — most useful when the multicollinearity is between a predictor and its own interaction term (e.g., \(x\) and \(x \times z\)). Centering both before fitting often reduces that correlation, but it does not guarantee it: depending on how the predictors are distributed, the correlation can stay the same or even grow (Olvera Astivia & Kroc, 2019). Centering is mainly a tool for interpretation, and it can address only this nonessential collinearity; it does nothing for two genuinely redundant constructs that measure the same thing (for that, see remedies 2–4). Centering also changes what the lower-order coefficients mean — each becomes the slope at the other predictor’s mean rather than at zero — but it leaves the interaction’s estimate and its test unchanged. Any drop in a lower-order coefficient’s standard error after centering comes from that change in meaning (a slope at the other predictor’s mean is usually estimated more precisely than a slope at zero, especially when zero lies outside the data), not from new information (Echambadi & Hess, 2007).
  2. Drop one of the redundant predictors — when two predictors are measuring nearly the same thing (e.g., two highly correlated personality subscales). Decide which one carries the substantive meaning you want and report only that one. The kept coefficient now answers a different question: it is no longer adjusted for the dropped predictor, so it absorbs that predictor’s share. If the dropped predictor was a confounder you needed to adjust for, dropping it brings that confounding back.
  3. Combine the correlated predictors into a single composite — average them, factor-score them, or use a principal component. This works when the predictors are conceptually measuring different facets of one underlying construct. The composite’s coefficient answers a different question from either original predictor’s, so check that it is the question you want answered.
  4. Use a regularized regression — ridge regression (the glmnet package) adds a penalty that shrinks the coefficients as a set and pulls the coefficients of correlated predictors toward each other. It accepts some bias in exchange for less sample-to-sample variability; a tuning parameter, usually chosen by cross-validation, sets the balance. It is a standard tool for prediction with many correlated predictors, but a poor fit for interpreting one coefficient: the estimates are deliberately biased, and the usual standard errors and confidence intervals don’t carry over (Vanhove, 2021). More advanced courses develop the regularization toolkit.

Part 7 — Additivity

The additivity assumption is easy to overlook. It says that each predictor’s effect on the outcome is the same regardless of the other predictors’ values. In an additive MLR like the model with site, the treatment effect is assumed to be the same whether the participant has a low baseline benevolence or a high one, whether they’re in Colombia or in Hong Kong. The model’s algebra encodes that uniformity: \(\hat{y} = b_0 + b_1 \cdot \text{T1.c} + b_2 \cdot \text{treat} + \text{(five site terms)}\), where T1.c is centered baseline benevolence. The treat coefficient \(b_2\) stands alone — no term where it can vary with baseline benevolence or with site. Before this Part’s check arrives, make your prediction now: given the ceiling effects you’ve seen all Module, should the treatment effect be larger or smaller for participants who started high on benevolence?

What if the assumption is wrong? What if treatment helps participants with the lowest baseline benevolence more than those with the highest (because the latter have less room to grow)? What if the workbook works in Colombia but not in Hong Kong? In statistical terms: what if the treatment effect is moderated by baseline benevolence, or by site?

Visualizing the additivity assumption

The clearest way to see additivity is to predict T2 by treatment at several values of baseline benevolence. If treatment’s effect is the same at every level of baseline benevolence, the three lines in the plot below (one per baseline benevolence level, each running from Control to Treatment) should be parallel — each one rises by the same amount. Non-parallel lines are the visual signature of a violation of additivity. (A note on the plot below: the grid holds site at its most common value, Colombia. That is M11’s Part 5, Step 2: one site, Colombia. Averaging over the sites instead would move every line up or down by the same amount and leave the gaps between the arms unchanged, so holding site at Colombia leaves the picture of additivity unchanged.)

sd_t1 <- analysis |> pull(t1_benevolence.c) |> sd()

# Both arms at three baseline benevolence levels, site held at Colombia
pred_grid <- expand_grid(
  treat = c("Control", "Treatment"),
  t1_benevolence.c = c(-1.5, 0, 1.5) * sd_t1,
  site = "Colombia"
)
pred_grid <- pred_grid |>
  bind_cols(predict(m2, newdata = pred_grid, interval = "confidence") |> as_tibble()) |>
  mutate(
    baseline_level = factor(
      t1_benevolence.c,
      levels = c(-1.5, 0, 1.5) * sd_t1,
      labels = c("Baseline benevolence −1.5 SD", "Baseline benevolence (mean)", "Baseline benevolence +1.5 SD")
    )
  )

pred_grid |>
  ggplot(aes(x = treat, y = fit, color = baseline_level, group = baseline_level)) +
  geom_pointrange(aes(ymin = lwr, ymax = upr),
                  position = position_dodge(width = 0.18),
                  size = 0.4, linewidth = 0.9) +
  geom_line(position = position_dodge(width = 0.18), linewidth = 1.0) +
  scale_color_manual(
    values = c("Baseline benevolence −1.5 SD" = "#348C9E",
               "Baseline benevolence (mean)" = "#AD872B",
               "Baseline benevolence +1.5 SD" = "#945297"),
    name = NULL
  ) +
  labs(
    x = NULL,
    y = "Adjusted T2 benevolence",
    title = "Additive model — parallel lines",
    subtitle = "Same treatment gap at every level of baseline benevolence: the additivity assumption"
  )

Predicted T2 benevolence by treatment condition (Control, Treatment) for the additive model with site, drawn at three levels of baseline benevolence (1.5 SD below the mean, the mean, 1.5 SD above) in teal, gold, and heather with confidence-interval point ranges. The three lines are perfectly parallel, the visual encoding of the additivity assumption: the treatment gap is identical at every level of baseline benevolence.

The three lines in the additive model’s prediction surface are perfectly parallel by construction — that’s the visual encoding of additivity. No matter where a participant’s baseline benevolence sits (low, mean, high), the predicted Treatment − Control gap is the same value, about half a benevolence point.

What a check of additivity finds

Checking the assumption means fitting a model that allows the treatment effect to vary with baseline benevolence: an interaction model, t2_benevolence ~ t1_benevolence.c * treat + site, in which * asks for both predictors plus their product. That model is the core of moderation analysis, which PSY 653 develops in full, so we won’t interpret its coefficients here. But here is what it finds for REACH, drawn exactly like the plot above:

Predicted T2 benevolence by treatment condition for the interaction model (treatment by baseline benevolence), drawn at the same three levels of baseline benevolence in teal, gold, and heather. The lines are now non-parallel: the teal line for low baseline benevolence rises steeply from Control to Treatment while the heather line for high baseline benevolence rises much less, showing the treatment effect is larger at low baseline benevolence than at high, so the additive model's effect is an overall summary across those levels.

The lines stop being parallel. The teal line (low baseline benevolence) climbs steeply from Control to Treatment; the heather line (high baseline benevolence) climbs much less. The estimated treatment effect is about 0.91 points for participants 1.5 SD below mean baseline benevolence and about 0.09 points for those 1.5 SD above it. (The model’s interaction coefficient, -0.266, 95% CI [-0.315, -0.217], is how much the treatment effect changes per point of baseline benevolence; PSY 653 develops how to read it.) Two readings fit that pattern. One is genuine moderation — the workbook helps most where there is the most room to grow. The other is a ceiling effect: participants who start near 5 cannot score much higher whatever the workbook does, so the outcome scale itself compresses the effect at high baseline benevolence. A linear model on the 1–5 scale can’t separate the two, and a careful report mentions both. Rating scales that bunch up at one end are a well-known source of interactions like this one: they can appear on the observed scale even when the effect on the underlying construct is the same for everyone (Loftus, 1978; Rohrer & Arslan, 2021). Models built for a capped outcome, such as censored or ordinal regression, can ask the question on an uncapped scale, but only by assuming what that scale looks like. The control group doesn’t settle it: randomization makes the 0.09 an honest estimate of the effect on the 1–5 scale for high-baseline participants, but both arms sit near the top of that scale. So the comparison can’t show whether the workbook changed their forgiveness less, or changed it just as much where the scale had no room left to register it.

When the effect varies like this, the additive treatment coefficient isn’t wrong — it becomes an overall summary of the effect across levels of baseline benevolence (ROS, Section 19.4). It can still be a useful single number, but it no longer tells the whole story.

For M12 the practical takeaway is: check additivity for the interactions that are theoretically plausible, design-relevant, or visible in exploratory plots — don’t mechanically test every possible interaction, since in a large sample even trivial interactions can be statistically significant. Fitting y ~ x * z, interpreting its coefficients, and estimating the focal effect at chosen values of the moderator are PSY 653 material.


Part 8 — When violations matter, and what to do

We’ve walked through six diagnostics — four assumption checks plus the two practical concerns, influence and multicollinearity. Each can return some level of “violation” on real data; almost no model fits perfectly. The substantive question is when does a given violation matter enough to change what you should report? Three principles guide that judgment.

The four diagnostic questions

Before the principles, here is the toolkit in one place. Each diagnostic in Parts 2–7 answers one of four questions:

Question Main tools Where in M12
Does the model capture the average relationship? Residual–fitted plot; component-plus-residual plot for each numeric predictor; a check of additivity Parts 2 and 7
Are the errors’ shape and spread acceptable for what we want to conclude? Q–Q plot; scale–location plot Parts 3 and 4
Is any single observation pulling the fit too much? Leverage; Cook’s distance Part 5
Do the predictors overlap too much to interpret each coefficient precisely? Variance inflation factor (VIF) Part 6

Independence of errors isn’t on this list, because it is judged mainly from the study design (Part 1); the same goes for validity and representativeness. When observations have a time order, residuals examined in that order can add a check, as the bread_peace lab does for its elections.

Principle 1 — Distinguish bias from inefficiency

Your diagnostic flagged something — should you distrust the estimate, or just its standard errors and intervals? That’s the first question to ask of any violation, because some violations distort the point estimates themselves; others only distort the uncertainty around those estimates. The two have very different practical implications.

  • Bias-inducing violations: linearity (missing curvature), additivity (missing interactions), omitted confounders (causal violation). These can make an estimate genuinely wrong — no sample size will fix them — for the quantities whose meaning depends on the mean structure: the baseline-benevolence slope, the predicted means, a prediction for one participant. A randomized treatment contrast is the important exception. Randomization balances baseline benevolence across the arms on average, so a mis-shaped baseline-benevolence term mainly costs the treatment estimate precision; as ROS (Section 19.3) puts it, “Under a clean randomization, adjusting for pre-treatment predictors in this way does not change what we are estimating” (see also Lin, 2013). (A missing treatment × baseline-benevolence interaction is a different matter: the additive treatment coefficient then becomes an average over levels of baseline benevolence, as Part 7 showed.) And because “Just about every problem we ever study will be nonlinear, but linear regression can still be useful in estimating an average relationship” (ROS, p. 154), the goal is a mean structure good enough for the question, not a perfect one.
  • Inefficiency-inducing problems: non-Normal errors, heteroscedasticity, mild multicollinearity. These leave the point estimates unbiased. (“Inefficiency” is shorthand here: these problems affect how precise the estimates are, or how accurately the usual standard errors and reference distributions describe that precision.) Heteroscedasticity can make the classical SEs inaccurate; non-Normality leaves the SE formula intact but makes the small-sample t and F reference distributions only approximate; multicollinearity makes the SEs (correctly) large. They differ in what fixes them. As n grows, the CLT makes the usual intervals approximately right even when the errors aren’t Normal (though with heavy tails, OLS can stay less precise than a robust fit at any n, one reason robust regression is on the remedy list). Heteroscedasticity is different: it can bias the classical SEs at any sample size, most for coefficients whose predictors line up with the changing spread, so the check is robust SEs or a bootstrap that resamples rows (as in M10), not more data. Mild multicollinearity mostly widens CIs.
  • Influential observations sit between the two categories. They can genuinely move point estimates in the sample you have — so they must be checked in that sample — but unlike misspecification, the pull of a fixed handful of points dilutes as \(n\) grows, with each one’s influence spread across ever more data (a steady share of bad records, such as a repeated data-entry error, does not dilute, and neither does a point with extreme enough predictor values).

One member of that first list is different in kind: omitted confounding is a causal-design problem, not something any residual diagnostic can detect — a model can pass every plot in this Module and still be badly confounded. That’s why M11’s Table-2-fallacy framing and the DAG tools of causal inference sit alongside these diagnostics rather than being replaced by them.

Treat bias-inducing violations with structural fixes (transformations, interactions, model-class changes). Treat inefficiency-inducing violations with SE-level fixes (robust SEs, the bootstrap). At large sample sizes, mild non-Normality can usually be accepted as it is; heteroscedasticity still calls for the robust-SE check.

Principle 2 — Sample size matters

OLS inference is robust to some violations at large \(n\). With \(n\) in the thousands, as here, mild non-Normality is far less threatening to coefficient inference than it would be in a small sample — the CLT delivers approximately correct sampling distributions for the coefficients. (Heteroscedasticity is the exception: a large n does not make the classical SEs right, which is why Part 4 paired the diagnostic with a robust-SE sensitivity check.) But sample size does not fix a misspecified mean structure. If the true relationship is meaningfully non-linear or non-additive and the model forces a straight, additive line, a larger sample simply estimates the wrong simplified model more precisely — it does not make the wrong line right. In a small study — say \(n = 40\) — the inefficiency-type violations matter more too.

Principle 3 — Inferential goal matters

Same model, same violation — does it matter? That depends on what you’re asking the model for. Violations affect different inferential targets differently. Inferences about a mean hold up fairly well when the errors aren’t Normal; inferences about a variance hold up much less well. Confidence intervals on a coefficient are usually fine; prediction intervals for individual outcomes (which depend directly on the shape and spread of the error distribution, so the CLT offers no help) are much more sensitive to non-normality and heteroscedasticity.

Our model makes this concrete. Its residual standard deviation is \(\hat{\sigma}\) = 0.81 benevolence points. Under the Normal-error model, roughly 95% of individual outcomes fall within about ±2\(\hat{\sigma}\) of their predicted mean. For a participant whose prediction is 4.32 (the 90th percentile of the model’s fitted values), that band runs from 2.69 to 5.95 — past the top of a scale that stops at 5. The band is a property of the Normal-error model, not a guarantee about the data, and here the data cannot follow it past the ceiling. Unequal variance works the same way. ROS (Section 10.8): “unequal variances are not typically a major issue for the goal of estimating regression coefficients, but they become more important when making predictions about individual cases.” For the treatment effect, the ceiling squeeze matters little; for predicting one participant’s follow-up score, it matters much more.

When the judgment is close — run it both ways

The three principles above settle most cases. When they don’t — when a departure is large enough to worry about but not obviously fatal, or when a careful analyst could defensibly have made a different call — there is a better option than arguing it out in the abstract: make both choices and see whether the answer changes. That is a sensitivity analysis, and you have already met two in this Module without the name attached: the robust-SE check (Part 4) and the refit without the 4/n-flagged participants (Part 5).

  • In Part 4, the scale–location plot showed mild heteroscedasticity. Rather than deciding abstractly whether “mild” was mild enough, we refit with HC3-robust standard errors and set the focal SE beside the classical one: 0.6% apart, so the treatment-effect inference does not depend on which we use.
  • In Part 5, the 4/n screen flagged 178 participants, and refitting without them moved the treatment effect from 0.500 to 0.521: fit with them, fit without them, compare — the same shape, with the coefficient in place of its standard error.

The logic is not new to regression. M04 applied it to a descriptive result: excluding one extreme country shifted a regional mean noticeably but left the ranking of regions unchanged, so the conclusion survived the exclusion and the write-up said so. Only the quantity being compared changes here.

Three rules keep the check honest.

  1. Fix the focal quantity before you look. “Is the model sensitive?” has no answer — in a model with eight coefficients, something always moves. “Is the treatment effect sensitive?” has one. Part 4 made the difference concrete: the robust-to-classical SE ratio was tight for the treatment effect and ran from 0.81 to 1.11 across the other terms. Only the first was the question being asked.
  2. Report both versions, not the more agreeable one. The purpose is to disclose how much the conclusion leans on a choice you made. Running the analysis both ways and reporting only the version that cleared \(\alpha\) is worse than never checking, because it conceals fragility you have already measured (Simmons et al., 2011).
  3. A conclusion that flips is a finding. “The effect holds in the pre-specified model but not after excluding the two most influential cases” is real information about how much weight the data can carry. It belongs in the Results section — the alternative is a reader finding it for you.

One boundary, because sensitivity checks are easy to abuse. What separates a sensitivity check from specification searching (or p-hacking) is not how many alternatives you fit but how you choose what to report. A sensitivity check compares your analysis against alternatives you can justify on principled grounds — a remedy the diagnostics pointed to, an exclusion rule someone could reasonably have preferred — and reports them all. Refitting under combination after combination until one produces the result you wanted, then reporting that one, is specification searching, and nothing done afterward repairs it. (Fitting every defensible combination and reporting the whole set is a recognized transparency tool, a multiverse analysis; Steegen et al., 2016.)

The one-stop diagnostic — performance::check_model()

Part 5 used performance::check_model() to draw four checks. Called without the check argument, it draws its full six-panel grid, a useful synthesis of all the diagnostic plots in one figure: posterior-predictive check, linearity, homogeneity of variance, influence, multicollinearity (VIF), and normality of residuals.

m2 |>
  performance::check_model()

Six-panel performance::check_model() diagnostic for the model with site. Top left, posterior predictive check: the observed T2 benevolence density (green) has a sharp spike near 5 that the many model-simulated densities (blue) do not reproduce, and the simulated densities extend below 1 and above 5. Top right, linearity: the reference line stays close to flat. Middle left, homogeneity of variance: a line that is highest at the lowest fitted values, nearly flat through the middle, and lowest at the highest fitted values. Middle right, influential observations: every point sits well inside the Cook's distance contour lines, and a green smoother runs along zero. Bottom left, collinearity: the VIF dots for site, baseline benevolence, and treat all sit at about 1 in the green low zone. Bottom right, normality: the Q-Q dots lie along the flat reference line except for a few points in the lower tail that fall below it.

The first panel is new. For an lm, “posterior predictive check” is the package’s label for comparing the observed outcome with outcomes simulated from the fitted model: each thin blue curve is the density of one simulated dataset — every participant’s fitted mean plus a Normal error with SD \(\hat{\sigma}\) — and the green curve is the real T2 benevolence. ROS (Section 11.4): “The most fundamental way to check model fit is to display replicated datasets and compare them to the actual data.” Here the comparison shows a clear mismatch. The 10.8% of participants who score exactly 5 produce the green spike near 5, which none of the simulated datasets reproduce, and the simulated curves run below 1 and past 5 — scores no participant could report. That is the bounded-outcome and ceiling story from Parts 2–4 once more, seen from the outcome’s side. It matters little for the treatment coefficient (the smoother in Part 2 and the robust-SE check in Part 4 both held up) and more for predicting an individual participant’s score, as Principle 3 described.

The other panels repeat what we found section by section. The four from Part 5 read just as they did there, including the detrended Q–Q plot and the Cook’s-distance contour at about 0.9, and the panels agree with Parts 2–6: the linearity check shows little sign of curvature, the residuals are approximately Normal apart from the mild negative skew the bounded outcome produces, no influential observations dominate, and the residual spread is close to constant apart from the mild squeeze near the ceiling. The collinearity panel’s dots all sit at about 1, as Part 6’s table showed. Taken together, the checks support the substantive inference from M11 — an adjusted treatment effect of about 0.50 with a tight CI — while the first panel is a reminder that the model with site is a better tool for that average effect than for predicting individual scores.

The additivity story is slightly more nuanced: the additive model misses a pattern that the interaction model in Part 7 captures (its interaction term’s 95% CI excludes zero), but the additive-model treatment coefficient can still serve as a defensible overall summary of a treatment contrast that varies across levels of baseline benevolence. Whether to report the additive version, the moderated version, or both is a substantive choice that depends on the audience’s question (PSY 653’s moderation material takes up that choice).

The remediation toolkit — summary

One table to leave the course with: each problem, its diagnostic tell, and the first fix to reach for.

Problem Diagnostic Practical remedy Where it’s developed
Linearity violation Residual–fitted plot, bent LOESS; component-plus-residual plot for each numeric predictor Polynomial / spline / transformation M12 (brief); more advanced courses (full)
Heteroscedasticity Scale–location plot, rising or falling LOESS Robust (sandwich) SEs; transformation; GLM M12 (brief); more advanced courses (full)
Non-Normal errors Q–Q plot, tails off diagonal Bootstrap CIs; robust regression; transformation; GLM M07/M10 (bootstrap); more advanced courses (rest)
Influential observations Cook’s distance, leverage; check_model()’s influence panel Fit with/without; investigate substantively; robust regression M12 (brief); more advanced courses (robust regression)
Multicollinearity VIF, performance::check_collinearity() Often none (report the wider CI); otherwise drop or combine redundant predictors, or ridge for prediction; center only for a predictor and its own interaction term M12 (brief); more advanced courses (ridge / regularization)
Non-additivity Lines by subgroup that stop being parallel Add an interaction term; report the effect at chosen values of the moderator M12 (the check, briefly); PSY 653 (moderation)
Independence violation Design knowledge + cluster diagnostics Site fixed effects for mean differences; cluster-robust SEs or mixed-effects models for residual dependence, both of which need more than a handful of clusters (REACH’s six sites are too few without small-sample corrections) M11 (site fixed effects); PSY 653 (multilevel models); more advanced courses (cluster-robust SEs)

Reporting the diagnostics in APA style

APA-style reporting · Regression diagnostics for the model with site

Diagnostics rarely get their own subsection — most often they earn a sentence or two in the Results confirming the model is sound (or flagging where it isn’t). APA’s reporting standards (JARS–Quant; Appelbaum et al., 2018) split this in two: the Method describes the planned diagnostics (how outliers and data distributions will be examined, and any transformations), and the Results report any problems with assumptions that could affect the findings. A defensible write-up for the model with site:

Regression diagnostics supported the reported inferences. Residual–fitted and scale–location plots indicated an approximately linear mean structure and roughly constant residual variance, apart from mildly smaller typical residuals near the ceiling of the bounded 1–5 outcome; a Normal Q–Q plot showed mild negative skew consistent with that boundedness. Given the sample size (N = 3,965), the mild skew does not threaten coefficient inference; HC3 heteroscedasticity-robust standard errors changed the treatment-effect SE by 0.6% (the other coefficients’ SEs changed by -19% to +11%). An exploratory treatment × baseline-benevolence interaction showed a larger estimated treatment effect at lower baseline benevolence (b = -0.27, 95% CI [-0.31, -0.22]; about 0.91 points at 1.5 SD below mean baseline benevolence vs 0.09 at 1.5 SD above), consistent with moderation, a scale ceiling, or both; the planned additive model is reported here, with moderation flagged as a question for follow-up work. No observation approached the conventional Cook’s-distance cutoff of 1 (largest D = 0.007), and in this model all variance inflation factors were below 1.5, indicating negligible influence and multicollinearity. Site entered the model as a fixed effect, matching the within-site randomization.

Note the structure: which diagnostics were examined → what they showed → why the departures that do exist don’t undermine the estimates (sample size and the mildness of the departure) → the one substantive signal (additivity) disclosed rather than buried → influence and multicollinearity dispatched in a single clause. Notice, too, what the paragraph does not do: it reports no battery of assumption tests (APA’s statistical guidelines warn against letting distributional tests substitute for examining residuals graphically; Wilkinson & the Task Force on Statistical Inference, 1999), and it never claims the assumptions hold perfectly. Diagnostics are judgments about magnitude, not pass/fail verdicts. The robust-SE clause is where a sensitivity check’s result goes — one clause naming the alternative fit and whether the focal estimate moved.


Looking ahead

This is the last Module of PSY 652. Together, M10–M12 give you the full first-course regression workflow: fit the model, query it for the estimand you care about, check that its assumptions are good enough, and report the result with appropriate caution — fit → query → check → report. Concretely: fitting models with continuous, binary, and multi-category predictors (M10, fit); extending to multiple predictors with the partial-effect interpretation and the estimand-centered workflow (M11, query); and diagnosing the assumptions those models rest on, knowing when violations matter, and remediating when they don’t hold (M12, check). Part 8’s APA box shows what the report step looks like.

One limit to carry forward: every check in this Module uses the same data the model was fit to, and as ROS (Section 11.8) notes, predictions evaluated on those data “are optimistic for assessing generalization.” External validation (new data) and cross-validation (fitting on part of the data and checking predictions on the part held out) evaluate how a model generalizes; later courses develop both.

Going forward, regression extends in five major directions. PSY 653, the second semester of the methods sequence, takes up moderation, mediation, logistic regression, and multilevel models; the other threads are developed in more advanced courses.

  1. Generalized linear models (GLMs). Logistic regression for binary outcomes (PSY 653); Poisson and negative-binomial regression for counts; ordinal regression for Likert-like outcomes (where the bounded-outcome wedge story we saw in this Module finds its principled treatment). Tools that turn a model into predictions and comparisons on the outcome’s own scale, such as the marginaleffects package, become especially useful, because GLM coefficients live on transformed scales (log-odds, log-rates) that audiences don’t interpret natively.

  2. Moderation and interactions. The full development of what M12 Part 7 pointed to. Interaction terms in regression, probing conditional slopes at specific moderator values, the Johnson–Neyman technique for identifying the moderator regions where the effect’s confidence interval excludes zero, three-way interactions, and the interplay between moderation and mediation.

  3. Multilevel (mixed-effects) models. The principled treatment of clustering, going beyond M11’s fixed-effects-by-site approach. Random intercepts, random slopes, partial pooling, and the bridge to Bayesian hierarchical models.

  4. Causal inference with DAGs — good and bad controls. When does adjusting for a covariate help, and when does it introduce bias? The directed-acyclic-graph (DAG) framework that distinguishes confounders (adjust), mediators (don’t adjust when you want the total effect), and colliders (definitely don’t adjust). Formal development of the Table 2 fallacy.

  5. Principled missing-data handling. Multiple imputation via mice, FIML for SEM, and the MCAR/MAR/MNAR taxonomy that distinguishes when listwise deletion is defensible from when it produces biased estimates.

Each builds on the foundation that M06–M12 laid. The R workflow stays consistent — tidyverse code with the native pipe, and models queried for the estimand you care about — so the new content slots into the habits you’ve already built.

Summary

Core ideas: Model Assumptions, Diagnostics, and Remediation

  1. Two assumptions come first: validity and representativeness. Do the data answer the research question, and does the sample speak for the population you want to describe? Design knowledge, not a plot, checks them — and selection on the outcome (including attrition related to it) is the threat to watch.
  2. OLS regression then rests on five statistical assumptions — in decreasing order of importance, additivity and linearity, independence of errors, equal variance (homoscedasticity), and normality of errors. Four can be explored through the residuals (which estimate the errors) or model comparisons; independence is judged mainly from the study design. The point estimates are unbiased under far weaker conditions than this full set; the standard errors and inferences require more.
  3. Plot the data with the fitted model first; then the residual–fitted plot is the linearity check. Read the LOESS smoother, not the point cloud — especially when the outcome is bounded and the cloud naturally takes a wedge shape. To check each numeric predictor for curvature, use a component-plus-residual plot (a binary or categorical predictor gets one mean per group, so it has no line to bend); an added-variable plot shows one predictor’s partial relationship (its slope is that predictor’s coefficient) and the points that pull on it.
  4. The Q–Q plot is the normality check, and the least important one. Normality concerns the errors, not the raw outcome or the predictors; mild skew matters little for the coefficients at large n and more for predicting individuals.
  5. The scale–location plot is the equal-variance check. A rising or falling LOESS smoother indicates heteroscedasticity; robust (“sandwich”) SEs are the practical fix.
  6. Cook’s distance and leverage flag potentially influential observations (high leverage alone isn’t influence). Investigate flagged points substantively — don’t reflexively delete. Report the model with and without them — both versions, not just the more agreeable one.
  7. The variance inflation factor (VIF) is a quick look at multicollinearity, whose cost already shows up as large standard errors. In a randomized trial, overlap among the covariates leaves the treatment estimate essentially untouched.
  8. Additivity is the assumption that each predictor’s effect is constant across the others’ values. A check lets the treatment effect vary with baseline benevolence; for REACH the lines stop being parallel, with a larger effect at lower baseline benevolence — moderation, a scale ceiling, or both — so the additive estimate is an overall summary. PSY 653 develops moderation in full.
  9. performance::check_model() is the one-stop visual diagnostic — six panels covering linearity, equal variance, normality, influence, VIF, and a comparison of the observed outcome with outcomes simulated from the model, in a single call. For the model with site, that last panel shows the ceiling the Normal-error model can’t reproduce.
  10. When does a violation matter? Three factors: (a) bias vs inefficiency — bias-inducing violations need structural fixes, inefficiency-inducing ones can often be tolerated or fixed with SE-level remedies; (b) sample size — large n lets the CLT cover mild non-Normality (but not heteroscedasticity or a misspecified mean); (c) inferential goal — coefficient inference is more robust than prediction-interval inference.
  11. When the three factors don’t settle it, run the analysis both ways. A sensitivity analysis refits under a defensible alternative — robust SEs, a dropped influential point, a different exclusion rule — and compares the focal estimate. Fix that focal quantity in advance, report both versions, and treat a conclusion that flips as a finding rather than a failure.
  12. The remediation toolkit ranges from light-touch (robust SEs, bootstrap CIs) to structural (transformations, interactions, alternative model classes). More advanced courses develop the heavy structural fixes; what M12 introduces is the diagnosis and the first-pass response.

References

The diagnostic rules and recommendations in this Module rest on the sources below; each link goes to the article or book. (ROS, the Module’s main reference, is listed under Credits.)

  • Aguinis, H., Gottfredson, R. K., & Joo, H. (2013). Best-practice recommendations for defining, identifying, and handling outliers. Organizational Research Methods, 16(2), 270–301. https://doi.org/10.1177/1094428112470848
  • Appelbaum, M., Cooper, H., Kline, R. B., Mayo-Wilson, E., Nezu, A. M., & Rao, S. M. (2018). Journal article reporting standards for quantitative research in psychology: The APA Publications and Communications Board task force report. American Psychologist, 73(1), 3–25. https://doi.org/10.1037/amp0000191
  • Cameron, A. C., & Miller, D. L. (2015). A practitioner’s guide to cluster-robust inference. Journal of Human Resources, 50(2), 317–372. https://doi.org/10.3368/jhr.50.2.317
  • Cook, R. D. (1977). Detection of influential observation in linear regression. Technometrics, 19(1), 15–18. https://doi.org/10.1080/00401706.1977.10489493
  • Echambadi, R., & Hess, J. D. (2007). Mean-centering does not alleviate collinearity problems in moderated multiple regression models. Marketing Science, 26(3), 438–445. https://doi.org/10.1287/mksc.1060.0263
  • Fox, J. (2016). Applied regression analysis and generalized linear models (3rd ed.). Sage. Book website
  • Fox, J., & Monette, G. (1992). Generalized collinearity diagnostics. Journal of the American Statistical Association, 87(417), 178–183. https://doi.org/10.1080/01621459.1992.10475190
  • Hoaglin, D. C., & Welsch, R. E. (1978). The hat matrix in regression and ANOVA. The American Statistician, 32(1), 17–22. https://doi.org/10.1080/00031305.1978.10479237
  • King, G., & Roberts, M. E. (2015). How robust standard errors expose methodological problems they do not fix, and what to do about it. Political Analysis, 23(2), 159–179. https://doi.org/10.1093/pan/mpu015
  • Knief, U., & Forstmeier, W. (2021). Violating the normality assumption may be the lesser of two evils. Behavior Research Methods, 53(6), 2576–2590. https://doi.org/10.3758/s13428-021-01587-5
  • Lin, W. (2013). Agnostic notes on regression adjustments to experimental data: Reexamining Freedman’s critique. The Annals of Applied Statistics, 7(1), 295–318. https://doi.org/10.1214/12-AOAS583
  • Loftus, G. R. (1978). On interpretation of interactions. Memory & Cognition, 6(3), 312–319. https://doi.org/10.3758/BF03197461
  • Long, J. S., & Ervin, L. H. (2000). Using heteroscedasticity consistent standard errors in the linear regression model. The American Statistician, 54(3), 217–224. https://doi.org/10.1080/00031305.2000.10474549
  • Lumley, T., Diehr, P., Emerson, S., & Chen, L. (2002). The importance of the normality assumption in large public health data sets. Annual Review of Public Health, 23, 151–169. https://doi.org/10.1146/annurev.publhealth.23.100901.140546
  • O’Brien, R. M. (2007). A caution regarding rules of thumb for variance inflation factors. Quality & Quantity, 41(5), 673–690. https://doi.org/10.1007/s11135-006-9018-6
  • Olvera Astivia, O. L., & Kroc, E. (2019). Centering in multiple regression does not always reduce multicollinearity: How to tell when your estimates will not benefit from centering. Educational and Psychological Measurement, 79(5), 813–826. https://doi.org/10.1177/0013164418817801
  • Rohrer, J. M., & Arslan, R. C. (2021). Precise answers to vague questions: Issues with interactions. Advances in Methods and Practices in Psychological Science, 4(2). https://doi.org/10.1177/25152459211007368
  • Simmons, J. P., Nelson, L. D., & Simonsohn, U. (2011). False-positive psychology: Undisclosed flexibility in data collection and analysis allows presenting anything as significant. Psychological Science, 22(11), 1359–1366. https://doi.org/10.1177/0956797611417632
  • Steegen, S., Tuerlinckx, F., Gelman, A., & Vanpaemel, W. (2016). Increasing transparency through a multiverse analysis. Perspectives on Psychological Science, 11(5), 702–712. https://doi.org/10.1177/1745691616658637
  • Vanhove, J. (2021). Collinearity isn’t a disease that needs curing. Meta-Psychology, 5. https://doi.org/10.15626/MP.2021.2548
  • Wilkinson, L., & the Task Force on Statistical Inference. (1999). Statistical methods in psychology journals: Guidelines and explanations. American Psychologist, 54(8), 594–604. https://doi.org/10.1037/0003-066X.54.8.594

Credits

  • These Module materials draw on Gelman, Hill, & Vehtari’s excellent book Regression and Other Stories (2020, Cambridge University Press), which the authors make free to view for personal use from the book’s web page. It’s a strong next step for going deeper into Part 3’s regression material.
  • The Module’s approach was also shaped by Richard McElreath’s Statistical Rethinking (2nd ed., 2020, CRC Press) and, more broadly, by his approach to teaching statistical modeling.
  • The estimand-centered framing follows Rohrer & Arel-Bundock (2026).