Description Usage Arguments Details Value See Also Examples
Compute the empirical estimator of the extremal index using the runs method (Smith & Weissman, 1994, JRSSB).
1 2 3 4 |
ts |
a vector, the time series for which to estimate the threshold-based extremal index θ(x,m), with x a probability level and m a run-length (see details). |
lapl |
logical; is |
nlag |
the run-length; an integer larger or equal to 1. |
u.mar |
marginal threshold (probability); used when transforming the time series to Laplace scale if |
probs |
vector of probabilities; the values of x for which to evaluate θ(x,m). |
method.mar |
a character string defining the method used to estimate the marginal GPD; either |
block.length |
integer; the block length used for the block-bootstrapped confidence intervals. |
R.boot |
integer; the number of samples used for the block bootstrap. |
levels |
vector of probabilites; the quantiles of the posterior distribution of the extremal index θ(x,m) to output. |
Consider a stationary time series (X_t). A characterisation of the extremal index is
θ(x,m) = Pr(X_1≤ x,…,X_m≤ x | X_0≥ x).
In the limit when x and m tend to ∞ appropriately, θ corresponds to the asymptotic inverse mean cluster size. It also links the generalised extreme value distribution of the independent series (Y_t), with the same marginal distribution as (X_t),
G_Y(z)=G_X^θ(z),
with G_X and G_Y the extreme value distributions of (X_t) and (Y_t) respectively.
nlag
corresponds to the run-length m and probs
is a set of values for x.
The runs estimator is computed, which consists of counting the proportion of clusters to the number of exceedances of a threshold x; two exceedances of the threshold belong to different clusters if there are at least m+1 non-exceedances inbetween.
An object of class 'depmeasure
' containing:
theta |
matrix; estimates of the extremal index θ(x,m) with rows corresponding to the |
nbr.exc |
numeric vector; number of exceedances for each threshold corresponding to the elements in |
probs |
|
levels |
numeric vector; |
nlag |
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | ## generate data from an AR(1)
## with Gaussian marginal distribution
n <- 10000
dep <- 0.5
ar <- numeric(n)
ar[1] <- rnorm(1)
for(i in 2:n)
ar[i] <- rnorm(1, mean=dep*ar[i-1], sd=1-dep^2)
## transform to Laplace scale
ar <- qlapl(pnorm(ar))
## compute empirical estimate
theta <- thetaruns(ts=ar, u.mar=.95, probs=c(.95,.98,.99))
## output
plot(theta, ylim=c(.2,1))
abline(h=1, lty="dotted")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.