Learn R Programming

ReturnCurves (version 1.0.1)

adf_gof: Goodness of fit of the Angular Dependence function estimates

Description

Assessment of the goodness of fit of the angular dependence function estimates () following the procedure of MurphyBarltropetal2024;textualReturnCurves.

Usage

adf_gof(adf, ray, blocksize = 1, nboot = 250, alpha = 0.05)

Value

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

model

A vector containing the model quantiles.

empirical

A vector containing the empirical quantiles.

lower

A vector containing the lower bound of the tolerance interval.

upper

A vector containing the upper bound of the tolerance interval.

Arguments

adf

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

ray

Ray to be considered on the goodness of fit assessment.

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

Define the min-projection variable as t^1_ = t_ - u_ | t_ > u_, then variable ()T^1_ Exp(1) as u_ for all [0,1].

Let F^-1_E denote the inverse of the cumulative distribution function of a standard exponential variable and T^1_(i) denote the ii-th ordered increasing statistic, i = 1, ..., n. Function plot shows a QQ plot between the model and empirical exponential quantiles, i.e. points (F^-1_E(in+1), T^1_(i)), along with the line y=x. Uncertainty 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.

We note that, if the grid for used to estimate the Angular Dependence Function (ADF) does not contain ray, then the closest w in the grid is used to assess the goodness-of-fit of the ADF.

References

Examples

Run this code
library(ReturnCurves)

data(airdata)

n <- dim(airdata)[1]

margdata <- margtransf(airdata)

lambda <- adf_est(margdata = margdata, method = "hill")

# blocksize to account for temporal dependence
gof <- adf_gof(adf = lambda, ray = 0.4, blocksize = 10)

plot(gof)

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

# To access the list of vectors
gof@gof

Run the code above in your browser using DataLab