pCorShrinkData2: Adaptive shrinkage of a partial correlation matrix

Description Usage Arguments Value References

View source: R/pCorShrinkData2.R

Description

This function performs adaptive shrinkage of a matrix of partial correlations using a similar model as CorShrinkMatrix, but with the option of being aided by bagging on the data matrix.

Usage

1
2
3
pCorShrinkData2(data, type = c("no_bag", "bag_cor", "bag_pcor"), nbags = 10,
  nboot = 50, thresh_up = 0.99, thresh_down = -0.99, tol = 1e-06,
  report_model = FALSE, ash.control = list())

Arguments

data

The samples by features data matrix. May contain NA values.

type

The type of bagging method used, if at all, for estimating the partial corelation matrix. The three possible types are - no_bag, bag_cor and bag_pcor - indicating if bagging is at all used, or if is performed at the level of correlations before taking partial correlation matroix on the bagged correlation values, or at the level of partial correlations directly.

nbags

If type not equal to no_bag, how many bootstrap samples are generated to get the bagging estimate.

nboot

The number of bootstrap samples used to compute the bootstrap standard errors of the partial correlations used for shrinking in CorShrink.

thresh_up

Upper threshold for correlations in cormat. Defaults to 0.99

thresh_down

Lower threshold for correlations in cormat. Defaults to -0.99

tol

The tolerance chosen to check how far apart the CorShrink matrix is from the nearest positive definite matrix before applying PD completion.

report_model

if TRUE, outputs the full adaptive shrinkage output, else outputs the shrunken vector. Defaults to FALSE.

ash.control

The control parameters for adaptive shrinkage

Value

If report_model = FALSE, returns the adaptively shrunk partial correlation matrix. If report_model = TRUE, then the function also returns all the details of the adaptive shrinkage model output.

References

False Discovery Rates: A New Deal. Matthew Stephens bioRxiv 038216; doi: http://dx.doi.org/10.1101/038216


CorShrink documentation built on July 13, 2018, 1 a.m.