extremalIndex(y, data = NULL, threshold)extremalIndexRangeFit(y, data = NULL, umin = quantile(y,.5),
umax = quantile(y, 0.95), nint = 10, nboot = 100, alpha = .05,
xlab = "Threshold", addNexcesses = TRUE, estGPD=TRUE, verbose = TRUE,
trace = 10, ...)
bootExtremalIndex(x)
declust(y, r=NULL, data = NULL, ...)
## S3 method for class 'extremalIndex':
declust(y, r=NULL,...)
## S3 method for class 'declustered':
plot(x, ylab = "Data",...)
## S3 method for class 'declustered':
gpd(y, ...)
extremalIndex
: either a numeric vector or the name of a variable in data
.y
and any covariates.y
, exceedances above which will be used to estimate the extremal index and carry out automatic declustering.alpha = 0.05
.TRUE
.TRUE
in which case the GPD parameters are estimated.TRUE
.extremalIndex
returns a list of class "extremalIndex":threshold
in original series.threshold
declust
returns a list of type "declustered":TRUE
for threshold exceedances which correspond to cluster maximar
the run length used for declusteringbootExtremalIndex
return a single vector corersponding to a bootstrap sample from the original series: observations are censored at threshold
so that values below this threshold are indicated by the value -1.The method gpd
for class "declustered" returns an object of type "gpd" or "bgpd" depending on the precise function call - see documentation for gpd
.
extremalIndex
estimates the extremal index of a dependent series of observations above a given threshold threshold
, returning an object of class "extremalIndex". Plot, print and show methods are available for this class. A graphical diagnostic akin to Figure 1 in Ferror and Segers (2003) is produced by the plot
method for this class. This plot is used to test the model assumption underpinning the estimation, with good fit being indicated by interexceedance times which correspond to inter-cluster times lying close to the diagonal line indicated.In addition to good model fit, an appropriate choice of threshold is one above which the estimated extremal index is stable over further, higher thresholds (up to estimation uncertainty). This can be assessed by using the function extremalIndexRangeFit
, which examines a range of threshold values. At each threshold, the extremal index is estimated; that estimate is used to decluster the series and the parameters of the GPD are optionally estimated for the resulting declustered series. Uncertainty in the estimation of the extremal index and GPD parameters is assessed by using a bootstrap scheme which accounts for uncertainty in the extremal index estimation, and the corresponding uncertainty in the declustering of the series.
The function declust
returns an object of class "declustered", identifying independent clusters in the original series. Print, plot and show methodsa are available for this class. The GPD model can be fitted to objects of this class, including the use of covariates in the linear predictors for the parameters of the GPD. See examples below.
gpd
par(mfrow=c(2,2));
extremalIndexRangeFit(summer$O3,nboot=10)
ei <- extremalIndex(summer$O3,threshold=45)
plot(ei)
d <- declust(ei)
plot(d)
gpd(d)
## fitting with covariates:
so2 <- extremalIndex(SO2,data=winter,threshold=15)
plot(so2)
so2 <- extremalIndex(SO2,data=winter,threshold=20)
plot(so2) ## fits better
so2.d <- declust(so2)
par(mfrow=c(1,1)); plot(so2.d)
so2.d.gpd <- gpd(so2.d) # AIC 661.1
gpd(so2.d,phi=~NO)
gpd(so2.d,phi=~NO2)
gpd(so2.d,phi=~O3) # better AIC 651.9
gpd(so2.d,phi=~PM10)
so2.d.gpd.o3 <- gpd(so2.d,phi=~O3)
par(mfrow=c(2,2)); plot(so2.d.gpd.o3)
Run the code above in your browser using DataLab