evd (version 2.1-0)

exi: Estimates of the Extremal Index

Description

Estimates of the extremal index.

Usage

exi(data, u, r = 1, ulow = rep(-Inf, ncol(u)), rlow =
    rep(1, length(r)), dimnames = list(NULL, NULL), drop = TRUE)

Arguments

data
A numeric vector, which may contain missing values.
u
A numeric vector of thresholds, unless time varying thresholds are used, in which case u should be a matrix, typically with length(data) rows (or else the usual recycling rules are applied).
r
A numeric vector of postive integers denoting the clustering interval lengths.
ulow
A numeric vector of lower thresholds with length length(u) (if u is a vector) or ncol(u) (if u is a matrix), unless time varying lower thresholds are used, in which case ulow sho
rlow
A numeric vector of postive integers, of length length(r), denoting the lower clustering interval lengths. The lower clustering interval length is only relevant if it is less than the clustering interval length and if there ex
dimnames
The dimnames of the result.
drop
Logical; return a vector if either u or r has one element/column?

Value

  • A matrix with length(u) (if u is a vector) or ncol(u) (if u is a matrix) rows and length(r) columns, such that the ijth element is the estimate of the extremal index using the threshold u[i] or u[,i], the clustering interval length r[j], the lower threshold ulow[i] or ulow[,i], and the lower clustering interval length rlow[j]. If drop is TRUE (the default), a numeric vector is returned in preference to a matrix with one row/column.

Details

The extremal index is estimated using the inverse of the average cluster size, using the clusters of exceedences derived from clusters. If the threshold is larger than (or equal to) max(data), so that no clusters are derived, then the corresponding estimate is NaN.

See Also

clusters

Examples

Run this code
data(portpirie)
exi(portpirie, 4.2, 3, 3.8)
us <- seq(3.9, 4.2, len = 10)
exi(portpirie, us, 3)
exi(portpirie, us, 1:3)
tvu <- c(rep(4.2, 20), rep(4.1, 25), rep(4.2, 20))
exi(portpirie, as.matrix(tvu), 1:3)

us <- seq(3.9, 4.2, len = 100)
eis <- exi(portpirie, us, 1:3)
matplot(us, eis, type = "l", xlab = "Threshold", ylab = "Ext. Index")

Run the code above in your browser using DataCamp Workspace