Econometrics PS 4
Follow the instructions of completing your problem set detailed in the syllabus.
This problem set covers potential outcomes (07_potentialoutcomes), randomized control trials (08_RCT) and panel data with fixed effects (10_panelFE). Whenever you are asked to compare models, report the estimates side by side using the stargazer, modelsummary or etable (from fixest) functions. Interpret all coefficients in complete sentences.
Question 1
A university runs an optional summer coding bootcamp. Suppose that, unlike in real data, we could see both potential outcomes for six graduates. Y_i(1) is graduate i’s starting salary (in $1,000s) if they attend the bootcamp, Y_i(0) is their salary if they do not, and D_i = 1 if they actually attended.
| Graduate i | Y_i(0) | Y_i(1) | D_i |
|---|---|---|---|
| 1 | 30 | 36 | 1 |
| 2 | 28 | 33 | 1 |
| 3 | 26 | 30 | 1 |
| 4 | 20 | 27 | 0 |
| 5 | 18 | 24 | 0 |
| 6 | 16 | 22 | 0 |
Compute each graduate’s treatment effect, and then the ATE, the ATT and the ATNT.
Write down the observed outcome Y_i for each graduate. Which entries of the table would a researcher actually see in the data?
Compute the observed difference in average salaries, E[Y_i \mid D_i = 1] - E[Y_i \mid D_i = 0]. Show that it equals the ATT plus selection bias, and compute the selection bias.
In words, why is there selection bias here? What does its sign tell you about who chose to attend the bootcamp?
Suppose the bootcamp graduates compete with the non-attendees for the same small number of entry-level jobs. Which assumption of the potential outcomes framework would this violate, and why?
Question 2
Load the jtrain2 dataset from the wooldridge package. It comes from the National Supported Work (NSW) demonstration, an experiment in the 1970s in which disadvantaged men were randomly assigned to a job training program. The variables you need are:
-
train: =1 if assigned to job training -
re78: real earnings in 1978, after the program (in $1,000s) -
re74,re75: real earnings in 1974 and 1975, before the program (in $1,000s) -
age,educ: age and years of schooling -
black,hisp,married,nodegree: =1 if black, Hispanic, married, or without a high school degree
Check whether randomization produced balanced groups. For each pre-treatment variable (
age,educ,black,hisp,married,nodegree,re74,re75), report the mean for the treatment and control groups and the difference between them. Use a regression of each variable ontrainto judge whether the difference is statistically significant. Are the groups balanced? Is any imbalance a concern?Estimate re78_i = \alpha + \beta\, train_i + u_i. Show that \hat{\beta} equals the difference in average 1978 earnings between the two groups, and interpret it.
Why can \hat{\beta} in (b) be interpreted as the causal effect of training, while a regression of earnings on training would not have this interpretation in most other datasets? Explain using the decomposition of the observed difference into the ATT and selection bias.
-
Add
age,educ,black,hisp,married,re74andre75as controls. Compare the coefficient ontrainand its standard error with (b). Why does the estimate barely change? Why might a researcher still want to include these controls?Hint: use Var(\hat{\beta}_{train}) = \dfrac{\sigma^2}{(1 - R^2_{train})\,SST_{train}}, where \sigma^2 is the variance of the error term, SST_{train} is the total sample variation in
train, and R^2_{train} is the R^2 from a regression oftrainon all the other explanatory variables in the model (here, the controls). (i) If the controls help predictre78, what happens to \sigma^2? (ii) Becausetrainwas randomly assigned, how large do you expect R^2_{train} to be? (iii) Use your answers to explain why the standard error changes so little here, and when adding controls would help more.
Question 3
Now load jtrain3. It contains the same 185 men who received training in the NSW experiment, but instead of the randomized control group, the comparison group is 2,490 men drawn from a general population survey (the Panel Study of Income Dynamics). The variables have the same names and meanings as in jtrain2.
Estimate re78_i = \alpha + \beta\, train_i + u_i in this sample and interpret \hat{\beta}. Compare it with your estimate in Question 2(b).
Compare the average 1975 earnings (
re75) and other pre-treatment characteristics of the trainees and the comparison group. Use these comparisons to explain the sign and the size of the selection bias in (a).Add the same controls as in Question 2(d). How close does the estimate get to the experimental estimate? What does this tell you about the limits of controlling for observable characteristics?
Question 4
Load the wagepan dataset, a panel of 545 young men observed every year from 1980 to 1987. We want to estimate the wage premium from belonging to a union. The variables you need are:
-
nr: person identifier;year: year -
lwage: log hourly wage -
union: =1 if the man’s wage is set in a union contract that year -
married: =1 if married -
educ: years of schooling;exper,expersq: years of labor market experience and its square -
black,hisp: =1 if black or Hispanic
Use feols() from the fixest package for all regressions in this question, and cluster the standard errors by person (cluster = ~nr).
Is this a balanced panel? How many men switch union status at least once during the eight years? Why does that number matter for estimating the union premium with fixed effects?
Estimate the pooled OLS regression of
lwageonunion,married,educ,exper,expersq,blackandhisp, ignoring the panel structure. Interpret the coefficient onunion.Now add person fixed effects. Interpret the coefficient on
union. Which variables drop out of the regression, and why?The union coefficient falls substantially from (b) to (c). Name an unobserved, time-invariant characteristic of workers that could explain this, and explain how it biases the pooled OLS estimate.
Add year fixed effects to the model in (c) (two-way fixed effects). What do the year fixed effects control for?
expernow drops out as well. Why?