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   Tirthankar Chakravarty <tirthankar.chakravarty@gmail.com>
To   statalist@hsphsun2.harvard.edu
Subject   Re: Re: st: what is the difference between newey and nwest?
Date   Fri, 31 Jul 2009 14:36:46 +0100

<>

Thank you for your reply. I see your problem now. This is intriguing -
it seems to arise from the use of the -force- option. I will try to
see if I can spot the problem, but maybe it is better to work with
official -newey- rather than -nwest- which was written in 1997. You
may also choose to inspect the source code yourself by

*****
viewsource nwest.ado
viewsource _newey.ado
*****

T

2009/7/31  <gjhxmu@sina.com>:
> 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/
>



-- 
To every ω-consistent recursive class κ of formulae there correspond
recursive class signs r, such that neither v Gen r nor Neg(v Gen r)
belongs to Flg(κ) (where v is the free variable of r).

*
*   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