marggpd: Assessing the Marginal Tail Fits

View source: R/marggpd.R

marggpdR Documentation

Assessing the Marginal Tail Fits

Description

\loadmathjax

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)

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 \mjeqn(1-\alpha)% tolerance intervals. Default is 0.05.

Details

Let \mjeqnX^GPD_(i) denote the \mjeqnii-th ordered increasing statistic \mjeqn(i = 1, ..., n) of the exceedances, i.e., \mjeqnX^GPD= (X-u \mid X >u), \mjeqnn_exc denote the sample size of these exceedances, and \mjeqnF_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 \mjeqn\left(F^-1_GPD\left(\fracin_exc+1\right) + u, X^GPD_(i) + u\right), along with the line \mjeqny=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 \mjeqny=x. In addition, line \mjeqny = x should mainly lie within the \mjeqn(1-\alpha)% tolerance intervals.

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.

Examples

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


ReturnCurves documentation built on April 4, 2025, 5:36 a.m.