Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Feasible Generalized Least Squares (FGLS) and Instrumental Variable approach

    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












  • #2
    You didn't get a quick answer. You'll increase your chances of a useful answer by following the FAQ on asking questions - provide Stata code in code delimiters, readable Stata output, and sample data using dataex. By the way, in recent versions of Stata, the xi: prefix is not needed.

    Without saying I fully buy your analysis, xtivreg gives you instrumental variables. It works with robust standard errors. xtgls gives you a much more flexible approach to panel data error structures, but not instrumental variables. The eregress routines might also do what you want, but I'm not sure.

    Comment


    • #3
      Thanks for your answer.
      I have found another post where someone was looking for the same thing: (https://www.stata.com/statalist/arch.../msg00536.html). Unfortunately no answer since 2003...

      In the meantime I have found another solution using the xtgls command as follows:

      Code:
      xi: xtgls y x1 x2 x3 i.year i.state, corr(independent)  panels(heteroskedastic)
      Unfortunately this is still not the IV estimation but perhaps someone know how to adapt the xtgls command for IV estimation?

      Comment


      • #4
        Phil, I have just seen one of your posts in 2011 (https://www.stata.com/statalist/arch.../msg00384.html). Seems like we have a similar problem. I have also observation which vary massively in size. That's why I would like to estimate a FGLS. How did you solve the problem?

        Comment

        Working...
        X