Bookmark and Share

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, is already up and running.

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

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

From   "Narita, Futoshi" <>
To   "" <>
Subject   st: newey v.s. ivregress 2sls, vce(hac nw)
Date   Tue, 11 Sep 2012 16:02:18 -0400

Dear statalisters,

I have greatly benefitted from the following very useful thread:

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

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.

Thank you for your time in advance, 

Futoshi Narita
Finance Department 
International Monetary Fund 
TEL: 202-623-7143 

*   For searches and help try:

© Copyright 1996–2016 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index