Week 09: Multiple Regression II

JAMOVI version · Date: October 22, 2026

Today…

Groups meet predictors.

  • A group and a continuous predictor in the same model
  • Two lines, same slope: what “controlling for” looks like on a plot
  • What if the slope is different for each group? (interactions)
  • Simple slopes: the only honest way to report one
  • Why centering suddenly matters
  • An interaction that isn’t there — and what to do about it

Note

This is the JAMOVI version of Week 9. Same data, same numbers, same interpretations. The R version is here.

Two threads, now braided

Week 6

A group goes in Factors. The intercept becomes the reference group’s mean.

Week 8

Two things in Covariates and each coefficient becomes a holding-constant comparison.

This week: Factors and Covariates in the same analysis, and then the question neither week could ask —

Is the slope the same for every group?

Part 1: Group + Continuous

20 students, two things we know about them 🎓

Daily study hours, final grade (10-point scale), and whether the student worked with a tutor.

🖱️ Open and set up

☰ Menu → Open → Browse → tutor.csv

  1. Double-click the tutor column header → Measure type: Nominal
  2. Open Levels and label them: 0 = No tutor, 1 = Tutor
  3. Confirm study and grade are Continuous

🖱️ Describe by group

Exploration → Descriptives: study and grade → Variables, tutor → Split by

n study M grade M grade SD
No tutor 10 0.995 6.76 1.14
Tutor 10 1.636 8.89 0.53

Two separate stories

🖱️ Two quick regressions

Regression → Linear Regression, grade → Dependent Variable

  • First: study → Covariates
  • Then: remove it and put tutor → Factors
Model b p R²
grade ~ study 1.750 < .001 .640
grade ~ tutor 2.130 < .001 .616

Two strong, significant, nearly equally powerful predictors. Should we just add them up?

Look first 👀

🖱️ Grouped scatterplot

Exploration → scatr → Scatterplot

  • study → X-Axis, grade → Y-Axis
  • tutor → Group
  • Regression Line: None (for now)

Notice where the tutored students sit on the x-axis. They also study more (1.64 vs 0.99 hours).

Regression → Correlation Matrix: r(study, tutor) = .52. The two predictors are entangled.

Both at once

🖱️ One model, two kinds of predictor

Regression → Linear Regression

  • grade → Dependent Variable
  • study → Covariates
  • tutor → Factors
  • Reference Levels: confirm tutor reference = No tutor
Predictor b SE t p
Intercept 5.588 0.320 17.47 < .001
study 1.178 0.257 4.59 .0003
tutor: Tutor – No tutor 1.375 0.318 4.32 .0005

R² = .829, adj. R² = .808, RSE = 0.610

Both effects shrank. Both are still real.

Predictor Alone Together Change
study 1.750 1.178 −33%
tutor 2.130 1.375 −35%
  • Part of “the tutoring effect” was that tutored students study more
  • Part of “the studying effect” was that heavy studiers were more likely to have a tutor
  • Hold one still and each one keeps only the part that is its own

Important

Shrinkage is not failure. The bivariate numbers were double-counting shared credit. These are the honest ones — and both survive.

What the model looks like

\[\widehat{Grade} = 5.588 + 1.178(Study) + 1.375(Tutor)\]

  • Tutor is 0 or 1, so this is two lines
  • No tutor: \(\widehat{Grade} = 5.588 + 1.178(Study)\)
  • Tutor: \(\widehat{Grade} = 6.963 + 1.178(Study)\)

Same slope. Different intercept. The model has assumed that tutoring shifts the line up without changing its steepness.

See the parallel lines

🖱️ Estimated Marginal Means

In the same panel, open Estimated Marginal Means:

  1. Click + Add New Term, move study and tutor into the same term box
  2. ✅ Marginal means plots

Two straight, parallel lines. The gap between them is 1.375 at every value of study — which is not something we found, it is something we imposed.

Did the group earn its place?

🖱️ Model Builder

  • study → Block 1
  • + Add New Block → tutor → Block 2
  • Model Comparisons → ✅ Compare models
Model R² adj. R² RSE
1. study .6403 .6203 0.858
2. + tutor .8285 .8083 0.610

ΔR² = .188, F(1, 17) = 18.66, p = .0005

