Statalist The Stata Listserver


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: Flagging estimation errors in -ivreg2-


From   "Michael S. Hanson" <[email protected]>
To   [email protected]
Subject   st: Flagging estimation errors in -ivreg2-
Date   Sun, 11 Feb 2007 14:40:11 -0500

I have a do file that uses a lengthy set of nested loops to automate estimation of a large set of regressions using -ivreg2-, and iteratively build up a summary report. The -ivreg2- commands are executed -quietly- and -capture-d to facilitate building the tables. Spot-checking a few individual estimations, I discovered that two problems that have silently occurred:

1. Some regressors are dropped to perfect collinearity. (This colinearity is not trivial, such as two identical regressors or a set of dummies reproducing the constant; hence such regressions are very difficult to identify ex ante.)

2. The VCV matrix fails a rank condition; the error message displayed on the screen when estimated -noisily- is below. (In my application, the "covariance matrix uses too many lags" may be the statistical source of the problem (still investigating), but the specified equations are theoretically sound.)

"Error: estimated covariance matrix of moment conditions not of full rank;
overidentification statistic not reported, and standard errors and
model tests should be interpreted with caution.
"Possible causes:
covariance matrix of moment conditions not positive definite
covariance matrix uses too many lags
singleton dummy variable (dummy with one 1 and N-1 0s or vice versa)"

Note that -capture- still returns _rc = 0 in either of these cases -- after all, some kind of estimates are reported by -ivreg2- -- so that does not appear to be a feasible way to "flag" these potentially problematic estimation results. What I am looking for is some other way to determine that one (or both) of these errors has arisen with - ivreg2-, and thereby "flag" the output in the summary report so that I can go back and examine the small number (out of hundreds or thousands) of cases that may suffer from either issue.

Any suggestions would be appreciated.

-- Mike


*
* For searches and help try:
* http://www.stata.com/support/faqs/res/findit.html
* 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