Non-symmetric and negative definite covariance matrices, as a consequence of rounding off errors

5 views (last 30 days)
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

Accepted Answer

Matt J
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)

More Answers (1)

Artour
Artour on 25 Sep 2013
Matt J, thanks for your answer. Unfortunately I can't make the matrix positive definite. I'm looking at a Kalman filtering problem with diffuse initial conditions. The rank of the diffuse matrix goes to zero as new information comes in. So, before there's enough information for a proper prior, as part of the algorithm I have to work with non-negative definite matrices.

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!