Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

GPDresiduals

GPD residual plot


Description

Residual plot to check GPD fit for peaks over a threshold.

Usage

GPDresiduals(data, t, gamma, sigma, plot = TRUE, 
             main = "GPD residual plot", ...)

Arguments

data

Vector of n observations.

t

The used threshold.

gamma

Estimate for the EVI obtained from GPDmle.

sigma

Estimate for σ obtained from GPDmle.

plot

Logical indicating if the residuals should be plotted, default is FALSE.

main

Title for the plot, default is "GPD residual plot".

...

Additional arguments for the plot function, see plot for more details.

Details

Consider the POT values Y=X-t and the transformed variable

R= 1/γ \log(1+γ/σ Y),

when γ \neq 0 and

R = Y/σ,

otherwise. We can assess the goodness-of-fit of the GPD when modelling POT values Y=X-t by constructing an exponential QQ-plot of the transformed variable R since R is standard exponentially distributed if Y follows the GPD.

See Section 4.2.2 in Albrecher et al. (2017) for more details.

Value

A list with following components:

res.the

Vector of the theoretical quantiles from a standard exponential distribution.

res.emp

Vector of the empirical quantiles of R, see Details.

Author(s)

Tom Reynkens

References

Albrecher, H., Beirlant, J. and Teugels, J. (2017). Reinsurance: Actuarial and Statistical Aspects, Wiley, Chichester.

See Also

Examples

data(soa)

# Look at last 500 observations of SOA data
SOAdata <- sort(soa$size)[length(soa$size)-(0:499)]

# Plot POT-MLE estimates as a function of k
pot <- GPDmle(SOAdata, plot=TRUE)

# Residual plot
k <- 200
GPDresiduals(SOAdata, sort(SOAdata)[length(SOAdata)-k], pot$gamma[k], pot$sigma[k])

ReIns

Functions from "Reinsurance: Actuarial and Statistical Aspects"

v1.0.10
GPL (>= 2)
Authors
Tom Reynkens [aut, cre] (<https://orcid.org/0000-0002-5516-5107>), Roel Verbelen [aut] (R code for Mixed Erlang distribution, <https://orcid.org/0000-0002-2347-9240>), Anastasios Bardoutsos [ctb] (Original R code for cEPD estimator), Dries Cornilly [ctb] (Original R code for EVT estimators for truncated data), Yuri Goegebeur [ctb] (Original S-Plus code for basic EVT estimators), Klaus Herrmann [ctb] (Original R code for GPD estimator)
Initial release
2020-05-16

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.