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
Python: Importing pandas (and other packages) into STATA 16I am running STATA 16 and installed Anaconda to be able to run python code from STATA. The installat…
Hypothesis testingHey there! I am currently trying to reproduce the estimation results of Alan Kruegers "Experimental…
Why no vIf in binary logistic RegressionDear Statalist, in my pursuit to asses whether there is multicollinearity in my model or not, I rea…
"Reshape" problems: non-constant number of variables over timeDear all, I looked for similar queries and couldn't find any, but of course, if you know of other "…
residual diagnostics using mixedDear all, I'm having some problems with the residual diagnostics of my multilevel model in Stata (u…
Subscribe to:
Post Comments (Atom)
0 Response to IV(2SLS) regression with fixed effects and two-way clustering
Post a Comment