[R] Estimate Covariance Matrix of two vectors
Liaw, Andy
andy_liaw at merck.com
Mon Feb 9 15:00:15 CET 2004
cov(mat1, mat2) will give you the covariances in a p1 by p2 matrix, assuming
mat1 has p1 columns and mat2 has p2 columns.
HTH,
Andy
> From: Claus Gwiggner
>
> Hi,
>
> I have m observations of a vector (p1,...,pp) of random variables and
> another m of a second vector (v1,...,vp) of same length.
> How can I get an estimation of the covariance matrix for all pairs
> of variables (pi,vj) ?
>
> Thanks.
------------------------------------------------------------------------------
Notice: This e-mail message, together with any attachments,...{{dropped}}
More information about the R-help
mailing list