ccov | R Documentation |
Computation of covariance- or correlation-matrix. Shrinkage estimate through the use of 'lambda'. Weights for observations can be passed.
ccov(X,lambda=0, w=NULL, compute_cor=FALSE)
X |
matrix |
lambda |
numeric scalar, shrinkage parameter |
w |
numeric vector of weights with same lengths as rows in X |
compute_cor |
boolean - defines whether the functions returns a correlation- rather than a covariance matrix |
Covariance matrix with dimension ncol(X)
# generate random data
rand_data(100,500)
# compute correlation matrix of t(M)
corM <- ccov(t(M),compute_cor=TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.