Dear listusers,
In trying to write a function to obtain the square root of a symmetric (and
positive definite) matrix in mata (similar to matsqrt in stata) I came across a
problem that really confuses me.
When I try to obtain the eigenvectors and eigenvalues of a matrix of size
249 x 249 (or smaller) all is fine, but when I try to do the same thing for a
matrix of size 250 x 250 (or larger) I get the following error message:
order(): 3200 conformability error
_symeigen_work(): - function returned error
_symeigensystem(): - function returned error
symeigensystem(): - function returned error
<istmt>: - function returned error
Below I provide an example that illustrates the problem (and the problem do
occur for non-identity matrices as well). I guess I miss something really
obvious here, either in the design of mata or in the design of
symeigensystem and I would really appreciate if someone could explain to
me what that something is.
/*This is an example to illustrate the problem. Q1 works fine, but Q2 returns
the error message described above*/
mata:
Q1=symeigensystem(I(249), Evec1=.,Eval1=.)
Q2=symeigensystem(I(250), Evec2=., Eval2=.)
end
Best Regards
Karl Lindgren
Department of Government, Uppsala University
*
* 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/