plot.p.fdr: FDR plotting

View source: R/plot.p.fdr.R

plot.p.fdrR 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

\insertRef

Rpack:bibtexRdpack

\insertRef

RFDRestimation

\insertRef

bh:1995FDRestimation

\insertRef

by:2001FDRestimation

\insertRef

holm:1979FDRestimation

\insertRef

hoch:1988FDRestimation

\insertRef

sidak:1967FDRestimation

\insertRef

bon:1936FDRestimation

\insertRef

murray2020falseFDRestimation

See Also

summary.p.fdr, p.fdr, get.pi0

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")



FDRestimation documentation built on April 1, 2022, 5:07 p.m.