Announcement

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

  • #16
    Originally posted by Andrew Musau View Post
    Perfect! Thanks very much.
    You are welcome, but wait, dont go so fast

    Great investigative work on figuring out what -newey- with the force option does in your post #13 !

    Do you see any problem with this approach? Do you think that there is something wrong going on here with using -newey- on panel data or not?

    I dont see nothing wrong, but Eric and Sebastian seem suspicious of this whole -newey, force- arrangement.

    Comment


    • #17
      Joro Kolev, I seem to remember from a previous post that if you combine the same time periods and give them different values, you need to adjust the lag-length. At least an experiment using xtscc (from SSC) suggests so too. But generally, the approach is fine.

      Code:
      . webuse grunfeld, clear
      
      . xtset company year
             panel variable:  company (strongly balanced)
              time variable:  year, 1935 to 1954
                      delta:  1 year
      
      . xtscc invest mvalue kstock, lag(3)
      
      Regression with Driscoll-Kraay standard errors   Number of obs     =       200
      Method: Pooled OLS                               Number of groups  =        10
      Group variable (i): company                      F(  2,    19)     =     93.20
      maximum lag: 3                                   Prob > F          =    0.0000
                                                       R-squared         =    0.8124
                                                       Root MSE          =   94.4084
      
      ------------------------------------------------------------------------------
                   |             Drisc/Kraay
            invest |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
      -------------+----------------------------------------------------------------
            mvalue |   .1155622   .0130406     8.86   0.000     .0882679    .1428564
            kstock |   .2306785   .0509161     4.53   0.000     .1241098    .3372472
             _cons |  -42.71437   12.65602    -3.38   0.003    -69.20373   -16.22501
      ------------------------------------------------------------------------------
      
      
      . sort company year
      
      . gen t=_n
      
      . xtset company t
             panel variable:  company (weakly balanced)
              time variable:  t, 1 to 200
                      delta:  1 unit
      
      . xtscc invest mvalue kstock, lag(3)
      
      Regression with Driscoll-Kraay standard errors   Number of obs     =       200
      Method: Pooled OLS                               Number of groups  =        10
      Group variable (i): company                      F(  2,   199)     =     76.56
      maximum lag: 3                                   Prob > F          =    0.0000
                                                       R-squared         =    0.8124
                                                       Root MSE          =   94.4084
      
      ------------------------------------------------------------------------------
                   |             Drisc/Kraay
            invest |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
      -------------+----------------------------------------------------------------
            mvalue |   .1155622   .0107957    10.70   0.000     .0942735    .1368508
            kstock |   .2306785   .0637743     3.62   0.000     .1049183    .3564387
             _cons |  -42.71437   14.88858    -2.87   0.005    -72.07399   -13.35475
      ------------------------------------------------------------------------------
      
      
      . xtscc invest mvalue kstock, lag(9)
      
      Regression with Driscoll-Kraay standard errors   Number of obs     =       200
      Method: Pooled OLS                               Number of groups  =        10
      Group variable (i): company                      F(  2,   199)     =     55.62
      maximum lag: 9                                   Prob > F          =    0.0000
                                                       R-squared         =    0.8124
                                                       Root MSE          =   94.4084
      
      ------------------------------------------------------------------------------
                   |             Drisc/Kraay
            invest |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
      -------------+----------------------------------------------------------------
            mvalue |   .1155622   .0130144     8.88   0.000     .0898983     .141226
            kstock |   .2306785   .0679612     3.39   0.001     .0966619     .364695
             _cons |  -42.71437   15.58115    -2.74   0.007    -73.43973   -11.98901
      ------------------------------------------------------------------------------
      In the above, a lag of 9 is a better approximation. However, the user-written command newey2 (from SSC) does no adjustment. Maybe the author David Roodman can shed more light on this.

      Comment


      • #18
        This paper provides a survey of robust standard error estimation for panel models (including Newey-West estimators):
        https://www.jstatsoft.org/article/view/2476/0
        There are also routines in R with replication material.
        I have not gone through it as yet.
        Last edited by Eric de Souza; 22 Dec 2018, 05:58. Reason: On edit: I have not gone through it as yet

        Comment


        • #19
          I wrote newey2 in part to handle panel data properly. But that was a long time ago--2002--and I haven't touched the program and years. Actually I hacked together ivreg and newey to make newey2.

          I believe ivreg2 offers Newey-West errors and probably handles panels properly too, and is a much more versatile program anyway. And it can do OLS.

          If the panel is wide, it does seem like you should just cluster by individual.

          If you are worried about two-way dependence, also consider multiway clustering. waldtest, in my boottest package, can multiway-cluster results after regress and other commands. ivreg2 also offers multiway clustering with a slightly different small-sample correction.

          --David

          Comment


          • #20
            Thank you for the tips, David.

            Apparently the current version of -ivreg2- does everything that appeared in this thread, including HAC with automatic bandwidth selection. ( I just installed the most recent version of -ivreg2- and read the help.)

            Comment


            • #21
              @Joro: to use -ivreg2-, you have to also download -ranktest-.
              Mark Schaffer has also written a programme called -xtivreg2- which is a panel data wrapper for -ivreg2-. It only supports fixed effect (fe) and first difference (fd) estimators. It does not support factor variables.

              Comment


              • #22
                Hi guys, I had a question here. Does newey-west estimation automatically incorporate time- fixed effects? Or do we have to specify it?

                Also, how do you decide what the optimal lag-length is?

                Comment


                • #23
                  No, -newey- does not automatically incorporate any fixed effects, it is just linear regression with Newey-West standard errors.

                  If you want to have optimal lag length selection, you need to have a command that knows how to do optimal length selection, e.g., -ivreg2- and -ivregress- know how to choose lag length optimally, -newey- and -newey2- do not know how to do that. In the latter case you can use a mechanical rule of thumb such as Stock and Watson's 0.75*(T)^(1/3).


                  Originally posted by Saunok Chakrabarty View Post
                  Hi guys, I had a question here. Does newey-west estimation automatically incorporate time- fixed effects? Or do we have to specify it?

                  Also, how do you decide what the optimal lag-length is?

                  Comment


                  • #24
                    Hello, I am trying to run Newey and west regression however I assumed that the lag is 0 I really don't understand why sometimes it is 0 and other time is 3? Also I want to have the R2 and adjusted R2 in the regression output but for some reason is not shown here is the command I am using:

                    Code:
                    newey AQ ESGCombinedScore SIZE_W GROWTH_W RETURNONASSETS_W MTB_W RDINT_W LEV_W CYCLE_W WGI i.year i.IndustryX if year>2001 & year<2019, lag (0)
                    estimates store NEWcombined
                    and this is the code I am using for exporting the regression output

                    Code:
                    esttab NEWcombined using newregression88.rtf, b t parentheses r2(%8.2f) ar2(%8.2f) replace nogap star(* 0.10 ** 0.05 *** 0.01) compress
                    estimates clear

                    Comment


                    • #25
                      It appears that you have panel data. What is your \(N\) and \(T\)? Lag 0 is not meaningful for the newey command, which is linear regression with Newey-West standard errors (there is no such thing as Newey-West regression). It (lag 0) is equivalent to running regress with robust standard errors. The lags specify the maximum order of autocorrelation.

                      Comment


                      • #26
                        The N is 5493 from 2002 to 2018.

                        Comment


                        • #27
                          Use xtreg or reghdfe (SSC) and cluster on the panel identifier. Cluster-robust standard errors in wide panels are robust to heteroscedasticity and arbitrary forms of autocorrelation. I do not see the advantage of Newey-West standard errors in this instance.

                          Comment


                          • #28
                            Ok can I ask why Newey-West is not suitable here? Also based on what I decide the lag number?

                            Comment


                            • #29
                              As I said, the Newey-West method corrects the standard errors for autocorrelation. You already get this with cluster-robust standard errors in wide panels, plus you are taking into account within-cluster correlations. For optimal lag lengths, see #4 in the linked thread.

                              https://www.statalist.org/forums/for...lation-command

                              Comment


                              • #30
                                okay thank you for your help.

                                Comment

                                Working...
                                X