Log determinant of sub-covariances

Share:

Description

Function to calculate the log determinant off all sub-covariance matrices of size (k x k) from a covariance matrix.

Usage

1
ldet.eval(covmat, k, all = FALSE)

Arguments

covmat

a covariance matrix (ie. non-negative definite, square and symmetric)

k

dimension of sub-covariance matrices considered

all

if TRUE, returns all combinations with corresponding log |det|

Value

coord.sel

The k coordinates having the largest log|det|

log.det

The log|det| of the submatrix corresponding the coord.sel

all.comb

all combinations and their log|det| if all = TRUE

; NULL otherwise.

Note

Setting all = TRUE may need additionally a large amount of memory and so may not work for a large number of combinations!!