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, statalist.org 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" <FNarita@imf.org>
To   "statalist@hsphsun2.harvard.edu" <statalist@hsphsun2.harvard.edu>
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:

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.

Thank you for your time in advance, 
Futoshi

--
Futoshi Narita
Economist 
Finance Department 
International Monetary Fund 
TEL: 202-623-7143 
Email: fnarita@imf.org 


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