## 7.5 Coding Questions

1. For this problem, we will use the data mroz.

1. Estimate a probit model where the outcome is whether or not the wife is in the labor force (inlf) using the the number of kids less than 6 (kidslt6) and the number of kids who are 6 or older living in the household (kidsge6). Calculate the average partial effect of each variable. What do you notice?

2. Now, add the variables age, educ, and city to the model. Calculate the average partial effects of kidslt6 and kidsge6. How do you interpret these? How do they compare to the answers from part a?

3. Estimate a linear probability model and logit model using the same specification as in part b. For each one, how do the estimated coefficients compare to the ones from part b? Compute average partial effects for each model. How do these compare to the ones from part b?

2. For this problem, we will use the Fair data.

1. The variable nbaffairs contains the number of self-reported affairs that an individual has had in the previous year. Create a variable had_affair that is equal to 1 if an individual had any affair in the past year and that is equal to 0 otherwise. What fraction of individuals in the data have had an affair in the past year?

2. Estimate a logit model where the outcome is had_affair and the regressor is whether or not the person has a child (child). Calculate the average partial effect of having a child on having an affair. How do you interpret the results?

3. Now add sex, age, education, and occupation to the model. Calculate the average partial effect of each variable. How do you interpret the results? Hint: Make sure to treat the categorical variables in the model as categorical rather than as numeric.

4. In addition to the variables in part c, add the variables years married (ym) and religious to the mode. Calculate the average partial effect of each variable. How do you interpret the results? Hint: Make sure to treat the categorical variables in the model as categorical rather than as numeric.