Hello everyone!
I have been trying to implement Borusyak's codes for my dataset to generated the combined DID graph with all the recent estimators, and while it works great for all of them, for some reason I get an error message when trying to run eventstudyinteract to get the Sun and Abraham (2020)'s estimates.
This are the relevant codes I am using, with Ei being a variable euqal to 2009 (my intervention year) for all treated and missing for untreated. tx_malaria_res is my outcome variable, code is the pannel's id and year is the time variable. I have data from 2003-2019 (so why I have specified 5 leads and 10 lags), and the if uf_code==15 part is just because I am using a subset of the full dataset:
sum Ei
gen lastcohort = Ei==r(max) // dummy for the never-treated cohort
forvalues l = 0/10 {
gen L`l'event = K==`l'
}
forvalues l = 1/5 {
gen F`l'event = K==-`l'
}
drop F1event // normalize K=-1 (and also K=-15) to zero
eventstudyinteract tx_malaria_res L*event F*event if uf_code==15, vce(cluster code) absorb(code year) cohort(Ei) control_cohort(lastcohort)
I get the error message:
varlist required
r(100);
I believe I have all the necessary packages in good order, i.e.: eventstudyinteract; avar; reghdfe; etc.
Did anyone experience something similar and/or has insights on how to solve?
I double checked my codes so many times, but do not know which variable I may have missed to specify somewhere...
Thanks in advance - any insights are appreciated.
I have been trying to implement Borusyak's codes for my dataset to generated the combined DID graph with all the recent estimators, and while it works great for all of them, for some reason I get an error message when trying to run eventstudyinteract to get the Sun and Abraham (2020)'s estimates.
This are the relevant codes I am using, with Ei being a variable euqal to 2009 (my intervention year) for all treated and missing for untreated. tx_malaria_res is my outcome variable, code is the pannel's id and year is the time variable. I have data from 2003-2019 (so why I have specified 5 leads and 10 lags), and the if uf_code==15 part is just because I am using a subset of the full dataset:
sum Ei
gen lastcohort = Ei==r(max) // dummy for the never-treated cohort
forvalues l = 0/10 {
gen L`l'event = K==`l'
}
forvalues l = 1/5 {
gen F`l'event = K==-`l'
}
drop F1event // normalize K=-1 (and also K=-15) to zero
eventstudyinteract tx_malaria_res L*event F*event if uf_code==15, vce(cluster code) absorb(code year) cohort(Ei) control_cohort(lastcohort)
I get the error message:
varlist required
r(100);
I believe I have all the necessary packages in good order, i.e.: eventstudyinteract; avar; reghdfe; etc.
Did anyone experience something similar and/or has insights on how to solve?
I double checked my codes so many times, but do not know which variable I may have missed to specify somewhere...
Thanks in advance - any insights are appreciated.
Comment