Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

rejection_plot

Plot rejections vs. p-value cutoff


Description

Plot the number, or fraction, of null hypotheses rejected as a function of the p-value cutoff. Multiple sets of p-values are accepted, in a list or in the columns of a matrix, in order to permit comparisons.

Usage

rejection_plot(p,
               col, lty = 1, lwd = 1,   
               xlab = "p cutoff", ylab = "number of rejections",
               xlim = c(0, 1), ylim,
               legend = names(p),
               at = c("all", "sample"),
               n_at = 100,
               probability = FALSE,
               ...
               )

Arguments

p

The p-values to be used for plotting. These may be in the columns of a matrix, or in the elements of a list. One curve will be generated for each column/element, and all NA entries will be dropped. If column or element names are supplied, they are used by default for a plot legend.

col

Colors to be used for each curve plotted. Recycled if necessary. If col is omitted, rainbow is used to generate a set of colors.

lty

Line styles to be used for each curve plotted. Recycled if necessary.

lwd

Line widths to be used for each curve plotted. Recycled if necessary.

xlab

X-axis text label.

ylab

Y-axis text label.

xlim

X-axis limits.

ylim

Y-axis limits.

legend

Text for legend. Matrix column names or list element names (see p above) are used by default. If NULL, no legend is plotted.

at

Should step functions be plotted with a step at every value in p, or should linear interpolation be used at a sample of points spanning xlim? The latter looks when there are many p-values.

n_at

When at = "sample" is given, how many sample points should be used for interpolation and plotting?

probability

Should the fraction of null hypotheses rejected be reported instead of the count? See the probability argument to hist.

...

Other arguments to pass to the plot call which sets up the axes. Note that the ... argument will not be passed to the lines calls which actually generate the curves.

Value

A list of the step functions used for plotting is returned invisibly.

Author(s)

Richard Bourgon <bourgon@ebi.ac.uk>

Examples

# See the vignette: Diagnostic plots for independent filtering

genefilter

genefilter: methods for filtering genes from high-throughput experiments

v1.72.1
Artistic-2.0
Authors
R. Gentleman, V. Carey, W. Huber, F. Hahne
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.