Description Usage Arguments Details Value See Also Examples
For each study, the function discretizes two sided P-values into bins and estimates the probabilities in each bin for the null and non-null states.
The function can plot diagnostic plots (disabled by default) for model fit. These should be monitored for misfit of model to data, before using function output in repfdr. See description of diagnostic plots below.
1 2 3 4 5 6  | 
pval.mat | 
 Matrix of two sided P-Values of the features (in rows) in each study (columns).  | 
n.bins | 
 Number of bins in the discretization of the z-score axis (the number of bins is   | 
type | 
 Type of fitting used for f; 0 is a natural spline, 1 is a polynomial, in either case with degrees of freedom   | 
df | 
 Degrees of freedom for fitting the estimated density f(z).  | 
central.prop | 
 Central proportion of the z-scores used like the area of zero-assumption to estimate pi0.  | 
pi0 | 
 Sets argument for estimation of proportion of null hypotheses. Default value is NULL (automatic estimation of pi0) for every study. Second option is to supply vector of values between 0 and 1 (with length of the number of studies/ columns of   | 
plot.diagnostics | 
 If set to  A second plot is the Normal Q-Q plot of Zscores, converted using  Misfit in these two plots should be investigated by the user, before using output in  Default value is   | 
trim.z | 
  If set to   | 
trim.z.upper | 
 Upper bound for trimming Z scores. Default value is 8  | 
trim.z.lower | 
 Lower bound for trimming Z scores. Default value is -8  | 
force.bin.number | 
 Set to   | 
pi.plugin.lambda | 
 The function makes use of the plugin estimator for the estimation of the proportion of null hypotheses. The plugin  estimator is    | 
This utility function outputs the first two arguments to be input in the main function repfdr.
A list with:
pdf.binned.z | 
 A 3-dimensional array which contains for each study (first dimension), the probabilities of a z-score to fall in the bin (second dimension), under each hypothesis status (third dimension). The third dimension can be of size 2 or 3, depending on the number of association states: if the association can be either null or only in one direction, the dimension is 2; if the association can be either null, or positive, or negative, the dimension is 3.  | 
binned.z.mat | 
 A matrix of the bin numbers for each the z-scores (rows) in each study (columns).  | 
breaks.matrix | 
 A matrix with   | 
df | 
 Number of degrees of freedom, used for spline fitting of density.  | 
proportions | 
 Matrix with   | 
PlotWarnings | 
 Vector of size   | 
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18  | # we generate a dataset with p=10000 pvalues for two studies,
# p1=300 of which are non null:
set.seed(1)
p = 10000
p1 = 300
z1 = (rnorm(p))
z2 = (rnorm(p))
temp = rnorm(p1, 3.5,0.5)
z1[1:p1] = temp + rnorm(p1,0,0.2)
z2[1:p1] = temp + rnorm(p1,0,0.2)
zmat.example = cbind(z1,z2)
pmat.example = 1-(pnorm(abs(zmat.example)) - pnorm(-1*abs(zmat.example)))
twosided.pval.res = twosided.PValues.tobins(pmat.example,
                                            plot.diagnostics = TRUE)
twosided.pval.res$proportions
 | 
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.