Hi Statalist,
I'm using the csdid command in Stata to conduct an event study. My dataset is repeated cross-sectional with observations from the years 2011, 2013, 2015, and 2018. The first time to treat (time1) ranges from 2009 to 2018. The dependent variable (out) is a binary variable.
When I run csdid, the results seem odd. Despite having 7306 observations in my dataset, only 305 observations are used in the analysis. It appears that csdid is only utilizing observations from 2011 and 2018.
Here are my questions:
Why is csdid only using observations from 2011 and 2018?
Is it possible to include all the sample years (2011, 2013, 2015, and 2018) in the analysis?
Any insights or suggestions would be greatly appreciated!
Thank you!
Simon
I'm using the csdid command in Stata to conduct an event study. My dataset is repeated cross-sectional with observations from the years 2011, 2013, 2015, and 2018. The first time to treat (time1) ranges from 2009 to 2018. The dependent variable (out) is a binary variable.
When I run csdid, the results seem odd. Despite having 7306 observations in my dataset, only 305 observations are used in the analysis. It appears that csdid is only utilizing observations from 2011 and 2018.
Here are my questions:
Why is csdid only using observations from 2011 and 2018?
Is it possible to include all the sample years (2011, 2013, 2015, and 2018) in the analysis?
Any insights or suggestions would be greatly appreciated!
Thank you!
Simon
Code:
use "https://raw.githubusercontent.com/JBZ-researcher/csdid_example/main/example1.dta", clear csdid out, time(year) gvar(time1) notyet g sample = 1 if e(sample)
Comment