ccov

Description

Computation of covariance- or correlation-matrix. Shrinkage estimate through the use of 'lambda'. Weights for observations can be passed.

Usage

1
ccov(X,lambda=0, w=NULL, compute_cor=FALSE)	

Arguments

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

Value

Covariance matrix with dimension ncol(X)

Examples

1
2
3
4
5
6
7
8
## Not run: 
# generate random data
rand_data(500,5000)

# compute correlation matrix of t(M)
corM <- ccov(t(M),compute_cor=T)

## End(Not run)