rc_uncertainty: Uncertainty of the Return Curve estimates

rc_uncR Documentation

Uncertainty of the Return Curve estimates

Description

Uncertainty assessment of the return curve estimates following the procedure of \insertCiteMurphyBarltropetal2023;textualReturnCurves.

Usage

rc_unc(retcurve, blocksize = 1, nboot = 250, nangles = 150, alpha = 0.05)

Arguments

retcurve

An S4 object of class rc_est.class. See rc_est 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.

nangles \loadmathjax

Number of angles \mjeqnmm in the interval \mjeqn(0, \pi/2) \insertCiteMurphyBarltropetal2023ReturnCurves. Default is 150 angles.

alpha

Significance level to compute the \mjeqn(1-\alpha)% confidence intervals. Default is 0.05.

Details

Define a set of angles \mjdeqn\boldsymbol\Theta:= \left\lbrace \frac\pi(m+1-j)2(m+1) \mid 1\leq j\leq m\right\rbrace decreasing from near \mjeqn\pi/2 to \mjeqn00, and let \mjeqnL_\theta:=\left\lbrace(x,y)\in R^2_+ | \tan(\theta)=y/x\right\rbrace denote the line segment intersecting the origin with gradient \mjeqn\tan(\theta) > 0. For each \mjeqn\theta\in \boldsymbol\Theta, \mjeqnL_\theta intersects the estimated \mjeqn\hatRC(p) exactly once, i.e. \mjeqn\lbrace(\hatx_\theta, \haty_\theta)\rbrace:= \hatRC(p)\cap L_\theta. Uncertainty of the return curve is then quantified by the distribution of \mjeqn\hatd_\theta:=(\hatx^2_\theta + \haty^2_\theta)^1/2 via a (block) bootstrap procedure.

This procedure is as follows; for \mjeqnk = 1, ..., nboot:

1. (Block) bootstrap the original data set;

2. For each \mjeqn\theta\in \boldsymbol\Theta, obtain \mjeqn\hatd_\theta,k for the corresponding return curve point estimate.

Full details can be found in \insertCiteMurphyBarltropetal2023;textualReturnCurves

Value

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

median

A vector containing the median estimates of the return curve.

mean

A vector containing the mean estimates of the return curve.

lower

A vector containing the lower bound of the confidence interval.

upper

A vector containing the upper bound of the confidence interval.

The plot function takes an object of S4 class rc_unc.class, and a which argument specifying the type of plot desired (see Examples):

"rc"

Plots the estimated Return Curve and its uncertainty (default).

"median"

Plots the median estimates of the Return Curve and its uncertainty.

"mean"

Plots the mean estimates of the Return Curve and its uncertainty.

"all"

Plots the estimated Return Curve, the median and mean estimates of the Return Curve together, and the associated uncertainty.

References

\insertAllCited

Examples

library(ReturnCurves)

data(airdata)

n <- dim(airdata)[1]

prob <- 10/n

margdata <- margtransf(airdata)

rc_orig <- rc_est(margdata = margdata, p = prob, method = "hill")


# Set nboot = 50 for an illustrative example
# blocksize to account for temporal dependence
unc <- rc_unc(rc_orig, blocksize = 10) 

# Plots the estimated Return Curve 
plot(unc, which = "rc") 

# Plots the median estimates of the Return Curve
plot(unc, which = "median") 

# Plots the mean estimates of the Return Curve
plot(unc, which = "mean") 

# Plots the estimated Return Curve and its the median and mean estimates
plot(unc, which = "all") 

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

# To access the list of vectors
unc@unc



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