Announcement

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

  • Panel Data IV Regression with Two Endogenous Variables

    Hello,

    I am currently working with the dataset mathpnl.***. In order to get the effect that expenditures have on test score passing rate of fourth graders, I regress math4 on real expenditures, using fixed effects regression. Since I suppose expenditures to be correlated with the idiosyncratic error, I want to use IV Regression. My current problem is, that I am having two potentially endogenous explanatory variables rexpp and rexpp_1. My instruments are the foundation grant and the interaction of foundation grant and dummy variable.

    Unfortunately Stata is omitting the coefficient of rexpp.
    I really don't know how to continue and change my code in order to get an estimator for rexpp.

    I really would appreciate some tips of help because I am somehow stuck.

    Thank you very much.

    xtivreg math4 (lrexpp lrexpp_1 = lfound l95 l96 l97 l98) $controliv, fe
    note: l95 omitted because of collinearity
    note: l96 omitted because of collinearity
    note: l97 omitted because of collinearity
    note: l98 omitted because of collinearity

    Fixed-effects (within) IV regression Number of obs = 2,159
    Group variable: distid Number of groups = 550

    R-sq: Obs per group:
    within = 0.0010 min = 1
    between = 0.0403 avg = 3.9
    overall = 0.0090 max = 4

    Wald chi2(5) = 72134.88
    corr(u_i, Xb) = -0.8181 Prob > chi2 = 0.0000

    ------------------------------------------------------------------------------
    math4 | Coef. Std. Err. z P>|z| [95% Conf. Interval]
    -------------+----------------------------------------------------------------
    lrexpp | 0 (omitted)
    lrexpp_1 | 63.72222 4.292348 14.85 0.000 55.30937 72.13507
    lunch | .8404932 .2171041 3.87 0.000 .4149769 1.26601
    lunchsq | -.0026656 .0028577 -0.93 0.351 -.0082667 .0029354
    lenrol | 76.54679 38.45923 1.99 0.047 1.168077 151.9255
    lenrolsq | -4.949612 2.746436 -1.80 0.072 -10.33253 .4333028
    _cons | -796.191 149.5337 -5.32 0.000 -1089.272 -503.1103
    -------------+----------------------------------------------------------------
    sigma_u | 22.561662
    sigma_e | 11.198609
    rho | .80233064 (fraction of variance due to u_i)
    ------------------------------------------------------------------------------
    F test that all u_i=0: F(549,1604) = 3.27 Prob > F = 0.0000
    ------------------------------------------------------------------------------
    Instrumented: lrexpp lrexpp_1
    Instruments: lunch lunchsq lenrol lenrolsq lfound
    ------------------------------------------------------------------------------
    Last edited by Lea Birm; 19 Feb 2020, 13:27.

  • #2
    Welcome to state a list. You did not get a quick answer. You will increase the chances of a useful answer by following the FAQ on asking questions – provide Stata code in code delimiters, readable Stata output (which you do provide), and sample data using dataex.

    I think your problem is that you only have one additional exogenous variable usable in your list of instruments since the other four are dropped because of collinearity. With only one exogenous variable you can only have an instrument for one endogenous variable. The solution is to find additional exogenous variables that are not collinear to add to the instrument list..

    If this doesn't solve the problem, I would check that your two lrexpp variables aren't perfectly correlated in the usable sample for your final estimate.

    Finally, I might check what happens if you run this model with XTreg - does it not estimate both variables?

    Comment


    • #3
      Dear Mr. Bromiley,

      Thank you very much for your response. I am trying to improve the way I am asking questions.

      I have run the regression with xtreg and fixed effects and as a result I get estimates for lrexpp and lrexpp_1. I think that this model fits quite well, but since I can not exclude any correlation between the explanatory variables and the idiosyncratic error term, I also want to run an iv regression (fe) and compare the results.

      [xtreg math4 lrexpp lrexpp_1 $control , fe]

      Fixed-effects (within) regression Number of obs = 3,300
      Group variable: distid Number of groups = 550

      R-sq: Obs per group:
      within = 0.6029 min = 6
      between = 0.0323 avg = 6.0
      overall = 0.3132 max = 6

      F(11,2739) = 378.06
      corr(u_i, Xb) = -0.0610 Prob > F = 0.0000

      ------------------------------------------------------------------------------
      math4 | Coef. Std. Err. t P>|t| [95% Conf. Interval]
      -------------+----------------------------------------------------------------
      lrexpp | .449403 2.564402 0.18 0.861 -4.578955 5.477761
      lrexpp_1 | 7.309974 2.384014 3.07 0.002 2.635326 11.98462
      y94 | 6.116057 .5627774 10.87 0.000 5.012546 7.219568
      y95 | 17.91013 .7078583 25.30 0.000 16.52214 19.29812
      y96 | 17.71773 .7803005 22.71 0.000 16.18769 19.24776
      y97 | 14.95576 .8245826 18.14 0.000 13.3389 16.57263
      y98 | 29.65786 .8596281 34.50 0.000 27.97227 31.34344
      lunch | .0730933 .1196749 0.61 0.541 -.1615689 .3077556
      lunchsq | -.0002439 .0016056 -0.15 0.879 -.0033922 .0029044
      lenrol | 10.09453 8.467345 1.19 0.233 -6.508501 26.69756
      lenrolsq | -.7154355 .6097558 -1.17 0.241 -1.911063 .4801923
      _cons | -58.92273 43.51133 -1.35 0.176 -144.2411 26.39561
      -------------+----------------------------------------------------------------
      sigma_u | 11.587473
      sigma_e | 8.9971971
      rho | .62387373 (fraction of variance due to u_i)
      ------------------------------------------------------------------------------
      F test that all u_i=0: F(549, 2739) = 5.75 Prob > F = 0.0000



      I have rearranged the code for the VI regression but still I do not think that my model fits quite well. I think that I might have some problem with serial correlation because of the lagged explanatory variable but I could not finde any solution for an IV regression with lagged independent variable:

      [xtivreg math4 ( lrexpp_1 lrexpp = lfound l96 l97 l98 ) lunch lunchsq lenrol lenrolsq y96 y97 y98, fe vce(cluster distid)]

      Fixed-effects (within) IV regression Number of obs = 2,159
      Group variable: distid Number of groups = 550

      R-sq: Obs per group:
      within = 0.1873 min = 1
      between = 0.0063 avg = 3.9
      overall = 0.0219 max = 4


      Wald chi2(9) = 2446.45
      corr(u_i, Xb) = -0.8614 Prob > chi2 = 0.0000

      (Std. Err. adjusted for 550 clusters in distid)
      ------------------------------------------------------------------------------
      | Robust
      math4 | Coef. Std. Err. z P>|z| [95% Conf. Interval]
      -------------+----------------------------------------------------------------
      lrexpp_1 | -49.5454 31.34943 -1.58 0.114 -110.9892 11.89836
      lrexpp | 92.11987 45.94435 2.01 0.045 2.070603 182.1691
      lunch | .3645876 .394917 0.92 0.356 -.4094354 1.138611
      lunchsq | -.0030269 .0044898 -0.67 0.500 -.0118268 .005773
      lenrol | 141.3755 79.71667 1.77 0.076 -14.86626 297.6174
      lenrolsq | -8.683313 5.234127 -1.66 0.097 -18.94201 1.575386
      y96 | 4.722119 3.084099 1.53 0.126 -1.322603 10.76684
      y97 | 1.072448 3.345067 0.32 0.749 -5.483763 7.628658
      y98 | 16.18271 3.858236 4.19 0.000 8.620708 23.74472
      _cons | -880.9539 479.0964 -1.84 0.066 -1819.966 58.05787
      -------------+----------------------------------------------------------------
      sigma_u | 26.682158
      sigma_e | 10.112941
      rho | .87439151 (fraction of variance due to u_i)
      ------------------------------------------------------------------------------
      Instrumented: lrexpp_1 lrexpp
      Instruments: lunch lunchsq lenrol lenrolsq y96 y97 y98 lfound l96 l97 l98
      ------------------------------------------------------------------------------

      Can someone give me any advice, especially concerning how to adjust my code for two (lagged) endogenous variables?

      Comment

      Working...
      X