Description Usage Arguments Value References Examples
View source: R/CorShrinkMatrix.R
This function performs adaptive shrinkage of a matrix of pairwise correlations using a mixture normal prior on Fisher zscores, with each component centered at the same base level zscore value (0 for 0 base correlation) but a wide range of datadriven component variances. The method is similar to the adaptive shrinkage method for modeling false discovery rates proposed in Stephens 2016 (see reference).
1 2 3 4 5 
cormat 
A matrix of pairwise correlations  not necessarily a correlation matrix. NAs in this matrix are treated as 0. 
nsamp 
An integer or a matrix denoting the number of samples for
each pair of variables over which the correlation has been computed.
Only used when 
zscore_sd 
A matrix of the sandard error of the Fisher zscores for each pair of
variables. May contain NAs as well. The NAs in this matrix must
match with the NAs in the 
thresh_up 
Upper threshold for correlations in 
thresh_down 
Lower threshold for correlations in 
image 
character. options for plotting the original or the corshrink matrix.
If 
tol 
The tolerance chosen to check how far apart the CorShrink matrix is from the nearest positive definite matrix before applying PD completion. 
image.control 
Control parameters for the image when

report_model 
if TRUE, outputs the full adaptive shrinkage output, else outputs the shrunken vector. Defaults to FALSE. 
maxiter 
The maximum number of iterations run for the adaptive shrinkage EM algorithm. Default is 1000. 
ash.control 
The control parameters for adaptive shrinkage 
If report_model = FALSE
, returns a list with adaptively shrunk version
of the sample correlation matrix both before (ash_cor_only
) and after
PD completion (ash_cor_PD
). If report_model = TRUE
, then the
function also returns all the details of the adaptive shrinkage model output.
False Discovery Rates: A New Deal. Matthew Stephens bioRxiv 038216; doi: http://dx.doi.org/10.1101/038216
1 2 3  data("pairwise_corr_matrix")
data("common_samples")
out < CorShrinkMatrix(pairwise_corr_matrix, common_samples)

Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.