Each graduate’s treatment effect is \delta_i = Y_i(1) - Y_i(0):
Graduate i
Y_i(0)
Y_i(1)
D_i
\delta_i
1
30
36
1
6
2
28
33
1
5
3
26
30
1
4
4
20
27
0
7
5
18
24
0
6
6
16
22
0
6
ATE = \frac{1}{6}(6 + 5 + 4 + 7 + 6 + 6) = \frac{34}{6} \approx 5.67: on average, the bootcamp raises starting salaries by about $5,670.
ATT = \frac{1}{3}(6 + 5 + 4) = 5: among those who attended, it raised salaries by $5,000 on average.
ATNT = \frac{1}{3}(7 + 6 + 6) = \frac{19}{3} \approx 6.33: among those who did not attend, it would have raised salaries by about $6,330 on average.
Part (b)
The observed outcome is Y_i = D_i\, Y_i(1) + (1 - D_i)\, Y_i(0):
Graduate i
1
2
3
4
5
6
Y_i
36
33
30
20
18
16
A researcher sees D_i for everyone, Y_i(1) for graduates 1 to 3 (who attended) and Y_i(0) for graduates 4 to 6 (who did not). Y_i(0) for graduates 1 to 3 and Y_i(1) for graduates 4 to 6 are counterfactuals that are never observed.
with E[Y_i(0) \mid D_i = 1] = \frac{30 + 28 + 26}{3} = 28 and E[Y_i(0) \mid D_i = 0] = 18. So the selection bias is 28 - 18 = 10, and indeed 15 = 5 + 10.
Part (d)
The graduates who attended would have earned more than the non-attendees even without the bootcamp: their average Y_i(0) is $28,000, compared with $18,000. The observed difference in salaries mixes the effect of the bootcamp with this pre-existing difference.
The positive sign says that the graduates with higher earning potential (for example, the more able, motivated or better-connected ones) chose to attend. Here two-thirds of the observed gap of $15,000 is selection, not the effect of the bootcamp.
Part (e)
This violates SUTVA (the stable unit treatment value assumption): each graduate’s potential outcomes depend only on their own treatment, not on anyone else’s. If attendees compete with non-attendees for a fixed number of entry-level jobs, a non-attendee’s salary depends on how many of the others attended: the more bootcamp graduates there are, the fewer good jobs are left for them. Then Y_i(0) is not a single fixed number for each graduate, and the table above is not well defined.
If randomization works, the treatment and control groups are the same on average, so we expect the differences to be small and not statistically significant. Most of them are: the differences in age, schooling, race, marital status and 1974 and 1975 earnings are small and not statistically significant. But two differences are statistically significant:
Trainees are 12.7 percentage points less likely to lack a high school degree. This is significant at the 1% level (t = -3.22).
Trainees are 4.8 percentage points less likely to be Hispanic. This is significant at the 10% level (t = -1.78).
So the groups are not fully balanced. This is a concern if these characteristics affect earnings. For example, men with a high school degree tend to earn more, so the trainees might have earned more in 1978 even without training. The simple comparison of 1978 earnings in (b) would then overstate the effect of training.
Part (b)
m_exp<-lm(re78~train, data =jtrain2)summary(m_exp)
Call:
lm(formula = re78 ~ train, data = jtrain2)
Residuals:
Min 1Q Median 3Q Max
-6.349 -4.555 -1.829 2.917 53.959
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 4.5548 0.4080 11.162 < 2e-16 ***
train 1.7943 0.6329 2.835 0.00479 **
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Residual standard error: 6.58 on 443 degrees of freedom
Multiple R-squared: 0.01782, Adjusted R-squared: 0.01561
F-statistic: 8.039 on 1 and 443 DF, p-value: 0.004788
With a single binary regressor, \hat{\alpha} is the average of re78 in the control group (4.555) and \hat{\alpha} + \hat{\beta} is the average in the treatment group (6.349). So \hat{\beta} is exactly the difference in means, as the output confirms.
Men assigned to job training earned on average $1,794 more in 1978 than men in the control group, who earned $4,555 on average. The difference is statistically significant at the 1% level (t = 2.84).
In the NSW experiment, training was randomly assigned, so train is independent of the potential outcomes. The men assigned to training would, on average, have earned the same as the control group without it: E[Y_i(0) \mid D_i = 1] = E[Y_i(0) \mid D_i = 0]. The selection bias is zero, and \hat{\beta} estimates the ATT (which here also equals the ATE, since the two groups are the same on average).
In most other datasets, men choose whether to enroll in training, or are selected by a caseworker. Those who enroll typically differ from those who don’t in ways that also affect earnings (motivation, ability, how poor their job prospects are), so E[Y_i(0) \mid D_i = 1] \neq E[Y_i(0) \mid D_i = 0]. The regression coefficient then mixes the effect of training with selection bias. Question 3 shows how large that bias can be.
Part (d)
m_ctrl<-lm(re78~train+age+educ+black+hisp+married+re74+re75, data =jtrain2)stargazer(m_exp, m_ctrl, type ="text", column.labels =c("No controls", "Controls"), keep.stat =c("n", "rsq"))
Holding the controls fixed, men assigned to training earned on average $1,683 more in 1978 than the control group. The estimate is still significant at the 1% level (t = 2.66). It is close to the estimate of 1.794 in (b), and the standard error is almost identical (0.632 versus 0.633).
Why the estimate barely changes. Random assignment makes train unrelated to the controls: in (a), none of them differs between the groups at the 5% level. In the omitted variable bias formula, the slope from regressing each control on train is about zero, so leaving the controls out causes essentially no bias, and adding them leaves the estimate where it was. The small drop is in line with the trainees having slightly more years of schooling in (a).
Controls that help predict re78 take that variation out of the error term, so \sigma^2 falls. Here they explain little: the R^2 only rises from 0.018 to 0.055, and \hat{\sigma} only falls from 6.58 to 6.51.
Because train was randomly assigned, the controls should not predict it, so R^2_{train} should be close to zero. Here it is 0.019.
The small fall in \sigma^2 lowers the variance, while 1 - R^2_{train} \approx 0.981 raises it very slightly. The two roughly offset, so the standard error hardly changes. Adding controls helps more when they are strong predictors of the outcome: they then lower \sigma^2 a lot, while randomization keeps R^2_{train} near zero, so the standard error falls.
So why would a researcher still include these controls? In practice, we always control for variables that matter for the outcome. They reduce the residual variation in the outcome, \sigma^2, so we get more precise estimates, following
Controls also let us check that the estimate is not driven by differences between the groups like those in (a). For example, nodegree had the largest imbalance in (a). Adding it to the controls:
m_ctrl_deg<-lm(re78~train+age+educ+black+hisp+married+re74+re75+nodegree, data =jtrain2)summary(m_ctrl_deg)$coefficients[c("train", "nodegree"), ]
Estimate Std. Error t value Pr(>|t|)
train 1.67634320 0.6386822 2.62469072 0.008978095
nodegree -0.07068188 1.0043873 -0.07037313 0.943929018
The coefficient on train stays at 1.68, significant at the 1% level (t = 2.62). The coefficient on nodegree is small and not statistically significant (t = -0.07). So the degree imbalance does not drive the estimate.
Question 3
Part (a)
data(jtrain3)m_nonexp<-lm(re78~train, data =jtrain3)summary(m_nonexp)
Call:
lm(formula = re78 ~ train, data = jtrain3)
Residuals:
Min 1Q Median 3Q Max
-21.554 -9.732 -0.866 7.705 99.620
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 21.5539 0.3036 70.98 <2e-16 ***
train -15.2048 1.1546 -13.17 <2e-16 ***
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Residual standard error: 15.15 on 2673 degrees of freedom
Multiple R-squared: 0.06092, Adjusted R-squared: 0.06057
F-statistic: 173.4 on 1 and 2673 DF, p-value: < 2.2e-16
Trainees earned on average $15,205 less in 1978 than the men in the PSID comparison group. The difference is significant at the 1% level (t = -13.2).
This has the opposite sign of the experimental estimate in Question 2(b), a gain of $1,794. Taken at face value, it would say that job training lowers earnings by about $15,000 a year, which is not credible.
Part (b)
Students only need to explain why the selection bias is large and negative. For how big it is, seeMore detailsbelow.
trainees comparison
age 25.816 34.851
educ 10.346 12.117
black 0.843 0.251
hisp 0.059 0.033
married 0.189 0.866
re74 2.096 19.429
re75 1.532 19.063
The two groups are very different before the program. Men in the comparison group earned $19,063 on average in 1975, compared with $1,532 for the trainees. They are also older, have more schooling, are much more likely to be married and much less likely to be black. The NSW program was targeted at disadvantaged men, while the PSID sample is drawn from the general population.
So even without training, the comparison group would have earned far more in 1978 than the trainees: E[Y_i(0) \mid D_i = 1] is much smaller than E[Y_i(0) \mid D_i = 0]. The selection bias is large and negative.
More details. We can gauge the size of the selection bias because the trainees are the same 185 men as in Question 2. The randomized control group in jtrain2 tells us what they would have earned on average without training, E[Y_i(0) \mid D_i = 1] \approx 4.55. The PSID comparison group earned 21.55. So the selection bias is about -17.00, or roughly $17,000, and
Holding the controls fixed, trainees earned on average $860 more in 1978 than comparison men. This is not statistically significant (t = 0.95).
The controls move the estimate a long way, from -15.20 to 0.86, and give it the right sign. But it is still only about half of the experimental estimate (1.68 with the same controls), and it cannot be distinguished from zero.
Controlling for observable characteristics can only remove the part of the selection bias that comes from the variables we measure. Trainees and comparison men also differ in things we do not observe, such as motivation, ability, health or why they ended up in a program for disadvantaged workers. These still bias the estimate. And without the experiment as a benchmark, we would have no way of knowing how far off the estimate is.
Question 4
Note
Note on standard errors. The standard errors in this question are clustered by person (cluster = ~nr), as the problem set asked. We did not have time to cover clustered standard errors in class, but this is the correct way to compute them with panel data. The same man appears in all 8 years, and the unobserved factors that affect his wage in one year are likely related to those in other years. The usual standard errors treat all 4,360 observations as independent, and here they would be too small.
status
always union never union switcher
34 265 246
Yes, it is a balanced panel: each of the 545 men is observed in all 8 years, giving 4,360 observations. 246 men switch union status at least once.
Fixed effects use only the variation within each man over time. For a man whose union status never changes, union minus his own average is zero in every year, so he contributes nothing to estimating the union coefficient. The fixed effects estimate of the union premium therefore comes entirely from the 246 switchers.
Part (b)
pooled<-feols(lwage~union+married+educ+exper+expersq+black+hisp, data =wagepan, cluster =~nr)summary(pooled)
Holding marital status, schooling, experience and race fixed, men whose wages are set in a union contract earn about 18.0% higher hourly wages on average than men who are not. The coefficient is significant at the 1% level (t = 6.53).
Part (c)
fe<-feols(lwage~union+married+educ+exper+expersq+black+hisp|nr, data =wagepan, cluster =~nr)etable(pooled, fe, signif.code =c("***"=0.01, "**"=0.05, "*"=0.10))
pooled fe
Dependent Var.: lwage lwage
Constant -0.0347 (0.1201)
union 0.1801*** (0.0276) 0.0821*** (0.0228)
married 0.1077*** (0.0261) 0.0453** (0.0210)
educ 0.0994*** (0.0092)
exper 0.0892*** (0.0124) 0.1168*** (0.0107)
expersq -0.0028*** (0.0009) -0.0043*** (0.0007)
black -0.1438*** (0.0501)
hisp 0.0157 (0.0392)
Fixed-Effects: ------------------- -------------------
nr No Yes
_______________ ___________________ ___________________
S.E.: Clustered by: nr by: nr
Observations 4,360 4,360
R2 0.18659 0.61974
Within R2 -- 0.17804
---
Signif. codes: 0 '***' 0.01 '**' 0.05 '*' 0.1 ' ' 1
fe$collin.var
[1] "educ" "black" "hisp"
Comparing the same man across years, and holding his marital status and experience fixed, his hourly wage is about 8.2% higher in years when he is covered by a union contract than in years when he is not. The coefficient is significant at the 1% level (t = 3.60).
educ, black and hisp drop out. None of them changes over time for any man in the sample (all of them have finished school by 1980), so each is perfectly collinear with the person fixed effects. The within transformation turns them into zeros, and their effects are absorbed into a_i.
Part (d)
One example is a worker’s unobserved ability or productivity. Pooled OLS leaves it in the error term. It raises wages, and it is likely to be positively related to union membership: union jobs pay above-market wages, so union employers can choose from many applicants and hire the most productive ones. By the omitted variable bias formula, the bias is (effect of ability on wages) × (relationship between ability and union) > 0. Pooled OLS therefore overstates the union premium, attributing to the union part of the higher wages that more productive workers would earn anyway.
Person fixed effects remove all time-invariant traits like this, which is why the estimate falls from 0.180 to 0.082.
pooled fe twfe
Dependent Var.: lwage lwage lwage
Constant -0.0347 (0.1201)
union 0.1801*** (0.0276) 0.0821*** (0.0228) 0.0800*** (0.0227)
married 0.1077*** (0.0261) 0.0453** (0.0210) 0.0467** (0.0210)
educ 0.0994*** (0.0092)
exper 0.0892*** (0.0124) 0.1168*** (0.0107)
expersq -0.0028*** (0.0009) -0.0043*** (0.0007) -0.0052*** (0.0008)
black -0.1438*** (0.0501)
hisp 0.0157 (0.0392)
Fixed-Effects: ------------------- ------------------- -------------------
nr No Yes Yes
year No No Yes
_______________ ___________________ ___________________ ___________________
S.E.: Clustered by: nr by: nr by: nr
Observations 4,360 4,360 4,360
R2 0.18659 0.61974 0.62091
Within R2 -- 0.17804 0.02157
---
Signif. codes: 0 '***' 0.01 '**' 0.05 '*' 0.1 ' ' 1
twfe$collin.var
[1] "educ" "exper" "black" "hisp"
Year fixed effects control for anything that shifts the wages of all men in the sample equally in a given year, such as economy-wide wage growth, inflation or the recession of the early 1980s.
exper drops out because every man gains exactly one year of experience each year: exper_{it} = exper_{i,1980} + (t - 1980). The first term is constant for each man, so the person fixed effects absorb it. The second term is the same for everyone in a given year, so the year fixed effects absorb it. exper is therefore a perfect linear combination of the fixed effects. expersq stays because the square is not linear in the year.