Non-symmetric and negative definite covariance matrices, as a consequence of rounding off errors
5 views (last 30 days)
Show older comments
Hello,
I have a problem with covariance matrices that turn non-symmetric and negative definite, as a consequence of rounding off errors. This leads to complex and negative eigenvalues. I've symmetrized the matrices by
A = (A + A')/2;
However, I haven't been able to correct the negative eigenvalues, and it's very important that the matrices are always non-negative definite. For example, the following method doesn't help:
[V,D] = eig(A); D = max(D,0); A = V*D/V;
Can anyone please suggest what can be done here?
Thanks, Artour
0 Comments
Accepted Answer
Matt J
on 25 Sep 2013
Edited: Matt J
on 25 Sep 2013
It's unlikely that the eigenvalues are really negative. It's just that the computation of the small positive eigenvalues by eig() has small errors.
To avoid issues associated with this, you want your covariance estimate to be distinctly positive definite, which should be the case if you are sampling enough observations and if none of the variables are approximately a linearly combination of the others (if some are, get rid of them)
0 Comments
More Answers (1)
See Also
Categories
Find more on Linear Algebra in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!