Statalist


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

st: re: Troubleshooting 'not sorted' and 'not regularly spaced' errors


From   Kit Baum <[email protected]>
To   [email protected]
Subject   st: re: Troubleshooting 'not sorted' and 'not regularly spaced' errors
Date   Sat, 11 Oct 2008 16:07:02 -0400

< >
Re Michael Hanson's comments on David Roodman's -newey2-: David has on more than one occasion suggested that those wanting to calculate Newey-West standard errors in an OLS regression should just use - ivreg2- of Baum, Schaffer, Stillman. Despite its name it is happy to estimate OLS models without any instruments, and it can estimate Newey- West standard errors as well as a variety of other HAC models. E.g.

ivreg2 irx t, robust bw(9)

Notice that it reports the presence of gaps but does not choke on them. -ivreg2- requires Stata 9.2.

In fact, contradictory to its syntax diagram, -ivregress- can do this as well. The -ivregress- syntax states that the (varlist2 = varlist_iv) component is mandatory, but the program does not enforce this:

ivregress 2sls irx t, vce(hac bartlett 8)

works, making no mention of gaps.  -ivregress- requires Stata 10.

Kit Baum, Boston College Economics and DIW Berlin
http://ideas.repec.org/e/pba1.html
An Introduction to Modern Econometrics Using Stata:
http://www.stata-press.com/books/imeus.html


*
*   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–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index