Description Usage Arguments Details Value References See Also Examples
View source: R/parameter_stability.R
Uses maximum likelihood estimation to fit a Generalized Pareto (GP)
model to threshold excesses over a range of thresholds.
The threshold excesses are treated as independent and identically
distributed (i.i.d.) observations.
The resulting estimates and confidence intervals can be plotted,
using plot.stability
,
to produce a crude graphical diagnostic for threshold choice.
1 2 
data 
A numeric vector of observations. 
u_vec 
A numeric vector of thresholds to be applied to the data.
Any duplicated values will be removed. These could be set at sample
quantiles of 
prof 
A logical scalar. Whether to calculate confidence intervals
for the GP shape parameter ξ based on the profilelikelihood
for ξ or using the MLE plus or minus a multiple of the estimated
standard error (SE) of the MLE. The intervals produced by the former
may be better but they take longer to calculate.
Default: 
conf 
A numeric scalar in (0, 100). Confidence level for the confidence intervals. Default: 95%. 
mult 
A numeric vector of length 2. The range of values over
which the profile loglikelihood for ξ is calculated is
(MLE  
plot_prof 
A logical scalar. Only relevant if 
... 
Further (optional) arguments to be passed to the

For each threshold in u_vec
a GP model is fitted by maximum
likelihood estimation to the threshold excesses, i.e. the amounts
by which the data exceed that threshold. The MLEs of the GP shape
parameter $ξ$ and approximate conf
% confidence intervals
for ξ are stored for plotting (by plot.stability
)
to produce a simple graphical diagnostic to inform threshold selection.
This plot is used to choose a threshold above which the underlying GP
shape parameter may be approximately constant. See Chapter 4 of
Coles (2001). See also the vignette "Introducing threshr".
An object (list) of class "stability" with components:
ests 
MLEs of the GP shape parameter ξ. 
ses 
Estimated SEs of the MLEs of ξ. 
lower 
Lower limit of 100 
upper 
Upper limit of 100 
nexc 
The number of threshold excesses. 
u_vec 
The thresholds supplied by the user. 
u_ps 
The approximate sample quantiles to which the thresholds
in 
data 
The input 
conf 
The input 
Each of these components is a numeric vector of length
length(u_vec)
.
Coles, S. G. (2001) An Introduction to Statistical Modeling of Extreme Values, SpringerVerlag, London. http://dx.doi.org/10.1007/9781447136750_3
ithresh
for threshold selection in the i.i.d. case
based on leaveoneout crossvalidation.
plot.stability
for the S3 plot
method for
objects of class stability
.
1 2 3 4 5 6 7 8 9 10  # Set a vector of thresholds
u_vec_gom < quantile(gom, probs = seq(0, 0.95, by = 0.05))
# Symmetric confidence intervals
gom_stab < stability(data = gom, u_vec = u_vec_gom)
plot(gom_stab)
# Profilelikelihoodbased confidence intervals
gom_stab < stability(data = gom, u_vec = u_vec_gom, prof = TRUE)
plot(gom_stab)

Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.