<- read_csv("https://info3370.github.io/data/parents.csv") parents
Learning Exercise
Gender inequality in employment is much greater among new parents than among non-parents. This exercise seeks to estimate the proportion employed among married men and women1 with a 1-year-old child at home. Our data include those with at least one child age 0–18.
Synthetic data
To speed data access, we downloaded data from the basic monthly Current Population Survey for all months from 2010–2019. We processed these data, grouped by sex and age of the youngest child, and estimated the proportion employed. We then generated synthetic data: we created a new dataset for you to use with simulated people using these known probabilities.
Synthetic data is good in our setting for two reasons
- we know the answer
- you can download the synthetic data right from this website
For transparency, here is the code with which we created the synthetic data. The line below will load the synthetic data.
Your synthetic data intentionally omits any parents with child age 1! Here is a graph showing the averages in your data, grouped by child age and sex.
Your task: Predict at child age 1
Your task is to answer the question: what proportion are employed among female respondents whose youngest child is 1 year old?
- you can use a model with the other ages
- you can use strategies from the statistical learning page
- you can use the male respondents if you think they are helpful
Near the end of discussion, we will ask every table to make one estimate. Then we will reveal the truth and see who is closest!
One approach to the task
One approach is to estimate a linear regression model with child_age
interacted with sex
. We would first create a fitted model object,
<- lm(at_work ~ sex * child_age, data = parents) model
then define the target population to predict
<- tibble(sex = "female", child_age = 0) target_population
and report a predicted value for the employment rate of female respondents with a 1-year-old youngest child.
predict(model, newdata = target_population)
1
0.5468421
Footnotes
Each married pair need not be of different sex. The data include same-sex couples.↩︎