QQplot {QRM}R Documentation

Generic Quantile-Quantile Plot

Description

Constructs a quantile-quantile plot against a given reference distribution.

Usage

QQplot(x, a = 0.5, reference = c("normal", "exp", "student"), ...)

Arguments

x

vector, data for QQ-plot.

a

numeric, the offset fraction to be used in ppoints(); typically in (0, 1).

reference

character, name of reference distribution.

...

ellipsis argument, passed down to quantile function of reference distribution.

Details

Special forms like ParetoQQ plots can also be created via this function. E.g., to create a ParetoQQ plot, merely pass log(data) in place of data as the first parameter and use reference = "exp" as the reference distribution. The ParetoQQ plot should provide a linear graph when a log transform of the data is plotted against the exponential distribution.

Value

Produces QQ-plot and returns invisibly a list of (x, y) pairs.

See Also

ppoints

Examples

QQplot(rnorm(1000), reference = "normal") 
QQplot(rexp(1000), reference = "exp", rate = 0.3) 

[Package QRM version 0.4-31 Index]