University of Amsterdam
2 October 2026
In this lecture we aim to:
Reading: Chapter 12 (§12.1–12.12)
Determine main effect while accounting for covariate
A covariate is a variable that can influence the DV. By adding a covariate, we reduce error/residual in the model.
“We propose to change the default P-value threshold for statistical significance from 0.05 to 0.005 for claims of new discoveries.”
Benjamin et al. (2018): Redefine statistical significance, 72 authors
Puppy therapy again (lecture 12), but now we also measured how much each person loves puppies.
\[{happiness} = {model} + {error}\]
\({model} = {independent} + {covariate}\) \(\color{white}{model} = {dose} + {puppy \; love}\)
\(\color{white}{model}\)
Linear model with \(k-1\) dummy variables:
\[\hat{y} = b_0 + b_1 {dummy}_1 + b_2 {dummy}_2 + b_3 covar\]
What are the beta coefficients when we fit a model that only has dose as a predictor variable?
(Intercept) dose15 mins dose30 mins
3.222222 1.652778 1.623932
\(b_{0} = 3.22\)
\(b_{15min} = 1.65\)
\(b_{30min} = 1.62\)
What are the beta coefficients when we fit a model that only has puppylove as predictor variable?
(Intercept) puppylove
3.6568758 0.2596796
\(b_{0} = 3.66\)
\(b_{love} = 0.26\)
What are the beta coefficients when we fit the full model (i.e., with both predictor variables)?
(Intercept) dose15 mins dose30 mins puppylove
1.7891883 1.7856801 2.2248813 0.4160421
\(b_{0} = 1.79\)
\(b_{15min} = 1.79\)
\(b_{30min} = 2.22\)
\(b_{love} = 0.42\)
For someone in the 15 mins group with a score of 4 on puppy love:
(Intercept) dose15 mins dose30 mins puppylove
1.7891883 1.7856801 2.2248813 0.4160421
\(b_{0} = 1.79\)
\(b_{15min} = 1.79\)
\(b_{love} = 0.42\)
How about someone in the 30 mins group with a score of 1 on puppy love?
The model that predicts only using group means:
\(\hat{y} = b_0 + b_1 {dummy}_1 + b_2 {dummy}_2\)
\(\hat{y} = 3.22 + 1.65 \times {dummy}_1 + 1.62 \times {dummy}_2\)
The model that predicts only using puppy love:
\(\hat{y} = b_0 + b_3 covar\)
\(\hat{y} = 3.66 + 0.26 \times {Puppy \; love}\)
The model that predicts with group and covariate:
\(\hat{y} = b_0 + b_1 {dummy}_1 + b_2 {dummy}_2 + b_3 covar\)
\(\hat{y} = 1.79 + 1.79 \times {dummy}_1 + 2.22 \times {dummy}_2 + 0.42 \times {Puppy \; love}\)

Model SS of full model:
To see what is explained by group, we subtract the Model SS of the covariate model:
To see what is explained by covariate, we subtract the Model SS of the group model:
| Dose | Puppy love | Sum | |
|---|---|---|---|
| Alone (one-predictor model) | 16.84 | 6.73 | 23.57 |
| Unique (full model minus the other) | 25.19 | 15.08 | 40.27 |
| Full model | 31.92 |
\(MS_{model-group} = \frac{25.185}{2} = 12.593\)
\(F = \frac{{MS}_{model-group}}{{MS}_{residual}} = \frac{{SIGNAL}}{{NOISE}} = \frac{12.593}{3.04} = 4.14\)
Without puppy love (Output 12.4):

With puppy love (Output 12.5):

Power becomes quite abstract when we increase the complexity (i.e., number of predictors) of our models. We can make an F-distribution that symbolizes the alternative distribution by shifting the distribution more to the right (although the interpretability becomes pretty murky..)
Marginal means are estimated group means, while keeping the covariate equal across the groups
What are happiness averages in each group, if they would all score the same on puppy love?
See also this blogpost
Adjusted:
dose mean.adj
1 No puppies 2.926370
2 15 mins 4.712050
3 30 mins 5.151251
Observed:
dose happiness
1 No puppies 3.222222
2 15 mins 4.875000
3 30 mins 4.846154

ANOVA on puppy love: F(2, 27) = 1.98, p = 0.158

| Puppy love | No puppies | 15 mins | 30 mins | Dose: p |
|---|---|---|---|---|
| 0 | 0.59 | 2.31 | 5.28 | 0.003 |
| 2.73 (average) | 2.68 | 4.55 | 4.69 | 0.025 |
| 5 | 4.41 | 6.41 | 4.19 | 0.138 |
What you should know: how to assess, robust alternatives, and why these assumptions matter
Muris et al. (2008): Space invaders
Does negative feedback training make children interpret situations more negatively?
training: positive vs. negative feedback in 30 scenariosint_bias: high = interprets situations negativelyage, gender and scared (child anxiety)
Scientific & Statistical Reasoning