Re: [R] Calculation of Covariance Matrix Calculation

2010-07-19 Thread Dennis Murphy
Hi: > a <- matrix(1:8, 2, 4) > cov(a)# using cov() from stats package [,1] [,2] [,3] [,4] [1,] 0.5 0.5 0.5 0.5 [2,] 0.5 0.5 0.5 0.5 [3,] 0.5 0.5 0.5 0.5 [4,] 0.5 0.5 0.5 0.5 After using package sos to discover that ccov() is a function in package robust (which was con

[R] Calculation of Covariance Matrix Calculation

2010-07-19 Thread Wendy Han
Hi, Excuse me for asking this silly question. But I really couldn't understand why cov() and ccov() don't work for my calculation of covariance matrix. a <- matrix(1:8, 2, 4) a [,1] [,2] [,3] [,4] [1,]1357 [2,]2468 > ccov(a) Error in solve.default(cov, ...) :