I run an OLS multiple regression model estimating expected chance of getting a job at a company $X$ for different subgroups.
${gets~job}_i = \hat{\alpha} + \hat{\beta_1}\cdot talent_i + \hat{\beta_2}\cdot woman_i + \hat{\beta}3 \cdot talent_i \cdot woman_i + \hat{\epsilon}_i$.
$E[gets~job|woman = 0, talent = 0] = \alpha $
$E[gets~job|woman = 0, talent = 1] = \alpha + \beta_1 $
$E[gets~job|woman = 1, talent = 0] = \alpha + \beta_2 $
$E[gets~job|woman = 1, talent = 1] = \alpha + \beta_1 + \beta_2 + \beta_3 $
My question: How do I, by hand and (quickly) in R
, test the hypothesis $\beta_1 + \beta_3 = 0$ in words something like "does talent matter for women?".
Dummy data for R:
n = 1e4
set.seed(6)
df <- data.frame(gets.job = sample(0:1, size = n, replace = TRUE),
talent = sample(0:1, size = n, replace = TRUE),
woman = sample(0:1, size = n, replace = TRUE))
ols.m <- lm(gets.job ~ talent*woman, data = df)