| rc_unc {ReturnCurves} | R Documentation | 
Uncertainty of the Return Curve estimates
Description
Uncertainty assessment of the return curve estimates following the procedure of Murphy-Barltrop et al. (2023).
Usage
rc_unc(retcurve, blocksize = 1, nboot = 250, nangles = 150, alpha = 0.05)
Arguments
| retcurve | An S4 object of class  | 
| blocksize | Size of the blocks for the block bootstrap procedure. If  | 
| nboot | Number of bootstrap samples to be taken. Default is  | 
| nangles |  Number of angles \(m\) in the interval \((0, \pi/2)\) (Murphy-Barltrop et al. 2023). Default is  | 
| alpha | Significance level to compute the \((1-\alpha)\)% confidence intervals. Default is  | 
Details
Define a set of angles \[\boldsymbol{\Theta}:= \left\lbrace \frac{\pi(m+1-j)}{2(m+1)} \mid 1\leq j\leq m\right\rbrace\] decreasing from near \(\pi/2\) to \(0\), and let \(L_\theta:=\left\lbrace(x,y)\in R^2_+ | \tan(\theta)=y/x\right\rbrace\) denote the line segment intersecting the origin with gradient \(\tan(\theta) > 0.\) For each \(\theta\in \boldsymbol{\Theta},\) \(L_\theta\) intersects the estimated \(\hat{RC}(p)\) exactly once, i.e. \(\lbrace(\hat{x}_\theta, \hat{y}_\theta)\rbrace:= \hat{RC}(p)\cap L_\theta.\) Uncertainty of the return curve is then quantified by the distribution of \(\hat{d}_\theta:=(\hat{x}^2_\theta + \hat{y}^2_\theta)^{1/2}\) via a (block) bootstrap procedure.
This procedure is as follows; for \(k = 1, \ldots, \) nboot:
1. (Block) bootstrap the original data set;
2. For each \(\theta\in \boldsymbol{\Theta},\) obtain \(\hat{d}_{\theta,k}\) for the corresponding return curve point estimate.
Full details can be found in Murphy-Barltrop et al. (2023)
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
Murphy-Barltrop CJR, Wadsworth JL, Eastoe EF (2023). “New estimation methods for extremal bivariate return curves.” Environmetrics, 34(5). ISSN 1099095X, doi: 10.1002/env.2797.
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