Slope of log_freq: −68 ms per unit, holding word length constant at 5 letters. Drag word length — the slope stays −68, the line shifts up or down.
word length = 2
word length = 5
word length = 10
All three lines have the same slope (−68 ms per unit of log frequency). Word length only shifts the line up or down; it never changes the slope. That's what "holding word length constant" means!
The regression plane includes two predictors, creating one flat surface in 3D space. Every slice at a fixed word length (red line) has slope −68 for log_freq. Every slice at a fixed log_freq (amber line) has slope +19 for word length. Drag to rotate.
drag to rotate · scroll to zoom
red: effect of log_freq at chosen word length
amber: effect of word length at chosen log_freq
● prediction at intersection
At log_freq = 5.0 and word length = 5: predicted RT = 423 ms
Both lines have slope 5.0 pts/hr. Prior class shifts the line up by exactly 9.2 points at every study time. Not that the gap is constant! Blondie knew best: Multiple regression forces Parallel Lines.
no prior class (prior_class = 0)
prior class (prior_class = 1)
Both lines have the same slope (5.0 pts/hr). Prior class only changes the intercept because the dummy code of 0 or 1 just gets multiplied by 9.2 and added onto the intercept.
Two regression lines—one for each group—shown in 3D space. Both have the same slope (5.0 pts/hr), so they run perfectly parallel. Prior class shifts the green line up by 9.2 points at every value of study time. The third axis (prior_class) only has two meaningful values: 0 and 1. The red line shows the effect of study time through the current prediction point on each line. Drag to rotate.
Slope of log_freq: −68 ms per unit, holding word length constant at 5 letters. Drag word length and you'll see that the slope stays at −68; the line just shifts up or down.
word length = 2
word length = 5
word length = 10
The three lines have different slopes — the slope of log_freq changes depending on word length. That is what an interaction means: the effect of one predictor depends on the value of the other.
The regression surface is now curved: Because the slope of log_freq changes with word length, the plane bends into a saddle shape. Every slice at a fixed word length is still a straight line, but those lines are no longer parallel. In other words, the interaction tells you how much the effect of X₁ is tuned up or down by X₂.
drag to rotate · scroll to zoom
red: effect of log_freq at chosen word length
amber: effect of word length at chosen log_freq
● prediction at intersection
At log_freq = 5.0 and word length = 5: predicted RT = 514 ms
The gap between the two lines grows as study time increases; that's the interaction. Prior class doesn't just shift the line up, it changes the slope.
no prior class (prior_class = 0)
prior class (prior_class = 1)
These lines are not parallel: Students with a prior class show a steeper benefit from studying. The interaction term changes the slope for the prior class group.
The two lines in 3D space are no longer parallel: Prior class changes the slope of study time, so the green line is tilted more steeply than the purple one. The gap between them grows as study time increases.