I am having some confusion regarding the implementation of my Individual-Fixed Effects IV Design in Stata. This might be a bit long-winded, but I really want to make myself clear on what I am trying to achieve, and where I am having issues/confusions. Thanks for your understanding!
Essentially, I am trying to estimate the short- mid- and long-term effects of X(retiring) on Y, using Z(reaching pension eligibility age) as an instrument for X.
Explanation:
Short- and long-term effects:
Short-term effects: The impact of retiring (X) between wave 1 and 2 on the changes in Y between wave 1 and 2
Mid-term effects: The impact of retiring (X) between wave 1 and 2 on the changes in Y between wave 2 and 3
Long-term effects: The Impact of retiring (X) between wave 1 and 2 on the changes in Y between wave 2 and 4
This is what I have done so far:
My data contains 4 waves of surveys.
- I have kept only those who are present in all survey waves: 61 084 observations in total i.e. 15 271 individuals per wave.
- I have created a treatment group which consists of people who reach/cross their state pension eligibility age between wave 1 and 2. The control group thus = individuals who do not reach pension eligibility age between wave 1 and 2.
- To allow the impact of age to differ on both sides of the eligiblity threshold used as instrument, I have centered age and its polynimials by substeacting the state pension age from the individuals age.
Outcome variable = Y
Retirement = Causal variable of interest = X
Reaching pension eligibility age = Instrument = Z
Centered age = CA
Centered age squared = CA2
Person identifier (string) = mergeid
Person identifier (de-stringed) = id
wave variable = wave
Country = country
Month of interview = int_month
Year of interview = int_year
I would now want to run my FE-IV model in a 2SLS estimation:
Long-term effects: The Impact of retiring (X) between wave 1 and 2 on the changes in Y between wave 2 and 4
First-stage:
Xππ‘−2 = πΌ + π½1Zππ‘−2 + π½2CAππ‘−2 + π½3CAππ‘−22 + π½4Zππ‘−2(CAππ‘−2) +π½5Zππ‘−2(CAππ‘−22) + πΎπ(CAππ‘−2) + πΎπ(CAππ‘−22) + πΎπ[ Zππ‘−2(CAππ‘−2) ] + πΎπ[ Zππ‘−2(CAππ‘−22) ] + πΏπ + ππ‘ + ππ‘ + πππ‘
Second-stage:
Yππ‘ = πΌ + π½1X_hatππ‘−2 + π½2CAππ‘−2 + π½3CAππ‘−22 + π½4Zππ‘−2(CAππ‘−2) +π½5Zππ‘−2(CAππ‘−22) + πΎπ(CAππ‘−2) + πΎπ(CAππ‘−22) + πΎπ[ Zππ‘−2(CAππ‘−2) ] + πΎπ[ Zππ‘−2(CAππ‘−22) ] + πΏπ + ππ‘ + ππ‘ + πππ‘
Xππ‘−2 = πΌ + π½1Zππ‘−2 + π½2CAππ‘−2 + π½3CAππ‘−22 + π½4Zππ‘−2(CAππ‘−2) +π½5Zππ‘−2(CAππ‘−22) + πΎπ(CAππ‘−2) + πΎπ(CAππ‘−22) + πΎπ[ Zππ‘−2(CAππ‘−2) ] + πΎπ[ Zππ‘−2(CAππ‘−22) ] + πΏπ + ππ‘ + ππ‘ + πππ‘
Second-stage:
Yππ‘ = πΌ + π½1X_hatππ‘−2 + π½2CAππ‘−2 + π½3CAππ‘−22 + π½4Zππ‘−2(CAππ‘−2) +π½5Zππ‘−2(CAππ‘−22) + πΎπ(CAππ‘−2) + πΎπ(CAππ‘−22) + πΎπ[ Zππ‘−2(CAππ‘−2) ] + πΎπ[ Zππ‘−2(CAππ‘−22) ] + πΏπ + ππ‘ + ππ‘ + πππ‘
In the model analysing the mid-term effects of X, I estimate the equations above but with all variables measured at t-1 instead of t-2.
In the model analysing the short-term effects of X, I estimate the equations above but with all variables measured at t instead of t-2
FINALLY - THE MAIN DILEMMA:
Since I am fairly new to Stata, I am not sure on how I should approach this in Stata language. I have dealt with basic fixed-effects models and basic IV models separately, however I hade never before combined them.
I have tried using the ivregress command:
Code:
ivregress estimator depvar [varlist1] (varlist2 = varlist_iv)
I have also tried using the xtivreg command with the fe option:
Code:
xtivreg depvar [varlist1] (varlist2 =varlistiv), fe
By doing some research, I have read that various people who use multiple fixed effects in their models use the ivreghdfe command I suspect that this might be the one I am looking for. After numerous attemps, however, I cannot seem to figure it out. Therefore, I would greately appreciate it if any of you kind people who have the relevant experience could help me with this. If I forgot to provide some important information above, please let me know!
Many thanks in advance!
Best regards, Guri Gray
0 Response to How to convert my FE-IV model (with intuitions borrowed from the RDD literature) into STATA language - Is IVREGHDFE the one?
Post a Comment