QQPlot: Generic Quantile-Quantile Plot

Description Usage Arguments Details Value See Also Examples

Description

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

Usage

1
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

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

Example output

Loading required package: gsl
Loading required package: Matrix
Loading required package: mvtnorm
Loading required package: numDeriv
Loading required package: timeSeries
Loading required package: timeDate

Attaching package: 'QRM'

The following object is masked from 'package:base':

    lbeta

QRM documentation built on April 14, 2020, 6:49 p.m.