plotp: Q-Q plot of p-values

View source: R/plotp.R

plotpR Documentation

Q-Q plot of p-values

Description

Produces a Q–Q plot of the p-values supplied\loadmathjax

Usage

plotp(pvals, plotversion = "qqconf", ...)

Arguments

pvals

A vector of \mjseqnp–values

plotversion

Whether to use the qqconf version or the original

...

Other parameters to pass through to qqplot and qqline

Details

After eliminating out of range \mjseqnp–values and missing values produces a Q–Q plot. If the package qqconf is unavailable or plotversion is set other than "qqconf" then the plot uses the function from base graphics. The line shown is through the quantiles (by default the 0.25 and 0.75).

If the package qqconf is available then the plot uses that package's function and as well as the Q–Q plot produces a confidence region. Parameters can be passed to qq_conf_plot to exert further control over the plot.

If plotversion is set to "qqconf" but package qqconf is not available then a warning is given and no plot is produced.

Value

Invisibly returns a list consisting of

validp

The valid \mjseqnp–values

Author(s)

Michael Dewey

See Also

qqplot and qqline for the original plot and qq_conf_plot for the new version.

Examples

data(dat.metap)
cholest <- dat.metap$cholest$p
plotp(cholest)

metap documentation built on Sept. 11, 2024, 6:53 p.m.