Learn R Programming

extRemes (version 2.1-4)

qqnorm: Normal qq-plot with 95 Percent Simultaneous Confidence Bands

Description

Calculates a normal qq-plot for a vector of data along with 95 percent simultaneous confidence bands.

Usage

qqnorm(y, pch = 20, xlab = "Standard Normal Quantiles", ylab = "Sample Quantiles",
    make.plot = TRUE, ...)

Value

A data frame object is returned invisibly with components:

x,y

the data and standard normal quantiles, resp.

lower,upper

lower and upper 95 percent confidence bands.

Arguments

y

numeric vector of data.

pch

plot symbol to use.

xlab

Character string giving abscissa label.

ylab

Character string giving ordinate axis label.

make.plot

logical, should the plot be created (TRUE) or not (FALSE)?

...

optional arguments to the plot function.

Author

Peter Guttorp, peter “at” stat.washington.edu, modified by Eric Gilleland

Details

Confidence intervals are calculated using +/- k, where

k = 0.895 / (sqrt(n) * (1- 0.01 / sqrt(n) + 0.85/n))

Gives a 95 percent asymptotic band based on the Kolmogorov-Smirnov statistic (Doksum and Sievers, 1976).

References

Doksum, K. A. and G. L. Sievers, 1976. Plotting with confidence: graphical comparisons of two populations. Biometrika, 63 (3), 421--434.

See Also

qnorm, qqplot, shiftplot

Examples

Run this code
z <- rexp(100)
qqnorm( z)

y <- rnorm( 100)
qqnorm( y)
obj <- qqnorm(y, make.plot=FALSE)
str(obj)

data( ftcanmax)
qqnorm( ftcanmax[,"Prec"])

Run the code above in your browser using DataLab