EDF9850_Interaction_Review
Watch on YouTube →
Overview
Lesa Hoffman explains how interaction terms in linear models represent moderation: the effect of one predictor changes with another, so interacting predictors' main-effect coefficients are conditional on the moderator being zero. She shows how centering makes those coefficients interpretable and how to use R linear combinations to calculate predictions and conditional slopes, extending the same reasoning to multiple interactions, categorical treatments, and three-way interactions.
Key takeaways
- An interaction coefficient describes how one predictor's slope changes per unit of the other predictor; it does not replace either constituent main effect.
- In an interaction model, a main-effect coefficient is the predictor's slope at zero for its moderator, so centering can shift that reference point to a meaningful value such as 12 years of education.
- A positive interaction strengthens a positive slope and makes a negative slope less negative; a negative interaction weakens a positive slope and makes a negative slope more negative.
- To compute a conditional slope, retain every model term containing the predictor of interest, factor out that predictor, and plug moderator values into the remaining terms.
- A categorical variable with four groups needs three indicator coefficients against a reference group and three interaction coefficients to let those group differences vary with a continuous moderator.
- A nonsignificant main-effect coefficient in an interaction model only describes the effect at the moderator's zero value, not whether the predictor matters at every moderator value.
Chapters
- An interaction is the product of two predictors, and means the effect of X depends on Z, or the effect of Z depends on X.
- Calling one variable the moderator and the other the predictor is a substantive choice; the interaction mathematics works in either direction.
- Regression models let analysts choose which interactions to include, unlike the common ANOVA practice of fitting all combinations of categorical predictors.
- Keep both constituent main effects in a model regardless of significance, because the interaction modifies their slopes rather than replacing them.
- A predictor in an interaction has a unique conditional slope: its main-effect coefficient applies when the interacting predictor equals zero.
- With an X slope of 10 and an X-by-Z coefficient of 2, the X slope is 10 at Z=0, 12 at Z=1, and 14 at Z=2.
- Matching slope and interaction signs strengthen an effect; opposite signs weaken it, covering all four combinations of positive or negative slopes and interactions.
- For GPA, parent attitudes scored 1 to 5, and parental education in years, uncentered main effects refer to attitudes or education values of zero, which may be impossible or implausible.
- Centering attitudes at 3 and education at 12 makes the intercept the predicted GPA at those values and makes the main-effect slopes conditional on realistic reference points.
- After centering, the example's attitude and education coefficients are 7 and 3.5; the interaction coefficient remains unchanged in this two-way model.
- The uncentered model can still predict GPA, such as 75 at attitudes=3 and education=12, even when its individual main-effect coefficients are hard to interpret.
- For predictions from the centered model, use multipliers for the intercept, each centered predictor, and their product; attitudes=5 and education=16 yield multipliers 1, 2, 4, and 8.
- Hoffman describes using R's glht-style linear-hypothesis machinery and coefficient vectors to calculate model-implied predictions, slopes, standard errors, and tests.
- To find a conditional slope, keep only model terms containing the predictor of interest, factor out that predictor, and evaluate the remaining expression at the moderator value.
- For an attitude slope at education=10, centered at 12, the coefficient combination is the attitude main effect minus 2 times the interaction coefficient; education=18 uses plus 6 times the interaction.
- In a model containing X-by-Z and W-by-Z, the W and X main-effect coefficients apply when Z=0, while Z's main-effect coefficient applies when both X=0 and W=0.
- To calculate Z's slope at particular X and W values, combine its main effect with both interaction terms, weighted by those values.
- A categorical predictor with three groups needs two indicator slopes against a reference group, and typically two corresponding interaction slopes with a continuous moderator.
- The same procedure applies to any predictor: identify every term containing it, factor it out, and set the moderator values in the resulting linear combination.
- For control plus three treatment groups, indicator variables D1, D2, and D3 encode each treatment-versus-control difference.
- If treatment effects vary by age, the model requires three treatment-by-age interaction coefficients, one for each treatment indicator.
- A joint F test can assess whether the three interaction coefficients are collectively zero, answering whether treatment effects depend on age.
- With age centered at 85, the treatment main effects describe treatment-versus-control differences at age 85; the age main effect describes the age slope in the control group.
- A three-way interaction modifies the associated two-way interactions, which in turn modify main-effect slopes and ultimately predicted outcomes.
- In a three-predictor model, each main-effect coefficient is conditional on the other two predictors being zero, while each two-way interaction is conditional on the third predictor being zero.
- A nonsignificant main effect does not establish that a predictor never matters; it indicates no effect at the moderator's zero value, and effects may differ elsewhere.
- For any conditional slope, write the model equation, retain every term containing the predictor, and evaluate the other predictors at the desired moderator values.
Transcript excerpt
0:01 Hello folks, welcome back to my home office. I am here today to do a review lecture. I borrowed from my other regression class all about interaction terms. So for those of you who have not seen this content in this way, especially how to get additional output provided via R, this is for you. If you are someone who prefers to read these things rather than listen, by the way, um chapter 2 of my textbook would be the place I would go. that is um the textbook is available on your reading list from the library for free. So chapter 2 would be the b the place to go to go with this. This is the in-class version. So I had some activities that I do live where we fill in things together. So this is the answer key version that has already been completed. So hopefully it goes a little bit faster, but I would encourage you to try
0:49 to think about how you would have answered the questions as well rather than just passively listening. So away we go. So an interaction term in a general linear model is the context that I'm speaking of today. However, there is nothing different about how to interpret interactions and their corresponding conditional main effects in multi-level models or otherwise. So this is a more general concept just executed in a simpler modeling framework. So an interaction is when you have a multiplication of two variables such that the effect of X depends on Z and the effect of Z depends on X as two hypothetical predictors here. So the idea is moderation the extent to which the effect of a predictor depends on the level of another predictor. And in this
1:37 context you'll often see one of the
This is the start of the transcript. Save this video free for the whole transcript, searchable and time-coded.
Related notes
Summary, takeaways, and chapters were generated by AI from the video's transcript and may contain errors. The video belongs to its creator, Lesa Hoffman.