[R] Non-positive definite cross-covariance matrices

Giovanni Petris gpetris at uark.edu
Mon Nov 15 21:56:27 CET 2010

What made you think that a cross-covariance matrix should be positive
definite? Id does not even need to be a square matrix, or symmetric.

Giovanni Petris

On Mon, 2010-11-15 at 12:58 -0500, Jeff Bassett wrote:
> I am creating covariance matrices from sets of points, and I am having
> frequent problems where I create matrices that are non-positive
> definite.  I've started using the corpcor package, which was
> specifically designed to address these types of problems.  It has
> solved many of my problems, but I still have one left.
> One of the matrices I need to calculate is a cross-covariance matrix.
> In other words, I need to calculate cov(A, B), where A and B are each
> a matrix defining a set of points.  The corpcor package does not seem
> to be able to perform this operation.
> Can anyone suggest a way to create cross-covariance matrices that are
> guaranteed (or at least likely) to be positive definite, either using
> corpcor or another package?
> I'm using R 2.8.1 and corpcor 1.5.2 on Mac OS X 10.5.8.
> - Jeff
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.

More information about the R-help mailing list