qqunif: Plot Quantile-Quantile Plot of p-values against uniform...

View source: R/qqplot.R

qqunifR Documentation

Plot Quantile-Quantile Plot of p-values against uniform distribution.

Description

Plot Quantile-Quantile Plot of p-values against uniform distribution.

Usage

qqunif(
  x,
  outfn = NULL,
  conf.int = 0.95,
  plot.width = 5,
  plot.height = 5,
  thin = TRUE,
  thin.n = 500,
  zero.pval = "replace"
)

Arguments

x

a numeric vector of p-values. All values should be between 0 and 1.

outfn

a character. File name to save the QQ Plot. If outfn is supplied (i.e. !is.null(outfn)), then the plot is not drawn in the graphics window.

conf.int

a numeric between 0 and 1. Confidence band to draw around reference line. Set to NA to leave it out.

plot.width

a numeric. Plot width in inches.

plot.height

a numeric. Plot height in inches.

thin

a logical. Reduce number of data points when they are cluttered?

thin.n

an integer. Number of max points per horizontal partitions of the plot. Defaults to 500.

zero.pval

a character. Determine how to treat 0 pvals. "replace" will replace the p-value of zero with the non-zero minimum. "remove" will remove the p-value of zero.

Value

a ggplot object

Examples

x <- rbeta(1000, 1, 1)
qqunif(x)

leejs-abv/ggmanh documentation built on Sept. 19, 2024, 10:13 p.m.