Statalist


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

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


From   Tirthankar Chakravarty <tirthankar.chakravarty@gmail.com>
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: what is the difference between newey and nwest?
Date   Fri, 31 Jul 2009 12:14:43 +0100

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

2009/7/31  <gjhxmu@sina.com>:
> -newey- and -nwest- are both used to estimate Newey-West standard errors in the stata.
> Why the results of them are different?
> And the results for -nwest- is different each time I run.
>
> The results are as follows,
>
> . nwest reg y x, lag(1) force
>
> Regression with Newey-West standard errors          Number of obs  =      5000
> maximum lag : 1                                     F(  1,  4998)  =   1320.16
>                                                    Prob > F       =    0.0000
>
> ------------------------------------------------------------------------------
>             |             Newey-West
>           y |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
> -------------+----------------------------------------------------------------
>           x |   1.034833   .0284812    36.33   0.000     .9789979    1.090669
>       _cons |   .0296797   .0282062     1.05   0.293    -.0256169    .0849763
> ------------------------------------------------------------------------------
>
> . nwest reg y x, lag(1) force
>
> Regression with Newey-West standard errors          Number of obs  =      5000
> maximum lag : 1                                     F(  1,  4998)  =   1317.95
>                                                    Prob > F       =    0.0000
>
> ------------------------------------------------------------------------------
>             |             Newey-West
>           y |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
> -------------+----------------------------------------------------------------
>           x |   1.034833    .028505    36.30   0.000     .9789512    1.090716
>       _cons |   .0296797   .0282159     1.05   0.293    -.0256359    .0849953
> ------------------------------------------------------------------------------
>
> . newey y x,lag(1) force
>
> Regression with Newey-West standard errors          Number of obs  =      5000
> maximum lag: 1                                      F(  1,  4998)  =   1094.36
>                                                    Prob > F       =    0.0000
>
> ------------------------------------------------------------------------------
>             |             Newey-West
>           y |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
> -------------+----------------------------------------------------------------
>           x |   1.034833   .0312818    33.08   0.000     .9735074    1.096159
>       _cons |   .0296797   .0341419     0.87   0.385    -.0372533    .0966128
> ------------------------------------------------------------------------------
>
> .
>
> Looking forward for any help!
>
> Thank you very much!
>
> Sincerely,
> From Rose.
>
> *
> *   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