For female professors, male = 0, so the \hat\beta_2 and \hat\beta_3 terms become zero and drop out: \widehat{\text{eval}} = \hat\beta_0 + \hat\beta_1(\text{beauty})
For male professors, male = 1, so we get both a different intercept and a different slope for beauty: \widehat{\text{eval}} = (\hat\beta_0 + \hat\beta_2) + (\hat\beta_1+\hat\beta_3)(\text{beauty})
The estimated beauty slope is larger for men than for women
So the fitted gender gap grows with beauty
Whether we can trust that difference is a question for the confidence intervals
Main effects and interaction effects
In a model with an interaction term X_1X_2, you must also keep the main effects: the variables that are being interacted together. (R does this automatically when you use * in the lm command.)
The main effect of X_1 represents the predicted change in Y for a 1-unit change in X_1, holding X_2 constant at zero.
Main effects in our model
The main effect gendermale (0.20) is how much higher men are predicted to score than women, but only for an average-looking professor (beauty = 0).
The main effect beauty (0.09) is the predicted change in evaluation score for each additional beauty point, but only among women (gendermale = 0).
When zero is not meaningful
A main effect describes a slope or group difference when the other variable equals 0.
In this data set, beauty = 0 describes an average-looking professor, so 0 is a sensible reference point.
If 0 is outside the useful range, the main-effect coefficient may not answer a useful business question.
In that case, use the fitted equation to calculate a slope or prediction at an observed value of the other variable.
Coefficient confidence intervals
confint() gives a 95% confidence interval for each population coefficient.
beauty:gendermale: the additional beauty effect for men.
Which row would you use to assess whether this additional effect differs from zero?
LC: do the slopes differ?
Quantity
95% CI
Women’s beauty slope
(-0.005, 0.180)
Additional beauty effect for men
(-0.013, 0.238)
Is there evidence at the 5% level that the beauty slopes differ for men and women?
A. Yes
B. No
Which interval supports your choice?
Interpreting the intervals
Quantity
R coefficient
Women’s beauty slope
beauty
Additional beauty effect for men
beauty:gendermale
Among women, the 95% CI for the beauty slope is (-0.005, 0.180). It includes 0, so the data are inconclusive about a beauty-evaluation association for women.
The 95% CI for the additional beauty effect for men is (-0.013, 0.238). It includes 0, so this additional effect is not statistically significant at the 5% level.
The interaction row directly answers whether the two population slopes differ.
Units: evaluation points per one-point increase in beauty.
The men’s interval excludes 0, but that does not show the men’s and women’s slopes differ. The interaction interval answers that question, and it includes 0.
Two categorical variables
Gender and tenure
Two simple models (eval ~ gender and eval ~ tenure) tell us that:
Male professors tend to get higher evaluation scores than female professors (\hat\beta_{\text{male}} = 0.168)
Professors with tenure tend to get lower evaluation scores than professors without tenure (\hat\beta_{\text{tenure}} = -0.173)
But what if the gender gap is different for professors with tenure vs professors without tenure?
\widehat{\text{offer}} = \underbrace{[13438 + (-1205)(\text{round})]}_{\text{intercept for this round}} + \underbrace{[-0.132 + 0.124(\text{round})]}_{\text{slope of average in this round}}(\text{average})
The slope of average increases by about $0.124 per dollar for each additional round. In friendlier units: each round, a $1,000 increase in the average remaining is worth about $124 more in the offer.
The impact of each additional round played on the banker’s offer increases by $0.124 for each additional dollar in the average amount remaining.
average is the slope of average at round = 0, outside the observed rounds.
round is the slope of round when average = 0 dollars.
average:round: we are 95% confident that each additional round increases the slope of average by between 0.106 and 0.142 dollars per dollar. The interval excludes 0.
LC: calculate the Round 7 slope
R coefficient
Estimate
average
-0.132
average:round
0.124
Calculate the estimated slope of average in Round 7.
Then interpret it: for a $1,000 increase in the average remaining, how much larger is the predicted offer?
These are point estimates. A confidence interval for one selected round would require combining coefficient uncertainty and covariance, which we will not calculate here.
Interpreting the selected slopes
In Round 1, a $1,000 increase in the average remaining changes the predicted offer very little.
In Round 5, it is associated with about a $487 larger predicted offer.
By Round 9, it is associated with about a $982 larger predicted offer, close to dollar-for-dollar.
The interaction confidence interval excludes 0, providing evidence that this slope changes across rounds.
LC: predict before we watch
A contestant reaches round 6 with $5, $5,000, $25,000, $200,000, and $750,000 still on the board.
Using the fitted interaction model:
What offer does the model predict?
What is the 95% prediction interval for one new offer?
Enter the predicted offer and the two interval endpoints in LC.
Prediction interval for one offer
Prediction interval: a range for one new offer is $99,607 to $152,237. Under the model assumptions, intervals constructed this way cover actual offers in about 95% of comparable new cases.
A rough approximation is the predicted offer \pm\ 2 \times \text{RSE}. Here, that gives ($99,794, $152,050).
It is usually better to use the prediction interval from R than a rough approximation.
Let’s see how well the model works to make a prediction!
When should you use interactions in a model?
From Perusall:
“I’m a bit confused on how you choose the variables to use to create an interaction. I understand the two regression equations are parallel, however, if you have 20+ variables within a data table, how would you choose which ones are most likely to have an interaction?”
When should you use interactions in a model?
Start with a substantive question: why might the relationship between a predictor and the outcome depend on another variable?
Examine the interaction estimate and its confidence interval. Is the difference large enough to matter, and how precisely can we estimate it?
Compare model fit as well. Adding a term cannot lower ordinary R^2, so look at adjusted R^2 and the residual standard error instead.
What interactions are not
Importantly, interactions are not about one X variable affecting another X variable (correlations between X variables)
Correlation question: Do male and female professors tend to have different beauty scores?
Interaction question: Is the beauty-evaluation slope different for male and female professors?
The interaction model addresses the second question. An observational association also does not, by itself, establish a causal effect.
What interactions are
Interactions let us model a situation where the relationship of one predictor variable and Y is different depending on the value of another X variable:
How much attractiveness matters for student evaluation scores depends on gender
How much gender matters for student evaluation scores depends on tenure
How much what you have left on the board matters depends on how far along you are in the game