Hello,
I tired IV(2SLS) regression with STATA, but I do not know whether what I do is right or not.
Please let me know better solutions.
Fixed effects: year fixed effect and id-code fixed effect
Clustering: standard errors clustered at the region and year levels.
egen id1= group(id)
egen code1 = group(code)
egen region1 = group(region)
egen double_fixed = group(id1 code1)
egen double_cluster = group(region1 year)
1)
vreghdfe Y X1 X2 X3 (endogenous variable=instrument variable), absorb(i.year id1 code1) cluster(region1 year)
2)
vreghdfe Y X1 X2 X3 (endogenous variable=instrument variable), absorb(i.year double_fixed) cluster(double_cluster)
3)
xtset double_fixed
xtreg endogeneous_variable = Instrument_variable X1 X2 X3 i.year, fe
predict endo_var_hat, xb
xtreg Y endo_var_hat X1 X2 X3 i.year, fe
4)
xtreg endogeneous_variable = Instrument_variable X1 X2 X3 i.year, fe vce(cluster double_cluster): error - panels are not nested within clusters
Which one is correct? any better solution?
Related Posts with IV(2SLS) regression with fixed effects and two-way clustering
Correct Functional Form SelectionI have been asked to verify the effect of water and sanitation on the mortality of children under th…
predict versus margins after mepoissionI'm using mepoisson to model county-level cancer diagnoses using county population as the exposure a…
First Differences and Lagged VariablesHello Statalists, Is it possible to take both the first difference and a lag of the same variable u…
Panel data and regression with vs. without clustering standard errorsI am using panel data for a difference-in-difference model in which I attempt to see the affect the …
censored data tobit regressionI am trying to complete a tobit regression with censored data. This is because i am looking at expen…
Subscribe to:
Post Comments (Atom)
0 Response to IV(2SLS) regression with fixed effects and two-way clustering
Post a Comment