plot.p.fdr {FDRestimation} | R Documentation |
FDR plotting
Description
This function creates a plot using a x (p.fdr.object).
Usage
## S3 method for class 'p.fdr'
plot(
x,
raw.pvalues = TRUE,
adj.pvalues = TRUE,
sig.line = TRUE,
adj.sig.line = TRUE,
threshold = NA,
x.axis = "Rank",
xlim = NA,
ylim = c(0, 1),
zvalues = "two.sided",
legend.where = NA,
legend.on = TRUE,
main = NA,
pch.adj.p = 17,
pch.raw.p = 20,
pch.adj.fdr = 20,
col = c("dodgerblue", "firebrick2", "black"),
...
)
Arguments
x |
A p.fdr object that contains the list of output. |
raw.pvalues |
A Boolean TRUE or FALSE value to indicate whether or not to plot the raw p-value points. Defaults to TRUE. |
adj.pvalues |
A Boolean TRUE or FALSE value to indicate whether or not to plot the adjusted p-value points. Defaults to TRUE. |
sig.line |
A Boolean TRUE or FALSE value to indicate whether or not to plot the raw p-value significance line. Defaults to TRUE. |
adj.sig.line |
A Boolean TRUE or FALSE value to indicate whether or not to plot the adjusted significance threshold. Defaults to TRUE. |
threshold |
A numeric value to determine the threshold at which we plot significance. Defaults to value used in the p.fdr.object. |
x.axis |
A string variable to indicate what to plot on the x-axis. Can either be "Rank" or "Zvalues". Defaults to "Rank". |
xlim |
A numeric interval for x-axis limits. |
ylim |
A numeric interval for y-axis limits. Defaults to c(0,1). |
zvalues |
A numeric vector of z-values to be used in pi0 estimation or a string with options "two.sided", "greater" or "less". Defaults to "two.sided". |
legend.where |
A string "bottomright", "bottomleft", "topleft", "topright". Defaults to "topleft" is x.axis="Rank" and "topright" if x.axis="Zvalues". |
legend.on |
A Boolean TRUE or FALSE value to indicate whether or not to print the legend. |
main |
A string variable for the title of the plot. |
pch.adj.p |
A plotting "character’, or symbol to use for the adjusted p-value points. This can either be a single character or an integer code for one of a set of graphics symbols. Defaults to 17. |
pch.raw.p |
A plotting "character’, or symbol to use for the raw p-value points. This can either be a single character or an integer code for one of a set of graphics symbols. Defaults to 20. |
pch.adj.fdr |
A plotting "character’, or symbol to use for the adjusted FDR points. This can either be a single character or an integer code for one of a set of graphics symbols. Defaults to 20. |
col |
A vector of colors for the points and lines in the plot. If the input has 1 value all points and lines will be that same color. If the input has length of 3 then col.adj.fdr will be the first value, col.adj.p will be the second, and col.raw.p is the third. Defaults to c("dodgerblue","firebrick2", "black"). |
... |
Graphical parameters. Any argument that can be passed to image.plot and to base plot, such as axes=FALSE, main='title', ylab='latitude' |
Details
We run into errors or warnings when zvalues or col are inputted incorrectly.
References
Romain Francois (2014). bibtex: bibtex parser. R package version 0.4.0.
R Core Team (2016). R: A Language and Environment for Statistical Computing. R Foundation for Statistical Computing, Vienna, Austria. ISBN 3-900051-07-0, https://www.R-project.org/.
Benjamini Y, Hochberg Y (1995). “Controlling the False Discovery Rate: A Practical and Powerful Approach to Multiple Testing.” Journal of the Royal Statistical Society, 57(1), 289–300.
Benjamini Y, Yekutieli D (2001). “The control of the false discovery rate in multiple testing under dependency.” Annals of statistics, 1165–1188.
Holm S (1979). “A simple sequentially rejective multiple test procedure.” Scandinavian journal of statistics, 65–70.
Hochberg Y (1988). “A sharper Bonferroni procedure for multiple tests of significance.” Biometrika, 75(4), 800–802.
Šidák Z (1967). “Rectangular confidence regions for the means of multivariate normal distributions.” Journal of the American Statistical Association, 62(318), 626–633.
Bonferroni C (1936). “Teoria statistica delle classi e calcolo delle probabilita.” Pubblicazioni del R Istituto Superiore di Scienze Economiche e Commericiali di Firenze, 8, 3–62.
Murray MH, Blume JD (2020). “False Discovery Rate Computation: Illustrations and Modifications.” 2010.04680.
See Also
Examples
# Example 1
sim.data.p = c(runif(80),runif(20, min=0, max=0.01))
fdr.output = p.fdr(pvalues=sim.data.p)
plot(fdr.output)
plot(fdr.output, x.axis="Zvalues")