Hi,
I try to regress the following FE-model: yi,t = b0 + b1*x1i,t + b2*x2i,t + b3*x3i,t + yearFE + stateFE. Im interested in the effect of x1 (grants) on y (expenditures).
Due to heteroskedasticity coming from the different sizes of the states I want to apply a FGLS and give the observations different weights.
According to this video I do the following in STATA (https://www.youtube.com/watch?v=x7m3uhTGcbk):
xi: reg y x1 x2 x3 i.year i.state
predict uhat, resid
gen uhat2 = uhat^2
gen loguhat2 = ln(uhat2)
xi: reg loguhat2 x1 x2 x3 i.year i.state
predict ghat, xb
gen hhat = exp(ghat)
xi: reg y x1 x2 x3 i.year i.state [aweight = 1/hhat]
The last regression acutally gives me the results which are predicted by the model. I also want to apply an instrumental variable approach where I instrument x1 by z. Does anyone know how to implement this in STATA respectively could somone recommend me any literature regarding FGLS and IV?
Thanks!
boris
I try to regress the following FE-model: yi,t = b0 + b1*x1i,t + b2*x2i,t + b3*x3i,t + yearFE + stateFE. Im interested in the effect of x1 (grants) on y (expenditures).
Due to heteroskedasticity coming from the different sizes of the states I want to apply a FGLS and give the observations different weights.
According to this video I do the following in STATA (https://www.youtube.com/watch?v=x7m3uhTGcbk):
xi: reg y x1 x2 x3 i.year i.state
predict uhat, resid
gen uhat2 = uhat^2
gen loguhat2 = ln(uhat2)
xi: reg loguhat2 x1 x2 x3 i.year i.state
predict ghat, xb
gen hhat = exp(ghat)
xi: reg y x1 x2 x3 i.year i.state [aweight = 1/hhat]
The last regression acutally gives me the results which are predicted by the model. I also want to apply an instrumental variable approach where I instrument x1 by z. Does anyone know how to implement this in STATA respectively could somone recommend me any literature regarding FGLS and IV?
Thanks!

boris
Comment