Tip

This is exactly the midterm’s Part 6 table — and JAMOVI builds it for you.

Part 2: What If The Slopes Differ?

The assumption we never checked

Parallel lines say: tutoring helps every student by the same amount, no matter how much they study.

Is that plausible?

  • Maybe tutoring mostly helps students who are not putting in hours
  • Maybe tutoring compounds — it helps most the students who already study
  • Maybe it really is a constant boost

We can test it. All it takes is one more term.

Adding an interaction in JAMOVI

\[Y = b_0 + b_1X + b_2D + b_3(X \times D) + e\]

🖱️ The one menu people miss

In Model Builder:

  1. In the left Predictors list, click study, then Ctrl/Cmd-click tutor so both are highlighted
  2. Click the arrow’s dropdown ▾ next to the Block
  3. Choose Interaction

study * tutor appears in the block alongside both main effects. Never remove the main effects.

Reading the interaction

Term b p What it is
Intercept 5.012 < .001 grade for No tutor, study = 0
study 1.757 < .001 slope for the reference group
tutor 2.920 .0003 group gap at study = 0
study * tutor −1.171 .017 how much the slope changes for tutored students

R² = .881, adj. R² = .859, RSE = 0.523

Important

Once there is an interaction in the model, study is no longer “the” effect of studying. It is the effect of studying for the reference group.

Simple slopes

No tutor

\(b_1 = 1.757\)

Each extra hour → +1.76 points

Tutor

\(b_1 + b_3 = 1.757 - 1.171\)

Each extra hour → +0.59 points

Three times steeper without a tutor.

Tip

JAMOVI’s Linear Regression does not print simple slopes, so add them yourself from the coefficient table — reference slope, then reference slope + interaction.

If you want them tested, install the GAMLj module (⊞ Modules → jamovi library → GAMLj) and use Linear Models → Simple Effects. Same model, extra output.

Now the picture makes sense

🖱️ Plot it

Estimated Marginal Means → Marginal means plots again, now that the interaction is in the model.

Or: Exploration → scatr → Scatterplot with tutor as Group and Regression Line: Linear — JAMOVI fits a separate line per group.

The lines converge. Tutoring buys a lot for a student studying half an hour a day, and nearly nothing for one studying two hours.

Say it in words

An interaction is always symmetric. Both of these are the same finding:

  • The benefit of tutoring depends on how much a student studies
  • The payoff of studying depends on whether a student has a tutor

Tip

Pick the direction that answers your research question, say it in one sentence, then show the plot. A reader will believe the plot before they believe the coefficient.

Did the interaction earn its place?

🖱️ Block 3

Add study * tutor as its own Block 3, then read Model Comparisons.

Model R² adj. R² RSE
additive .8285 .8083 0.610
+ interaction .8811 .8588 0.523

ΔR² = .053, F(1, 16) = 7.08, p = .017. Adjusted R² rose. Keep it.

⚠️ Centering is no longer optional

In the interaction model, tutor = 2.92 was the group gap at study = 0 — a student who studies zero hours a day. Extrapolation.

🖱️ Center the predictor

Data → Compute, new variable study_c, formula:

study - VMEAN(study)

Then swap study_c for study everywhere in the model.

  • Mean study = 1.316 hours
  • Group gap at the mean: 1.379, not 2.92
  • The study_c slope and the interaction are identical to before — centering did not change the model, only where we read it

Why that matters

Important

Centering a predictor moves the intercept and the other variable’s main effect to a meaningful place. It does not change the interaction, the fit, or the p-value for the interaction.

In a model with an interaction, always center your continuous predictor — or be ready to explain what X = 0 means.

Part 3: When It Isn’t There

100 children, sleep, and parenting 😴

🖱️ Open the data

☰ Menu → Open → Browse → child_wellbeing.csv

  • parenting_style → Nominal; under Reference Levels set the reference to Authoritative
  • sleep_hours, anxiety_score → Continuous
n sleep M anxiety M anxiety SD
Authoritative 47 9.51 14.45 5.42
Permissive 53 9.36 29.96 6.46

Build it up

🖱️ Model Builder, two blocks

anxiety_score → Dependent Variable · sleep_hours → Covariates · parenting_style → Factors

