Learn R Programming

rags2ridges (version 1.1)

sparsify: Determine the support of a partial correlation/precision matrix

Description

Function that determines the support of a partial correlation/precision matrix and sparsifies it accordingly.

Usage

sparsify(P, type = c("threshold", "localFDR"), threshold = 0.25, FDRcut = 0.8)

Arguments

P
(Possibly regularized) precision matrix.
type
A character signifying type of sparsification. Must be one of: "threshold", "localFDR".
threshold
A numeric giving the cut-off for partial correlation element selection based on thresholding.
FDRcut
A numeric giving the cut-off for partial correlation element selection based on local false discovery rates (FDR).

Value

  • A sparsified partial correlation matrix.

Details

The function transforms the possibly regularized input precision matrix to a partial correlation matrix. Subsequently, the support of this partial correlation matrix is determined. Support determination is performed either by simple thresholding on the absolute values of matrix entries (type = "threshold") or by usage of local FDR (type = "localFDR"). The argument threshold is only used when type = "threshold". The argument FDRcut is only used when type = "localFDR". The function is to some extent a wrapper around certain GeneNet and fdrtool functions when type = "localFDR". In that case a mixture model is fitted to the nonredundant partial correlations by fdrtool. The decision to retain elements is then based on the argument FDRcut. Elements with a posterior probability $\geq$ FDRcut (equalling 1 - local FDR) are retained. See Schaefer and Strimmer (2005) for further details on usage of local FDR in graphical modeling.

References

Schaefer, J., and Strimmer, K. (2005). A shrinkage approach to large-scale covariance estimation and implications for functional genomics. Statistical Applications in Genetics and Molecular Biology, 4:32.

See Also

ridgeS, optPenaltyCV, symm

Examples

Run this code
## Obtain some (high-dimensional) data
p = 25
n = 10
set.seed(333)
X = matrix(rnorm(n*p), nrow = n, ncol = p)
colnames(X)[1:25] = letters[1:25]
Cx <- cov(X)

## Obtain regularized precision under optimal penalty
OPT <- optPenaltyCV(X, 15, 30, 20, output = "light")

## Determine support regularized (standardized) precision under optimal penalty
sparsify(symm(OPT$optPrec), type = "localFDR")

Run the code above in your browser using DataLab