Hi, I am trying to run CSDiD model for staggered policy assignments.
I was wondering if anyone could help me with how to fix this error message: command tsvmat is unrecognized while I was running the following code:
FYI, my lab is currently not connected to internet, meaning I can't update the package in easy way. I suspect that the error might be related to the update issue with the related packages because the code runs well in my personal laptop.
Thanks.
I was wondering if anyone could help me with how to fix this error message: command tsvmat is unrecognized while I was running the following code:
FYI, my lab is currently not connected to internet, meaning I can't update the package in easy way. I suspect that the error might be related to the update issue with the related packages because the code runs well in my personal laptop.
Thanks.
Code:
foreach policy in `POLICIES' {
local gvar = "`G_`policy''"
local ttl = "`T_`policy''"
eststo clear
local i = 0
foreach yvar in `OUTCOMES' {
eststo model_`policy'_`i': csdid `yvar' `CONTROLS', ///
ivar(uniqueid) time(year) gvar(`gvar') method(dripw) notyet ///
cluster(uniqueid_cluster)
estat event, estore(event_`policy'_`i') window(-6 6)
local vartitle: variable label `yvar'
if "`vartitle'"=="" local vartitle "`yvar'"
csdid_plot, title("`ttl'" "Effect on `vartitle'")
graph export "$OUT_GRAPHS/csdid_`policy'_`yvar'.png", as(png) replace
}
cd "$OUT_TABLES"
capture noisily esttab event_`policy'_* using "table_event_`policy'_star.csv", ///
b(%9.3f) se(%9.3f) star(* 0.10 ** 0.05 *** 0.01) replace compress unstack nonotes
capture noisily esttab model_`policy'_* using "table_att_`policy'_star.csv", ///
b(%9.3f) se(%9.3f) star(* 0.10 ** 0.05 *** 0.01) replace compress unstack nonotes
}

Comment