Learn R Programming

ReturnCurves (version 1.0.1)

marggpd: Assessing the Marginal Tail Fits

Description

Assessment of the marginal tail fits for each margin following the marginal transformation procedure margtransf.

Usage

marggpd(margdata, blocksize = 1, nboot = 250, alpha = 0.05)

Value

An object of S4 class marggpd.class. This object returns the arguments of the function and an extra slot marggpd which is a list containing:

model

A list containing the model quantiles for each variable.

empirical

A list containing the empirical quantiles for each variable.

lower

A list containing the lower bounds of the tolerance intervals for each variable.

upper

A list containing the upper bounds of the tolerance intervals for each variable.

Arguments

margdata

An S4 object of class margtransf.class. See margtransf for more details.

blocksize

Size of the blocks for the block bootstrap procedure. If 1 (default), then a standard bootstrap approach is applied.

nboot

Number of bootstrap samples to be taken. Default is 250 samples.

alpha

Significance level to compute the (1-)% tolerance intervals. Default is 0.05.

Details

Let X^GPD_(i) denote the ii-th ordered increasing statistic (i = 1, ..., n) of the exceedances, i.e., X^GPD= (X-u X >u), n_exc denote the sample size of these exceedances, and F_GPD^-1 denote the inverse of the cumulative distribution function of a generalised Pareto distribution (GPD). Function plot shows QQ plots between the model and empirical GPD quantiles for both variables, i.e, for the first variable points (F^-1_GPD(in_exc+1) + u, X^GPD_(i) + u), along with the line y=x.

Uncertainty on the empirical quantiles is obtained via a (block) bootstrap procedure and shown by the grey region on the plot. A good fit is shown by agreement of model and empirical quantiles, i.e. points should lie close to the line y=x. In addition, line y = x should mainly lie within the (1-)% tolerance intervals.

Examples

Run this code
library(ReturnCurves)

data(airdata)

n <- dim(airdata)[1]

margdata <- margtransf(airdata)

# blocksize to account for temporal dependence
marggpd <- marggpd(margdata = margdata, blocksize = 10)

plot(marggpd)

# To see the the S4 object's slots
str(marggpd)

# To access the list of lists
marggpd@marggpd

Run the code above in your browser using DataLab