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
Refining starting values stuck during multilevel modellingDear all, I am running a multilevel model for my paper (individuals nested in countries). For the b…
CREATE A BINARY VARIABLE IF A VARIABLE <0 ON SEVERAL YEARSDear statalist, I am trying to construct a binary variable. This binary variable should take the val…
OlogitI have cross-sectional data for a group of people, the dependent variable is an ordinal variable, an…
Managing overlapping datesDear all, I am working a study on sick leave in relation to an interested outcome. However, I am st…
Durbin-Watson tests in Prais-Winsten output: transformed lower than originalDear all I'm using Stata 17.1. My dataset is panel unbalanced, with N=340. Observations correspond t…
Subscribe to:
Post Comments (Atom)
0 Response to Event study/ DID/ Individual FE/ Time&County FE
Post a Comment