| fdrtool_subset | R Documentation |
This function is largely based on the fdrtool function from the fdrtool package by Korbinian Strimmer (http://strimmerlab.org).
fdrtool takes a vector of z-scores (or of correlations, p-values, or t-statistics), and estimates for each case both the tail area-based Fdr as well as the density-based fdr (=q-value resp. local false discovery rate). The parameters of the null distribution are estimated adaptively from the data (except for the case of p-values where this is not necessary).
Our only modification is adding the possibility to provide a reduced input (e.g. an input of which the excess in p values equal to 1 are removed) for estimating the null distribution while still correcting for the total number of input values.
fdrtool_subset(x, x_red = x, statistic = c("normal", "correlation",
"pvalue"), verbose = TRUE, cutoff.method = c("fndr", "pct0", "locfdr"),
pct0 = 0.75)
x |
A vector of the observed test statistics. |
x_red |
A subset vector of x that will be given to the fdrtool algorithm. |
statistic |
One of "normal" (default), "correlation", "pvalue". This species the null model. |
verbose |
A logical indicating if status messages should be printed out. Defaults to |
cutoff.method |
One of "fndr" (default), "pct0", "locfdr". |
pct0 |
The fraction of data x_red that will be used for fitting null model - only used if cutoff.method="pct0". |
See package fdrtool.
A list with the following components:
x The input vector of the observed test statistics.
x_red The subset of the input vector of the observed test statistics that was given to the fdrtool algorithm.
pval A vector with adjusted p-values for each element of x_red.
pval_full A vector with adjusted p-values for each element of x.
qval A vector with q-values (Fdr) for each element of x_red.
qval_full A vector with q-values (Fdr) for each element of x.
lfdr A vector with local fdr values for each element of x_red.
lfdr_full A vector with local fdr values for each element of x.
statistic The specified type of null model.
param A vector containing the estimated parameters (eta0 (the null proportion of x_red) and the free parameter of the null model).
x0 The cut off value of x_red, indicating the separation between the null model and the mixture model.
f.pval, F.pval, fdr.pval, Fdr.pval, f0, F0, get.pval, fdr, Fdr Functions needed to make diagnostic plots.
Strimmer, K. (2008a). A unified approach to false discovery rate estimation. BMC Bioinformatics 9: 303. Available from http://www.biomedcentral.com/1471-2105/9/303/.
Strimmer, K. (2008b). fdrtool: a versatile R package for estimating local and tail area- based false discovery rates. Bioinformatics 24: 1461-1462. Available from http://bioinformatics.oxfordjournals.org/cgi/content/abstract/24/12/1461.
.......
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.