Announcement

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

  • 3SLS and heteroskedasticity

    Hi,

    I'm running a system of equations model using reg3.

    Code:
    Code:
    reg3 (dlrgdp L.dlrgdp dzsly dlenguse dlpopden i.year) (dlenguse dlrgdp dzsly  dlpopden i.year)  (dlpccarb dlrgdp dzsly dlenguse dlpopden i.year)
    lmhreg3
    lmareg3


    Variables: dlrgdp:GDP, dzsly: quality of insitutions, dlenguse: energy use, dlpopden: population density, dlpccarb: carbon emissions [Other than quality of institutions, all variables are logged.]

    dzsly and dlpopden are predetermined variables
    dlrgdp, dlenguse and dlpccarb are endogenous variables

    This code above describes a relationship between GDP, energy use and carbon emissions. My data runs from 1984 to 2016 for 120 countries. To address non-stationarity, I first-difference the entire dataset (after testing for unit root). The post estimation commands [lmhreg3 and lmareg3] show presence of heteroskedasticity and autocorrelation. However, I am not able to address these issues. In 2SLS estimation using xtivreg2, one can use robust standard errors and move on.


    In such a scenario, how to fix heteroskedasticity and auto correlation?


    http://statalist.1588530.n2.nabble.c...td5647547.html
    I followed this thread and tried bootstrapping SEs. I got an error message saying
    time-series operators are not allowed with bootstrap without panels, see tsset
    r(198);
    Thanks!


  • #2
    Hi, can anyone please answer to this query of mine?

    Comment


    • #3
      This is something I wish Stata would change in future versions. It makes a lot of sense to compute heteroskedasticity-robust (in the system sense, as I discuss in Chapter 7 of my MIT Press book), autocorrelation robust (also robust to heteroskedasticity), and cluster-robust standard errors. Unfortunately, that's not currently the case.

      But you can do something just as good -- actually, better. Use the -gmm- command to set up the three equation system. It's not much harder than using the -reg3- command. Then, specify the wmat(hac m) option, where you choose m as the truncation lag in the HAC weighting matrix. You haven't shown output so I have no idea if you have annual data, quarterly data, or number of observations. The resulting estimator is asymptotically no less efficient than the 3SLS estimator and usually more efficient if you have overidentification. I am puzzling over how the first equation is identified since you appear to have instruments for dlenguse. Maybe I need to study it more. But this wasn't what you asked about, anyway.

      JW

      Comment


      • #4
        Jeff Wooldridge Thank you replying to my query. Yes you were right, the equation couldn't be computed. The data is annual.

        I changed it. I ran the following equation:
        Code:
        reg3 (dlrgdp L.dlrgdp dzsly dlrn dltr dlenguse dlpopden i.year) (dlenguse L.dlenguse dlrgdp c.dlrgdp#c.dlrgdp dzsly  dlpopden i.year) (dlpccarb L.dlpccarb dlenguse dlrgdp c.dlrgdp#c.dlrgdp dzsly  dlpopden i.year)
        Code:
        Three-stage least-squares regression
        --------------------------------------------------------------------------
        Equation             Obs   Parms        RMSE    "R-sq"       chi2        P
        --------------------------------------------------------------------------
        dlrgdp             2,917      34    .0718756   -0.9205     570.95   0.0000
        dlenguse           2,917      33    .0613337    0.1320     567.43   0.0000
        dlpccarb           2,917      34    .2585936   -3.3948     348.86   0.0000
        --------------------------------------------------------------------------
        
        -----------------------------------------------------------------------------------
                          |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
        ------------------+----------------------------------------------------------------
        dlrgdp            |
                   dlrgdp |
                      L1. |   .0267461   .0106567     2.51   0.012     .0058593    .0476329
                          |
                    dzsly |    .010686   .0170746     0.63   0.531    -.0227796    .0441516
                     dlrn |   .1231814    .051634     2.39   0.017     .0219807    .2243822
                     dltr |   .0012655   .0013575     0.93   0.351    -.0013951    .0039261
                 dlenguse |   1.114874   .0895773    12.45   0.000     .9393058    1.290442
                 dlpopden |   .2813165   .1000536     2.81   0.005      .085215    .4774179
                          |
                     year |
              ....
                          |
                    _cons |   .0055078   .0084732     0.65   0.516    -.0110995     .022115
        ------------------+----------------------------------------------------------------
        dlenguse          |
                 dlenguse |
                      L1. |   .0180829   .0099685     1.81   0.070    -.0014551    .0376208
                          |
                   dlrgdp |   .6321989   .0785178     8.05   0.000     .4783069     .786091
                          |
        c.dlrgdp#c.dlrgdp |  -.1243228   .0528397    -2.35   0.019    -.2278867   -.0207588
                          |
                    dzsly |   .0192155   .0156197     1.23   0.219    -.0113986    .0498296
                 dlpopden |  -.2045773   .0891345    -2.30   0.022    -.3792776    -.029877
                          |
                     year |
                   ......
                          |
                    _cons |   .0006261   .0075921     0.08   0.934     -.014254    .0155063
        ------------------+----------------------------------------------------------------
        dlpccarb          |
                 dlpccarb |
                      L1. |  -.1595844   .0234677    -6.80   0.000    -.2055802   -.1135885
                          |
                 dlenguse |   4.569528   .6304294     7.25   0.000     3.333909    5.805147
                   dlrgdp |  -1.350306   .5382404    -2.51   0.012    -2.405237    -.295374
                          |
        c.dlrgdp#c.dlrgdp |   .9070009   .1589677     5.71   0.000       .59543    1.218572
                          |
                    dzsly |  -.1907557   .0440221    -4.33   0.000    -.2770374    -.104474
                 dlpopden |   .7193137   .3057496     2.35   0.019     .1200555    1.318572
                          |
                     year |
                 .....
                    _cons |   -.056661   .0218597    -2.59   0.010    -.0995054   -.0138167
        -----------------------------------------------------------------------------------
        Endogenous variables:  dlrgdp dlenguse dlpccarb
        Exogenous variables:   L.dlrgdp dzsly dlrn dltr dlpopden 1986.year 1987.year
             1988.year 1989.year 1990.year 1991.year 1992.year 1993.year 1994.year
             1995.year 1996.year 1997.year 1998.year 1999.year 2000.year 2001.year
             2002.year 2003.year 2004.year 2005.year 2006.year 2007.year 2008.year
             2009.year 2010.year 2011.year 2012.year 2013.year 2014.year L.dlenguse
             c.dlrgdp#c.dlrgdp L.dlpccarb
        ------------------------------------------------------------------------------
        I suppressed year dummies here to make it more compact.
        The idea behind first two equations is - energy use acts as a stimulant in the economy and contributes to GDP. Higher GDP in turn encourages more energy use.
        Please correct me if i am wrong.
        Last edited by Ritika Khurana; 24 Sep 2019, 08:15.

        Comment


        • #5
          Hello I also have a similar kind of issue.

          I am going to investigate the relationship between corporate social responsibility and firm financial performance. I use 3sls for this.

          FP = CSR + controls + instrument variable for CSR + error (1)

          CSR = FP + Control + error (2)


          now I write my stata command as

          reg3(top csr control variables) (csr top control variables), exog (instrument variable for CSR)

          when I run this, I have got a very high coffecient for csr (the coefficient is 35).
          Could anyone please let me know if the above stata code is correct or any issue, and if so what is the correct stata code for this

          thanks a lot


          Comment

          Working...
          X