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

Re: st: Performance of ivregress vs ivreg

From   "Brian P. Poi" <>
Subject   Re: st: Performance of ivregress vs ivreg
Date   Tue, 11 Nov 2008 16:21:59 -0600 (CST)

On Tue, 11 Nov 2008, Davide Cantoni wrote:

Dear statalisters,

I have recently moved to Stata 10 and I am surprised about the
replacement of -ivreg- with -ivregress-. While I appreciate some of
the additional options (which would formerly be available only in
-ivreg2-), I am puzzled by the generally strictly inferior performance
of -ivregress-. I could not find any discussion of this in the
Statalist so far, which is slightly surprising to me. Here are my

1. Memory usage. -ivregress- needs much more memory than -ivreg-. So
you need to -set mem- to a much higher level than before.

2. Speed. -ivregress 2sls- is much slower than -ivreg-. I did a small
simulation: -ivreg- took 4 seconds, -ivregress 2sls- took 18 seconds.
That's an increase of 350%!

These two points represent trade-offs between raw speed and features. While -ivreg- is somewhat faster than -ivregress-, the newer -ivregress- offers many features not available with -ivreg-, including support for LIML and GMM estimators and a host of postestimation utilities. Given the increased awareness of problems with weak instruments, validity of overidentifying restrictions, and other issues, the benefits of having the flexibility afforded by -ivregress- outweigh the speed advantage of -ivreg-.

If speed is most important and you do not want to use the postestimation commands, then you could continue to use the undocumented -ivreg- command.

3. Finally I keep getting the following error message, which I can't
explain myself:
   option noline not allowed

We have never seen this error appear with -ivregress-. Make sure your copy of Stata is up-to-date by typing in -update all- and following the instructions on the screen. If you continue to receive this error message, send an email to including the exact syntax you are using along with a dataset to replicate the problem.

   -- Brian Poi
*   For searches and help try:

© Copyright 1996–2015 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index