Notice: On March 31, it was **announced** that Statalist is moving from an email list to a **forum**. The old list will shut down on April 23, and its replacement, **statalist.org** is already up and running.

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

From |
"Brian P. Poi" <bpoi@stata.com> |

To |
statalist@hsphsun2.harvard.edu |

Subject |
Re: st: newey v.s. ivregress 2sls, vce(hac nw) |

Date |
Tue, 11 Sep 2012 15:57:36 -0500 |

On 09/11/2012 03:02 PM, Narita, Futoshi wrote:

Dear statalisters, I have greatly benefitted from the following very useful thread: http://www.stata.com/statalist/archive/2009-03/msg01009.html But, I have come up with one question as follows: Why do we get different standard errors when we use "newey, lag(xx)" and " ivregress 2sls, vce(hac nw xx)"? The above-mentioned thread seems to claim that "ivregress 2sls" is used to calculate HAC standard errors and if we choose "nw" option, it should calculate the same standard errors as "newey" does. But, the results are different. Please run the following example (based on the one in the cited thread) to see the discrepancies: // Begin example clear freduse GDPC96 PCECC96 gen t = qofd(daten) format t %tq drop date* tsset t gen y = ln(GDPC96) gen c = ln(PCECC96) ivreg2 c y L(-4/4)D.y, bw(14) robust ivregress 2sls c y L(-4/4)D.y, vce(hac nw 13) newey c y L(-4/4)D.y, lag(13) // End example The first two estimation results are identical, but the last one is slightly different from others. I set ivreg2's "bandwidth" to be correctly corresponding to "lag"s (i.e., bw = lag + 1). I have my own Mata code that calculates Newey-West standard errors, based on the formula in Hayashi (2000). My code gives me exactly the same results as "newey" does. So, then, do "ivregress" and "ivreg2" use a different formula? I tried to replace the denominator ("n" versus "n-j") but didn't get it matched (though my code may have errors). I would really appreciate it if anybody could tell me the reason of the discrepancies and/or could help solve my possible misunderstanding.

Futoshi, The difference really is just a degree-of-freedom adjustment. By default, -ivreg2- and -ivregress- report large-sample statistics that do not adjust for degrees of freedom, while -newey- reports small-sample statistics that do adjust. -ivreg2- and -ivregress- both accept a 'small' option to get small-sample statistics, and when you use that option, you get the same results as -newey-: . ivreg2 c y L(-4/4)D.y, bw(14) robust small . ivregress 2sls c y L(-4/4)D.y, vce(hac nw 13) small . newey c y L(-4/4)D.y, lag(13) produce identical standard errors. -- Brian Poi -- bpoi@stata.com * * 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/

**Follow-Ups**:**RE: st: newey v.s. ivregress 2sls, vce(hac nw)***From:*"Narita, Futoshi" <FNarita@imf.org>

**References**:**st: newey v.s. ivregress 2sls, vce(hac nw)***From:*"Narita, Futoshi" <FNarita@imf.org>

- Prev by Date:
**st: newey v.s. ivregress 2sls, vce(hac nw)** - Next by Date:
**Re: st: First passage problem** - Previous by thread:
**st: newey v.s. ivregress 2sls, vce(hac nw)** - Next by thread:
**RE: st: newey v.s. ivregress 2sls, vce(hac nw)** - Index(es):