cov_offdiag_check: Covariance Off Diagonal Check

Description Usage Arguments Details Value See Also Examples

Description

Converts a covariance matrix to a correlation matrix and then identifies variables which should be dropped due to high dependence.

Usage

1
cov_offdiag_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

Intended to be a helper function for flagging highly dependent variables which cause the covariance matrix to be singular or near singular; and hence, non-invertible.

Value

See Also

cov_check

Examples

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

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