qqn: Quantile-Normal Plot with Limits

Description Usage Arguments Value Note Author(s) References

View source: R/qqn.R

Description

A function used to calculate a normal QQ plot with confidence bands representing a 95 of values. This function extends the graphing capabilities of base R and implicitly creates a plot that may be added to.

Usage

1
2
qqn(x, ylab = deparse(substitute(x)), lty1 = 1, lty2 = 1,
  swap = FALSE, conf = TRUE, ...)

Arguments

x

A numeric vector of data for which to create the QQ plot.

ylab

A string indicating the label for the y-axis of the plot. Defaults to the variable name of the argument x.

lty1

The line type for the reference line. See par for more information. Defaults to 1.

lty2

The line types for the confidence intervals. See par for more information. Defaults to 1.

swap

A boolean value indicating whether to swap the x and y axes. If set to TRUE, the quantiles of standard normal will be placed on the Y axis. Defaults to FALSE.

conf

A boolean value indicating whether to produce the confidence bands. Defaults to TRUE.

...

Other arguments passed to qqnorm.

Value

An invisible list with the following components:

z

The normal quantiles.

x

The input data.

slope

The slope of the plot.

zz

The z values sorted in ascending order.

P

Probability points. See ppoints for more information.

SE

The delta-method standard error for the confidence interval.

. Additionally the function will always plot the normal QQ plot.

Note

All documentation and code taken from Brian Junker and Howard Seltman.

Author(s)

Brian Junker, brian AT stat.cmu.edu

References

Code taken from Howard Seltman's (hseltman AT cmu.edu) personal website. http://www.stat.cmu.edu/~hseltman/AboutMe.html. Code may be found at http://www.stat.cmu.edu/~hseltman/files/qqn.R.

To read more about the delta method of bound calculations, please see https://genome.sph.umich.edu/wiki/Code_Sample:_Generating_QQ_Plots_in_R


frank113/cmu202 documentation built on July 17, 2020, 9:31 p.m.