Chapter 6 of 7

Interactions with Continuous Variables

When the effect of salary depends on age

In Chapter 5 we forced every age to have the same salary slope. But what if the salary effect changes with age?

4681012Annual Salary (M€)01020304050Market Value (M€)age 22age 28age 34

The additive model assumes that an extra €1M in salary has the same effect on market value regardless of age. But what if the salary effect is different for younger vs older players?


An interaction term lets the salary slope change with age. We multiply salary × age.

We add a new variable: salary × age. This lets the effect of salary depend on the player's age.

y^=b0+b1×salary+b2×age+b3×(salary×age)\hat{y} = b_0 + b_1 \times \text{salary} + b_2 \times \text{age} + b_3 \times (\text{salary} \times \text{age})
SalaryAgeSalary × Age
522110
532160
1022220
1032320

b₃ tells us how much the salary slope changes per year of age. If b₃ is negative, the salary effect weakens as players get older.


Now the regression lines are no longer parallel — each age gets its own slope.

4681012Annual Salary (M€)01020304050Market Value (M€)age 22age 28age 34
Estimated regression equation
y^=33.8+7.05×salary1.23×age0.124×(salary×age)\hat{y} = 33.8 + 7.05 \times \text{salary} -1.23 \times \text{age} -0.124 \times (\text{salary} \times \text{age})
b₀ 33.8
b₁ (salary) 7.05
b₂ (age) -1.23
b₃ (interaction) -0.124
Age 22
y^=6.7+4.32×salary\hat{y} = 6.7 + 4.32 \times \text{salary}
Age 28
y^=0.7+3.58×salary\hat{y} = -0.7 + 3.58 \times \text{salary}
Age 34
y^=8.2+2.83×salary\hat{y} = -8.2 + 2.83 \times \text{salary}

A simple slopes analysis quantifies the effect of salary at specific ages. The standard practice is to evaluate at the mean and at ±1 SD of the moderator.

After finding a significant interaction, the next question is: what is the actual effect of salary for a player of a given age? Let's find out by plugging in a specific age. Say age = 25:

Start with the full interaction equation
y^=33.8+7.05×salary1.23×age0.124×(salary×age)\hat{y} = 33.8 + 7.05 \times \text{salary} -1.23 \times \text{age} -0.124 \times (\text{salary} \times \text{age})
Plug in age = 25
y^=33.8+7.05×salary1.23×250.124×(salary×25)\hat{y} = 33.8 + 7.05 \times \text{salary} -1.23 \times 25 -0.124 \times (\text{salary} \times 25)
Group the salary terms together
y^=(33.81.23×25)new intercept+(7.050.124×25)salary effect at age 25×salary\hat{y} = \underbrace{(33.8 -1.23 \times 25)}_{\text{new intercept}} + \underbrace{(7.05 -0.124 \times 25)}_{\text{salary effect at age 25}} \times \text{salary}
Simplify
y^=3.0+3.95×salary\hat{y} = 3.0 + \colorbox{#f3e8ff}{3.95} \times \text{salary}

The highlighted coefficient 3.95 is the simple slope of salary at age 25 — each extra €1M in salary adds 3.95 M€ in market value for a 25-year-old.

We don't need to redo this algebra every time. The pattern gives us a shortcut: the salary coefficient at any age is always b₁ + b₃ × age. This is called the simple slope.

simple slope of salary=b1+b3×age\text{simple slope of salary} = b_1 + b_3 \times \text{age}

A simple slopes analysis evaluates this at specific, meaningful values of the moderator. The standard practice (Aiken & West, 1991) is to pick three values: the mean and ±1 standard deviation.

Following Aiken & West (1991), we evaluate at three values of age
Mean age = 26.8 | SD = 4.1
Age valueAgeSimple slope
Mean − 1 SD22.7+4.23
Mean26.8+3.72
Mean + 1 SD31.0+3.21

Each value tells us: for a €1M salary increase at that age, how much does predicted market value change?

Simple slope vs age 20253035Age (years)-1.00.01.02.03.04.05.0Salary slope−1SDMean+1SDslope = b₃ = -0.124

The slope of this line is b₃ itself — each extra year of age shifts the salary effect by -0.124.

Regression line at age 27
4681012Salary (M€)01020304050
20 34

Try setting age to 25 — you'll get 3.95, matching our hand calculation above.

simple slope=b1+b3×age=7.05+(0.124)×27=3.70\text{simple slope} = b_1 + b_3 \times \text{age} = 7.05 + (-0.124) \times 27 = 3.70
Salary effect at age 27 +0.00 M€ per extra €1M in salary

In practice, we mean-center the predictors before creating the interaction term. The model fit stays the same, but b₁ and b₂ become much easier to interpret.

In our uncentered model, b₁ is the salary slope when age = 0. But no player is 0 years old — that coefficient has no real-world meaning.

Mean-centering means subtracting the mean from each predictor before fitting the model. Now age = 0 corresponds to the average age in the sample, and b₁ becomes the salary slope for a player of average age — exactly the simple slope at the mean.

salaryc=salarysalaryˉ,agec=ageageˉ\text{salary}_c = \text{salary} - \bar{\text{salary}}, \quad \text{age}_c = \text{age} - \bar{\text{age}}
Mean salary = 7.7 M€ | Mean age = 26.8 years
Uncentered coefficients
b₀ (intercept) 33.82
b₁ (salary) 7.05
b₂ (age) -1.23
b₃ (salary × age) -0.124

b₁ = salary effect when age = 0

Mean-centered coefficients
b₀ (intercept) 29.18
b₁ (salaryc) 3.72
b₂ (agec) -2.19
b₃ (salaryc × agec) -0.124

b₁ = salary effect at mean age (26.8)

b₃ (the interaction) is identical in both models: -0.124. Centering does not change the interaction.
R² is identical: 98.8%. The model fit does not change.
In the centered model, b₁ = 3.72 matches the simple slope at the mean age from our table above.

Mean-centering is standard practice whenever you include interaction terms with continuous variables. It makes the lower-order coefficients (b₁, b₂) directly interpretable and is recommended by Aiken & West (1991).


Compare: parallel vs non-parallel — just like Chapter 3, but now the lines fan out smoothly.

4681012Annual Salary (M€)01020304050Market Value (M€)age 22age 28age 34
Additive R² 97.2%
Interaction R² 98.8%
Additive Same slope at every age
Interaction Slope changes with age

Putting it all together — what does this model actually tell us about football players?

Mean-centered interaction model
y^=29.2+3.72×salaryc2.19×agec0.124×(salaryc×agec)\hat{y} = 29.2 + 3.72 \times \text{salary}_c -2.19 \times \text{age}_c -0.124 \times (\text{salary}_c \times \text{age}_c)
R² = 98.8% | salaryc = salary − 7.7 | agec = age − 26.8
b₀ 29.2

A player earning the average salary (7.7 M€) at the average age (27) has a predicted market value of 29.2 M€.

b₁ 3.72

For a player of average age, each additional €1M in salary is associated with a 3.72 M€ increase in market value.

b₂ -2.19

For a player earning the average salary, each additional year of age is associated with a 2.19 M€ decrease in market value.

b₃ -0.124

The salary advantage weakens by 0.124 M€ for each additional year of age. A young player benefits more from a high salary than an older player does.

In plain language: higher salary predicts higher market value, but this effect is strongest for young players and gradually fades with age. A €1M salary bump is worth about 4.2 M€ in market value for a 23-year-old, but only 3.2 M€ for a 31-year-old. The interaction model explains 98.8% of the variance in market value.

Built with SvelteKit + D3.js