This function computes the KL divergence between an observed distribution of Zstatistics and the expected distribution, when truncating at a given percentile of the reference normal distribution.
1  compute_KL(Zmat,alpha,pval)

Zmat 
Matrix of Zstatistics outputted from 
alpha 
The inner percentile of the reference normal distribution to compare to, e.g. if 
pval 
If marginal prescreening was performed originally, the Pvalue threshold used for the marginal screening. 
This function is a vbsr internal function that computes the KL divergence for the Zstatistic distribution output by vbsr
if run on a grid of l0_path
, and takes as input the inner quantile to compute the KL statistic with (alpha
), and if there was already marginal prescreening performed to remove the central part of the Zstatistic distribution (pval
).
kl_vec 
This is the observed KL statistic computed along the specified path of 
min_kl 
This is the minimum value of observed KL statistic 
mean_kl 
Random permutations are performed to determine the expected KL statistic given the number of covariates being tested, and the setting of 
se_kl 
The error in the KL statistics from the random permutations. Good for determining the range of KL values that is reasonable given the model fits. 
This function is an internal function, and this functionality is included primarily to include the model fit functions proposed by Logsdon et al. 2012. The regular vbsr
function with post=0.95
, produces very similar results to the KL statistic using a liberal cutoff, and post=0.5
produces very similar results to the more conservative cutoff proposed in Logsdon et. al. 2012, and the post
approaches are much more computationally efficient, since the algorithm is fit based on just a single penalty parameter.
Benjamin A. Logsdon
Logsdon, B.A., C.L. Carty, A.P. Reiner, J.Y. Dai, and C. Kooperberg (2012). A novel variational Bayes multiple locus Zstatistic for genomewide association studies with Bayesian model averaging. Bioinformatics, Vol. 28(13), 17381744
vbsr
1 2 3 4 5 6 7 8 9 10 11 12 13 
Questions? Problems? Suggestions? Tweet to @rdrrHQ or email at ian@mutexlabs.com.
All documentation is copyright its authors; we didn't write any of that.