Block 1 = sleep_hours, Block 2 = parenting_style

Model sleep_hours b parenting b R²
sleep only −4.782 — .2569
+ parenting −4.262 +14.875 .8330

ΔR² = .576, F(1, 97) = 334.53, p < .001

Note what did not happen

The sleep slope moved from −4.78 to −4.26 — a small shrink.

The two groups sleep almost identically (9.51 vs 9.36 hours). With the predictors nearly unrelated, parenting had almost nothing to take back from sleep — it just explained a huge amount of new variance.

Test the interaction anyway

🖱️ Block 3

Ctrl/Cmd-click sleep_hours and parenting_style → arrow ▾ → Interaction → put it in Block 3.

sleep_hours * parenting_style = −0.353, SE = 0.815, t = −0.43, p = .666

The fit table tells the story

Model R² adj. R² RSE
additive .8330 .8295 4.048
+ interaction .8333 .8281 ⬇️ 4.066 ⬆️

ΔR² = .0003, F(1, 96) = 0.19, p = .666.

Adjusted R² went down and the typical miss got worse. Drop it.

Parallel lines — this time earned

🖱️ Plot

Exploration → scatr → Scatterplot: sleep_hours → X, anxiety_score → Y, parenting_style → Group, Regression Line: Linear

Two lines, essentially the same slope, clearly different heights. Sleep matters the same amount in both groups; the groups just start in different places.

The discipline

  1. Fit the interaction if you have a reason to expect one
  2. Test it
  3. If it is not there, report that and interpret the additive model
  4. Do not keep an interaction you cannot defend just because it was your idea

Warning

A non-significant interaction is not evidence that the slopes are identical — especially with small groups, where you have very little power to detect a difference in slopes. “We found no evidence of moderation” ≠ “there is no moderation.”

The write-up: interaction present

Final grade was regressed on daily study hours (centered), tutoring status, and their interaction (N = 20). The full model accounted for 88.1% of the variance in grades, F(3, 16) = 39.53, p < .001. The interaction was significant, b = −1.17, SE = 0.44, t(16) = −2.66, p = .017, ΔR² = .053. Simple slopes indicated that each additional hour of daily study was associated with a 1.76-point increase in grade for students without a tutor, but only a 0.59-point increase for students with a tutor. At the mean level of study, tutored students scored 1.38 points higher than untutored students (p < .001).

The write-up: interaction absent

Anxiety was regressed on hours of sleep and parenting style (N = 100). The additive model accounted for 83.3% of the variance, F(2, 97) = 241.87, p < .001. Each additional hour of sleep was associated with a 4.26-point decrease in anxiety, holding parenting style constant (p < .001), and children with permissive parenting scored 14.88 points higher than those with authoritative parenting, holding sleep constant (p < .001). A sleep × parenting interaction was tested and was not supported, b = −0.35, p = .666, ΔR² = .0003; the additive model is therefore reported.

Tip

Report that you tested it. A reader who cannot tell whether you looked will assume you looked and did not like the answer.

🛠️ Activity: Did the Program Work?

Tip

Week 9 Exercises · ~45 min · Pairs

30 students, three instructional groups, pre-test and post-test scores.

  • One group scores significantly higher at post-test
  • Then you control for where they started
  • The entire group effect disappears — F(2, 26) = 0.03, p = .97

Every step in the activity is given in both R and JAMOVI.

Open the activity

✍️ Wrap-Up

Finish these at the bottom of your activity file:

  1. What does an interaction let you say that two separate models cannot?
  2. Why can’t you interpret the main effect of a group once an interaction is in the model?
  3. One thing that is still muddy → journal.

For next time

📂 Midterm Project — due Tuesday 10/27 at 11:59pm

Five days. If Part 6 is not drafted by this weekend, it will not be good by Tuesday.

You are not required to include an interaction. If you fit one, test it and report the test either way.

📋 Lab 9 — Groups, Slopes & Interactions, due Tuesday 11/3 at 11:59pm — posted today, start it after the midterm is in

📖 Chapter 11 — ROS · Chapter 12.1 — ST (assumptions and diagnostics)

Next week: everything we have been glancing at on residual plots becomes a named assumption with an actual test.