Hi,
I am new to Stata and in need of an advice on how to translate my model specification into code. I have an individual level panel data set, including 11 million observations from 21 counties covering a period of 19 years. For the purpose of my project, I have 2 time dimensions- calendar (t) and event year (e). I want to use a difference in differences model with individual fixed effects, as well as to add county time fixed effects. The goal is to estimate the effect of being able to take sick leave before the first childbirth (event year -1) on the long term propensity to be on sick leave afterwards. There is an exogenous regional variation that affects the likelihood of the mother to get sick leave. The individual propensity to be on sick leave is measured by their history of sick leave withdrawals in the years before pregnancy (event years from -14 to -2).
This is my specification:
SLict = αi + Σ17e=-1 αφ 1[ e=φ ] +αtc+ Σ17e=-1 αφ 1[ e=φ ]* HL + βiXit + βcXct + εict
Where:
- SL is number of sick leave days per year for individual i, living in county c, in calendar year t
- αi is individual effect parameter which captures individual's propensity to be on sick leave during event years -14 to -2, which is to be used as a reference point
- αφ captures how much has the individual's propensity to be on sick leave has changed from its reference point during event years -1 to 17. The term in brackets is equal to 1 when φ=e (event year e=-1 to 17)
- αφ * HL is an interaction between the parameter capturing the individual propensity to be on sick leave in event years -1 to 17 and the county’s leniency in that year. HL is dummy variable indicating weather the county is lenient or strict on giving sick leave.
- αct county time fixed effects for given calendar year, because time trends are very regional
- Xit is an individual time varying covariant, individual characteristic that change over time, which includes indicator variables for additional children, length of education, work sector, mother’s income, father’s income, household’s disposable income.
- Xct county level characteristics that change over time, such as county level unemployment rates in calendar year.
My supervisor advised me to use xi:areg with absorb(id) and cluster(id). I don't know how to code it in a way that I can get all of the parameters for each event year. I'm confused about the whole code to be honest. It is way more complex than anything I have ever done. Therefore any help is more than welcome!
Related Posts with Event study/ DID/ Individual FE/ Time&County FE
Dealing with omitted variable bias in survival analysesHi, I would like to know how I could deal with an omitted variable bias in a survival analysis. My …
PSM overlapp assumptionHi all, I have this result from using PSM teffects overlap. Can someone please tell me if there is a…
Panel Data Three Dimensions "repeated time values within panel"Hello everyone, First of all, I would like to apologize in advance if I commit any mistake on this …
Scatter plot: do I have to choose between (weighted) marker size and marker label ?Hello Stata experts, I would like to make a scatter plot with marker size like in https://www.stata.…
Threshold regression using time series dataDear Community, I am a user of Stata 15. I am trying to estimate the threshold effects of inflation…
Subscribe to:
Post Comments (Atom)
0 Response to Event study/ DID/ Individual FE/ Time&County FE
Post a Comment