qq: Quantile Quantile Plot

Description Usage Arguments Details Value Author(s) References See Also Examples

View source: R/default-gen-qq.R

Description

qq is a generic function used to show quantile-quantile plot. The function invokes particular methods which depend on the class of the first argument. So the function makes a quantile quantile plot for univariate POT models.

Usage

1
2
3
4
qq(fitted, ...)

## S3 method for class 'uvpot'
qq(fitted, main, xlab, ylab, ci = TRUE, ...)

Arguments

fitted

A fitted object. When using the POT package, an object of class 'uvpot'. Most often, the return of the fitgpd function.

main

The title of the graphic. If missing, the title is set to "QQ-plot".

xlab,ylab

The labels for the x and y axis. If missing, they are set to "Model" and "Empirical" respectively.

ci

Logical. If TRUE (the default), 95% intervals are plotted.

...

Other arguments to be passed to the plot function.

Details

The quantile quantile plot consists of plotting the observed quantiles in function of the theoretical ones. The theoretical quantiles Q_{Theo, j} are computed from the fitted GPD, that is:

Q_{Theo, j} = F^{-1}(p_j)

where F^{-1} is the fitted quantile function and p_j are empirical probabilities defined by :

p_{j:n} = (j - 0.35) / n

where n is the total number of observations - see Hosking (1995).

If the theoretical model is correct, then points should be “near” the line y=x.

Value

A graphical window.

Author(s)

Mathieu Ribatet

References

Hosking, J. R. M. and Wallis, J. R. (1995). A comparison of unbiased and plotting-position estimators of L moments. Water Resources Research. 31(8): 2019–2025.

See Also

qq, qq.uvpot

Examples

1
2
3
x <- rgpd(75, 1, 2, 0.1)
pwmu <- fitgpd(x, 1, "pwmu")
qq(pwmu)

Example output



POT documentation built on May 2, 2019, 7:30 a.m.