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 at the end of May, and its replacement, statalist.org is already up and running.


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

st: -ivregress- bug or feature?


From   Hiroyuki Kawakatsu <hkawakat@gmail.com>
To   statalist@hsphsun2.harvard.edu
Subject   st: -ivregress- bug or feature?
Date   Thu, 21 Mar 2013 15:54:22 +0000

Hi,

-ivregress- does not appear to detect collinearity appropriately
when the -noconstant- option is specified and a (user generated)
constant is included in the instrument list. Is this a feature or
bug? (the error appears to be generated in the `hidden' command
_rmcoll* in -CheckCollin- of ivregress.ado)

/*code to illustrate feature/bug*/
set obs 10
set seed 1

gen x1 = rnormal()
gen x2 = rnormal()
gen y = x1 - x2 + rnormal()
gen z1 = 1
gen z2 = rnormal()
ivregress gmm y (x1 x2 = z1 z2), nocon

/*
the last line results in the error:
note: z1 omitted because of collinearity
equation not identified; must have at least as many instruments not in
the regression as there are instrumented variables
r(481);

not clear what z1 is collinear with... -gmm- works fine with

gmm (y - {b1}*x1 - {b2}*x2), one inst(z1 z2, nocons)
*/

-- 
+---
| Hiroyuki Kawakatsu
| Business School, Dublin City University
| Dublin 9, Ireland. Tel +353 (0)1 700 7496
*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/faqs/resources/statalist-faq/
*   http://www.ats.ucla.edu/stat/stata/


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