Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: st: -ivregress- bug or feature?
From
"Brian P. Poi" <[email protected]>
To
[email protected]
Subject
Re: st: -ivregress- bug or feature?
Date
Thu, 21 Mar 2013 12:08:37 -0500
On 03/21/2013 10:54 AM, Hiroyuki Kawakatsu wrote:
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,
This is a bug in -ivregress-. It is ignoring the 'noconstant' option when it checks for collinearity between the excluded instruments z1 and z2. Because it's not respecting the 'noconstant' option, -ivregress- is complaining that z1 is perfectly correlated with the constant term.
We'll get this fixed in a future adofile update.
-- Brian Poi
-- [email protected]
*
* 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/