pCorShrinkData: Adaptive shrinkage of partial correlations from a data matrix

Description Usage Arguments Value References

View source: R/pCorShrinkData.R

Description

Performs adaptive shrinkage of the sample inverse covariances and consequently partial correlation matrix starting from a data matrix ( no NA permitted unlike CorShrinkData). The procedure of shrinkage combines inverse covariance derivations from the ISEE algorithm of [Fan and Lv, 2016] with the CorShrink formulation.

Usage

1
2
3
pCorShrinkData(dat, permu_type = c("random", "ordered"), reg_type = "lm",
  glmnet_alpha = NULL, glmnet_nfolds = 5, thresh_up = 0.99,
  thresh_down = -0.99, maxiter = 1000, ash.control = list())

Arguments

dat

The samples by features data matrix. Does not permit NA entries in X.

permu_type

Determines if the columns of the data matrix (the features) are permuted randomly before blocking in the ISEE algorithm [see reference] or not.Takes one of two character input values - "random" and "ordered" - depending on if the columns are permuted or not.

reg_type

Either equals lm or glmnet indicating the type of regression used for the ISEE algorithm. If the number of samples is less than the number of features, the reg_type automatically reverts to glmnet.

glmnet_alpha

The alpha parameter ( a value between 0 and 1) as in the argument alpha in glmnet or cv.glmnet function of the glmnet package. When glmnet_alpha=1, it assumes a Lasso (L1) penalty on the regression and for glmnet_alpha=0, it assumes the ridge (L2) penalty. Only applicable when reg_type="glmnet". Defaults to 1.

glmnet_nfolds

The number of folds of cross validation carried out in the cv.glmnet function of the glmnet package as part of the regression model estimation when reg_type="glmnet". Defaults to 5.

thresh_up

Upper threshold for correlations. Defaults to 0.99

thresh_down

Lower threshold for correlations. Defaults to -0.99.

maxiter

The maximum number of iterations run for the adaptive shrinkage EM algorithm. Default is 1000.

ash.control

The control parameters for adaptive shrinkage

Value

Returns an adaptively shrunk version of the inverse covariance matrix and the partial correlation matrix estimate.

References

False Discovery Rates: A New Deal. Matthew Stephens bioRxiv 038216; doi: http://dx.doi.org/10.1101/038216 Fan, Y. and Lv, J., 2016. Innovated scalable efficient estimation in ultra-large Gaussian graphical models. The Annals of Statistics, 44(5), pp.2098-2126.


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