Re: [R] Non-positive definite cross-covariance matrices

2010-11-16 Thread Mike Marchywka
> Date: Tue, 16 Nov 2010 17:39:57 -0800 > From: peter.langfel...@gmail.com > To: jbass...@cs.gmu.edu > CC: r-help@r-project.org > Subject: Re: [R] Non-positive definite cross-covariance matrices > > > Peter, > > >

Re: [R] Non-positive definite cross-covariance matrices

2010-11-16 Thread Peter Langfelder
> Peter, > > I see your point.  As it turns out though, what I'm trying to > calculate is heritability using a slightly modified version of an > equation from multivariate quantitative genetics.  Theoretically I > suppose a heritability matrix could be non-positive definite, but in > practice it al

Re: [R] Non-positive definite cross-covariance matrices

2010-11-16 Thread Jeff Bassett
On Tue, Nov 16, 2010 at 1:49 PM, Peter Langfelder wrote: > > It is easy to come up with examples where Cov(A, B) + Cov(B, A) is not > positive definite. As an extreme example, consider a matrix A (say 10 > columns, 100 rows) such that the off-diagonal covariances are all zero > and the columns are

Re: [R] Non-positive definite cross-covariance matrices

2010-11-16 Thread Peter Langfelder
On Tue, Nov 16, 2010 at 9:40 AM, Jeff Bassett wrote: > Giovanni, > > Both matrices describing the points (A and B in my example) are the > same size, so the resulting matrix will always be square.  Also, the > equation I'm using is essentially the following identity: > > Var(A + B) = Var(A) + Var(

Re: [R] Non-positive definite cross-covariance matrices

2010-11-16 Thread Jeff Bassett
Giovanni, Both matrices describing the points (A and B in my example) are the same size, so the resulting matrix will always be square. Also, the equation I'm using is essentially the following identity: Var(A + B) = Var(A) + Var(B) + Cov(A, B) + Cov(B, A) All the covariance matrices that resul

Re: [R] Non-positive definite cross-covariance matrices

2010-11-15 Thread Giovanni Petris
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 pro