rc_gof {ReturnCurves} | R Documentation |
Goodness of fit of the Return Curve estimates
Description
Assessment of the goodness-of-fit of the return curve estimates following the approach of Murphy-Barltrop et al. (2023).
Usage
rc_gof(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
Given a return curve RC(\(p\)), the probability of lying in a survival region is \(p\). Let \[\boldsymbol{\Theta}:= \left\lbrace \frac{\pi(m+1-j)}{2(m+1)} \mid 1\leq j\leq m\right\rbrace\] be a set of angles decreasing from near \(\pi/2\) to \(0\). For each angle \(\theta_j\in \boldsymbol{\Theta,}\) and corresponding point in the estimated return curve \(\lbrace (\hat{x}_{\theta_j}, \hat{y}_{\theta_j}) \rbrace\), the empirical probability \(\hat{p}_j\) of lying in the survival region is given by the proportion of points in the region \((\hat{x}_{\theta_j}, \infty) \times (\hat{y}_{\theta_j}, \infty)\).
Thus, for each angle \(\theta_j\in \boldsymbol{\Theta,}\) a (block) bootstrap procedure to the original data set is applied, and
the empirical probabilities \(\hat{p}_j\) estimated. Then, the median and \((1-\alpha)\)% pointwise confidence intervals are obtained for each \(\theta_j\).
Function plot
shows the median of \(\hat{p}_j\), the confidence intervals and the true probability \(p\); ideally, this value should be contained in the confidence region.
We note that due to the use of empirical probabilities, the value of \(p\) should be within the range of the data and not too extreme.
Value
An object of S4 class rc_gof.class
. This object returns the arguments of the function and an extra slot gof
which is a list containing:
median |
A vector containing the median of the empirical probability of lying in a survival region. |
lower |
A vector containing the lower bound of the confidence interval. |
upper |
A vector containing the upper bound of the confidence interval. |
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")
# blocksize to account for temporal dependence
gof <- rc_gof(retcurve = rc_orig, blocksize = 10)
plot(gof)
# To see the the S4 object's slots
str(gof)
# To access the list of vectors
gof@gof