cov_check: Covariance Check

Description Usage Arguments Details Value See Also Examples

Description

Checks a covariance matrix and identifies variables which should be dropped due to zero variance or high dependence.

Usage

1
cov_check(cov, cut_point = 0.9999)

Arguments

cov

a matrix.

cut_point

threshold which signifies two variables are highly dependent and one should be omitted. Specifically, when a group of variables are highly dependent, only the first variable is kept and all others are dropped. Defaults to 0.9999.

Details

Used to flag variables which will likely cause the covariance matrix to be singular or near singular; and hence, non-invertible.

Value

See Also

cov_diag_check, cov_offdiag_check

Examples

1
2
3
4
cov1 <- matrix(c(1,0,0,0,0,0,0,0,0,0,1,1,0,0,1,1),ncol=4,nrow=4)
cov2 <- diag(c(1,1,1,1))
cov_check(cov1, cut_point = 0.9999)
cov_check(cov2, cut_point = 0.9999)

ChrisDienes/SeaClass documentation built on May 18, 2019, 9:15 p.m.