* this program generates estimates for a ; * mismeasured treatment effect model; * in this case y=xb+aT+e where t is a; * dummy variable and the error in the ; * selection term is assumed to be correlated; * with the error (e). In this case, we use; * data from angrist and evans, aer, 1998; * the sample is maried women, aged 21-35; * with 2+ kids. from the 1980 census 5% pums; * the outcome of interest is female labor; * supply and the covariate is; * whether a mom had a third kid. The instruments; * are measures of the sex composition of the ; * first 2 children; # delimit; set more 1; set memory 50m; * increase maximum variables; set matsize 60; *define log; log using treatment.log,replace; *read in stata data file; use pums80; * generate some new variables; gen twoboys=boy1st*boy2nd; gen twogirls=(1-boy1st)*(1-boy2nd); * get descriptive statistics; * 1980 married women sample; * these are in column 3, Table 2; * of angrist and evans; sum; * ols weeks worked model; * this is from table 7, column 4 ; * of angrist and evans; reg weeksm1 morekids boy1st boy2nd agem1 agefstm black hispan othrace; * OLS estimates of morekids model; * married women sample; * these numbers are in Table 6; * column (5); reg morekids samesex boy1st boy2nd agem1 agefstm black hispan othrace; * column (6); * now run a probit version of the same equation; dprobit morekids samesex boy1st boy2nd agem1 agefstm black hispan othrace; * the mismeasured treatment effect model; * the syntax is treatreg y x, treat(t=x z) where y is the outcome; * x is the list of exogenous factrors, t is the treatment variable; * and z are the instruments; treatreg weeksm1 boy1st boy2nd agem1 agefstm black hispan othrace, treat(morekids=boy1st boy2nd agem1 agefstm black hispan othrace samesex); * now compare this estimate with an IV model where same sex is used; * as an instrument for morekids; reg weeksm1 morekids boy1st boy2nd agem1 agefstm black hispan othrace (samesex boy1st boy2nd agem1 agefstm black hispan othrace); * what does the model look like when the model is identified solely; * by non-linearities, that is, z is not used; treatreg weeksm1 boy1st boy2nd agem1 agefstm black hispan othrace, treat(morekids=boy1st boy2nd agem1 agefstm black hispan othrace); log close;