#### Main effects vs. interactions

The final project asks you to explore the question of whether there are any factors that exacerbate or mitigate the **income gap** between men and women. It’s important to note that this is different from asking whether there are factors that affect income. While it is interesting to investigate factors that affect income, there may be factors that affect income but do not affect the income gap. This is the difference between significant main effects and significant interactions.

Let’s look at the two linear models again.

```
# Note how digits is specified here to round each column to a different number of decimal values
kable(coef(summary(nlsy.lm)), digits = c(0, 0, 2, 4))
```

Estimate | Std. Error | t value | Pr(>|t|) | |
---|---|---|---|---|

(Intercept) | 19080 | 1633 | 11.69 | 0.0000 |

genderMale | 24896 | 1317 | 18.91 | 0.0000 |

raceOther | 22870 | 1507 | 15.18 | 0.0000 |

raceHispanic | 8930 | 1900 | 4.70 | 0.0000 |

jobs.num | -371 | 146 | -2.53 | 0.0113 |

`kable(coef(summary(nlsy.lm.interact)), digits = c(0, 0, 2, 4))`

Estimate | Std. Error | t value | Pr(>|t|) | |
---|---|---|---|---|

(Intercept) | 25837 | 1859 | 13.90 | 0.0000 |

genderMale | 9552 | 2361 | 4.04 | 0.0001 |

raceOther | 9924 | 2085 | 4.76 | 0.0000 |

raceHispanic | 4150 | 2621 | 1.58 | 0.1134 |

jobs.num | -276 | 146 | -1.89 | 0.0585 |

genderMale:raceOther | 26628 | 2986 | 8.92 | 0.0000 |

genderMale:raceHispanic | 9789 | 3779 | 2.59 | 0.0096 |

According to the first model, the average income difference between an Hispanic male and a Hispanic female (both of whom have held, say, 3 jobs) is just:

Estimated.income(Male, Hispanic, 3 jobs) - Estimated.income(Female, Hispanic, 3 jobs)

= ( `(Intercept)`

+ `genderMale`

+ `raceHispanic`

+ 3 * `jobs.num`

) - (`(Intercept)`

+ `raceHispanic`

+ 3 * `jobs.num`

)

= `gendermale`

= 24896

Indeed, this is the average difference in income between men and women of the same jobs.num and same race, regardless of their specific jobs.num and race.

According to the second model, the one that contains race-gender interactions, the average difference between the same two individuals is given by:

Estimated.income(Male, Hispanic, 3 jobs) - Estimated.income(Female, Hispanic,3 jobs)

= ( `(Intercept)`

+ `genderMale`

+ `raceHispanic`

+ 3 * `jobs.num`

+ `gendermale:raceHispanic`

) - (`(Intercept)`

+ `raceHispanic`

+ 3 * `jobs.num`

)

= `genderMale`

+ `genderMale:raceHispanic`

= 19341

This difference doesn’t depend on the number of jobs that we assumed both individuals have held—we would get the same difference if we assumed that both individuals held 1 prior job, or 10 prior jobs—but it **does depend on the assumed race**. Running the same calculation to compare a non-Black, non-Hispanic race man and a non-Black non-Hispanic race woman both of whom held `x`

prior jobs, we would get that the average income difference is:

Estimated.income(Male, Other, x jobs) - Estimated.income(Female, Other, x jobs)

= `gendermale`

+ `genderMale:raceOther`

= 36180

The baseline level here is race = ‘Black’. So the model also tells us that the average income difference between Black men and women with the same number of prior jobs:

Estimated.income(Male, Black, x jobs) - Estimated.income(Female, Black, x jobs)

= `gendermale`

+ 0

= 9552

By looking at the interaction effect between `race`

and `gender`

, we do find evidence that race is a factor affecting the **income gap** between men and women. E.g., There is a significantly larger gap (in an absolute $ sense) between Hispanic men and women race compared to Black men and women.