Dear all,
In a current project I am implementing Sun & Abraham's eventstudyinteract estimator for heterogeneous treatment effects.
The standard event studies (e.g. Kleven et al., 2019 for the child penalty) plot and interpret the estimated eventtime dummies as a percentage of the counterfactual outcome without the impact of the eventtime dummies. For this they usually use the post estimation command predict after the regression and then compute the counterfactual distribution by deducting the eventtime effects from the predicted values.
I would like to do something similar with the interaction-weighted estimator, however I did not manage to implement the predict command and was also not able to save the absorbed year effects (e.g. via absorb(year, savefe)).
Any hints how I could get predicted values after the eventstudyinteract command?
Here is the running example from the help eventstudyinteract. I am using the newest version of the command in STATA17.
CODE:
webuse nlswork, clear
gen union_year = year if union == 1
bysort idcode: egen first_union = min(union_year)
drop union_year
gen ry = year - first_union
gen never_union = (first_union == .)
tab ry
forvalues k = 18(-1)2 {
gen g_`k' = ry == -`k'
}
forvalues k = 0/18 {
gen g`k' = ry == `k'
}
set matsize 800
eventstudyinteract ln_wage g_* g0-g18, cohort(first_union) control_cohort(never_union) covariates(south) ///
absorb(i.idcode i.year) vce(cluster idcode)
ERROR MESSAGES:
predict pred,xb
variable __00001Y not found
r(111);
eventstudyinteract ln_wage g_* g0-g18, cohort(first_union) control_cohort(never_union) covariates(south) absorb(i.idcode i.year, savefe) vce(cluster idcode)
absorb() does not contain a valid varlist
r(198);
Thank you,
Kati
In a current project I am implementing Sun & Abraham's eventstudyinteract estimator for heterogeneous treatment effects.
The standard event studies (e.g. Kleven et al., 2019 for the child penalty) plot and interpret the estimated eventtime dummies as a percentage of the counterfactual outcome without the impact of the eventtime dummies. For this they usually use the post estimation command predict after the regression and then compute the counterfactual distribution by deducting the eventtime effects from the predicted values.
I would like to do something similar with the interaction-weighted estimator, however I did not manage to implement the predict command and was also not able to save the absorbed year effects (e.g. via absorb(year, savefe)).
Any hints how I could get predicted values after the eventstudyinteract command?
Here is the running example from the help eventstudyinteract. I am using the newest version of the command in STATA17.
CODE:
webuse nlswork, clear
gen union_year = year if union == 1
bysort idcode: egen first_union = min(union_year)
drop union_year
gen ry = year - first_union
gen never_union = (first_union == .)
tab ry
forvalues k = 18(-1)2 {
gen g_`k' = ry == -`k'
}
forvalues k = 0/18 {
gen g`k' = ry == `k'
}
set matsize 800
eventstudyinteract ln_wage g_* g0-g18, cohort(first_union) control_cohort(never_union) covariates(south) ///
absorb(i.idcode i.year) vce(cluster idcode)
ERROR MESSAGES:
predict pred,xb
variable __00001Y not found
r(111);
eventstudyinteract ln_wage g_* g0-g18, cohort(first_union) control_cohort(never_union) covariates(south) absorb(i.idcode i.year, savefe) vce(cluster idcode)
absorb() does not contain a valid varlist
r(198);
Thank you,
Kati