[R] Relationship between covariance and inverse covariance matrices
Vivian Shih
vivs at ucla.edu
Thu Dec 8 23:42:13 CET 2011
Hi,
I've been trying to figure out a special set of covariance
matrices that causes some symmetric zero elements in the inverse
covariance matrix but am having trouble figuring out if that is
possible.
Say, for example, matrix a is a 4x4 covariance matrix with equal
variance and zero covariance elements, i.e.
[,1] [,2] [,3] [,4]
[1,] 4 0 0 0
[2,] 0 4 0 0
[3,] 0 0 4 0
[4,] 0 0 0 4
Now if we let a[1,2]=a[2,1]=3, then the inverse covariance matrix
will have nonzero elements on the diagonals as well as for elements
[1,2] and [2,1]. If we further let a[3,4]=a[4,3]=0.5 then the indices
of the nonzero elements of the covariance matrix also matches those
indices of the inverse.
The problem is, if any of the nonzero off-diagonal indices match,
then the inverse covariance matrix will have non-matching nonzero
elements. For example, if a[1,2]=a[2,1]=3 as before but now we'll let
a[2,3]=a[3,2]=0.5, then a would be:
[,1] [,2] [,3] [,4]
[1,] 4 3.0 0.0 0
[2,] 3 4.0 0.5 0
[3,] 0 0.5 4.0 0
[4,] 0 0.0 0.0 4
The inverse covariance matrix is now:
[,1] [,2] [,3] [,4]
[1,] 0.58333333 -0.44444444 0.05555556 0.00
[2,] -0.44444444 0.59259259 -0.07407407 0.00
[3,] 0.05555556 -0.07407407 0.25925926 0.00
[4,] 0.00000000 0.00000000 0.00000000 0.25
If we let a[1,2] and a[2,3] be nonzero, then the inverse will
create a nonzero [1,3]. Does that happen all the time? I've tried to
write out the algebraic system of linear equations for a and a-inverse
but couldn't come up with anything.
Let me know if I'm not clear on anything. Basically I'd just like
to see what type of covariance matrices will produce an inverse
covariance matrix with some zero elements.
Thanks,
Vivian
More information about the R-help
mailing list