Description Usage Arguments Details Value Author(s) See Also Examples
Calculate and plot power (TPR) versus achieved false discovery rate (FDR) using adjusted p-values (padj) and known true positives (labels).
1 2 3 4 5 6 7 8 | powerFDR(object, padj, ...)
## S4 method for signature 'SimResults,missing'
powerFDR(object, threshold=c(0.01, 0.05, 0.1), transformation="1-x", plot=TRUE, ...)
## S4 method for signature 'missing,ANY'
powerFDR(padj, labels, threshold=c(0.01, 0.05, 0.1), transformation="1-x", plot=TRUE, ...)
## S4 method for signature 'SimResultsList,missing'
powerFDR(object, threshold=c(0.01, 0.05, 0.1), transformation="1-x", plot=TRUE, ...)
|
object |
An object of |
padj |
A vector or matrix containing the adjusted p-value. |
labels |
A numeric vector indicating class labels (positives with 1, negatives with 0). For more details, see |
threshold |
Numeric value of the adjusted p-value threshold (cutoff), or vector of multiple thresholds, used to determine the significance of tests. |
transformation |
The transformation of |
plot |
Logical, should power-fdr values be plotted. |
... |
Optional arguments for plotting (see below for more details).
|
The function powerFDR
calculates the true positive rate and false discovery rate given a particular threshold, control FDR. Several thresholds can be assessed simultaneously (e.g., threshold=c(0.01,0.02,0.03,0.04,0.05)
).
Most of the graphical parameters such as col
, cex
, pch
and etc from par
, can be directly passed to plot
for power-fdr values. point.type
, letter indicating how power-fdr values should be plotted: "b" for both points and lines; "p" for points only; and "l" for lines only. col.line
and lwd.line
, col
and lwd
of line connecting power-fdr points, if point.type
is either "b" or "l". lwd.threshold
, lty.threshold
and col.threshold
are lwd
, lty
and col
referred to the lines drawn for 'threshold'.
The FDR is considered to be controlled if the false discovery rate falls below the threshold it is assessed at, and power-fdr points are filled-in. power-fdr points are unfilled, or empty, if the FDR is not controlled and is equal to or greater than the cutoff it is assessed at. Note that the fill-unfill option is only compatible with pch
values of 21 to 25. Visually, this means that for a given threshold, a point (of the same color) will be filled if it falls left of the threshold line, and will be unfilled if it sits to the right of the threshold line.
To increase the flexibility of plots, you can use argument add
. If add=TRUE
, plots are added to current one combining different rocX
curves together into one figure.
legend
is a list including all the arguments from function legend
(see help(legend)). If it is NULL, do not add legends to plots.
If input is an SimResultsList
object, the average performance would be plotted (see example 3).
Invisibly, an S4 object of class powerFDR-class
containing the threshold value(s) assessed, and the associated false discovery rate(s), FDR, and true positive rates, TPR.
Charity Law, Xiaobei Zhou and Mark D. Robinson
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | # example1
data(Pickrell)
re <- SimResults(pval=Pickrell$pval, labels=Pickrell$labels)
p <- powerFDR(re, plot=TRUE)
p <- powerFDR(re, plot=TRUE, legend=NULL)
plot(p, cex=2, pch=c(23,25), col=1:3, main="powerFDR plot",
lwd.line=2, cex.axis=1.5, col.threshold=4, lwd.threshold=2)
# example2
data(calibration)
padj <- calibration$padj
labels <- calibration$labels
powerFDR(padj=padj, labels=labels, xlim=c(0,.3))
# example3
data(PickrellList)
rel <- SimResultsList()
for(i in 1:5)
rel[[i]] <- SimResults(pval=PickrellList[[i]]$pval, labels=PickrellList[[i]]$labels)
powerFDR(rel)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.