Statalist


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Re: st: what is the difference between newey and nwest?


From   gjhxmu@sina.com
To   statalist<statalist@hsphsun2.harvard.edu>
Subject   Re: Re: st: what is the difference between newey and nwest?
Date   Fri, 31 Jul 2009 21:05:49 +0800

Dear Tirthankar,
Thank you for your reply.

I take the following results for example.

webuse invest2,clear
tsset company time

. nwest reg invest stock, lag(1) force

Regression with Newey-West standard errors          Number of obs  =       100
maximum lag : 1                                     F(  1,    98)  =    134.30
                                                    Prob > F       =    0.0000

------------------------------------------------------------------------------
             |             Newey-West
      invest |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
       stock |   .5511169   .0475563    11.59   0.000      .456743    .6454908
       _cons |   77.52273   18.27758     4.24   0.000     41.25146     113.794
------------------------------------------------------------------------------

. nwest reg invest stock, lag(1) force

Regression with Newey-West standard errors          Number of obs  =       100
maximum lag : 1                                     F(  1,    98)  =    121.54
                                                    Prob > F       =    0.0000

------------------------------------------------------------------------------
             |             Newey-West
      invest |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
       stock |   .5511169   .0499894    11.02   0.000     .4519146    .6503192
       _cons |   77.52273   18.85912     4.11   0.000     40.09742     114.948
------------------------------------------------------------------------------

. newey invest stock, lag(1) force

Regression with Newey-West standard errors          Number of obs  =       100
maximum lag: 1                                      F(  1,    98)  =     78.16
                                                    Prob > F       =    0.0000

------------------------------------------------------------------------------
             |             Newey-West
      invest |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
       stock |   .5511169    .062339     8.84   0.000     .4274072    .6748265
       _cons |   77.52273   25.82577     3.00   0.003     26.27233    128.7731
------------------------------------------------------------------------------

. 

 

----- Original Message -----
From: Tirthankar Chakravarty <tirthankar.chakravarty@gmail.com>
To: statalist@hsphsun2.harvard.edu
Subject: Re: st: what is the difference between newey and nwest?
Date: 2009-7-31 19:14:43

I am unable to reproduce your problem. Note that -nwest- is
user-contributed (STB); James Hardin wrote it.
***********
webuse idle2, clear
tsset time
newey usr idle, lag(3)
nwest reg usr idle, lag(3)
************
Maybe you can provide a minimal reproducible example?

T

*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



© Copyright 1996–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index