A quick and dirty way out of this is to take the spectral
decomposition and purge the negative eigenvalues and the corresponding
eigenspaces. I used to have an article in my collection from Linear
Algebra and Applications where it was shown that doing so gives you
the best approximation of a given matrix by a positive semidefinite
one in both the spectral and the Frobenius norm, as far as I can
recall... I think that's it:
http://citeseer.ist.psu.edu/context/1436374/0; see also
http://citeseer.ist.psu.edu/higham89matrix.html which is downloadable.
If Stata insists on positive definite matrices, then you may have to
replace the zeroes and negatives by c(epsfloat) say.
This of course only works as fix-up, you don't really know what goes
on there. A kinda lame excuse you might give is that this is an
asymptotic result, and who knows what happens in the finite samples.
Another explanation might be that something is wrong with
identification, and thus you are getting information matrices that are
degenerate; you would need to check into your model to see if that is
really so. The spectral decomposition should still be informative, as
the eigenspace corresponding to the zero and negative eigenvalues
would show where underidentificaiton and misspecification, if any,
might be.
On 1/19/07, Marcus Winters <[email protected]> wrote:
I am estimating a 2 stage model and want to adjust the standard errors to
account for the predicted regressor. The code I'm using is a combination of
Hardin's 2002 article on the Murphy-Topel estimator and Hole's 2006 article.
I have worked with several different model specifications and continually
get an error message in the "doit" program that the matrix is not positive
definite. Does anyone have any advice on the best way to trouble shoot
this?
--
Stas Kolenikov
http://stas.kolenikov.name
*
* 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/