Learn R Programming

texmex (version 1.0)

mex: Conditional multivariate extreme values modelling

Description

Fit the conditional multivariate extreme value model of Heffernan and Tawn

Usage

mex(data, which, mth, mqu, dth, dqu, penalty = "gaussian", maxit = 10000, trace = 0, verbose = FALSE, priorParameters = NULL)
## S3 method for class 'mex':
print(x, ...)
## S3 method for class 'mex':
show(x, ...)
## S3 method for class 'mex':
summary(object, ...)
## S3 method for class 'mex':
plot(x, quantiles = seq(0.1, by = 0.2, len = 5), col = "grey", ...)
## S3 method for class 'mex':
coef(object, ...)
## S3 method for class 'mex':
coefficients(object, ...)
## S3 method for class 'mex':
predict(object, which, pqu=0.99, nsim=1000, trace=10, ...)
## S3 method for class 'predict.mex':
print(x, ...)
## S3 method for class 'predict.mex':
show(x, ...)
## S3 method for class 'predict.mex':
summary(object, mth, probs=c(0.05, 0.5, 0.95), ...)
## S3 method for class 'summary.predict.mex':
print(x, ...)
## S3 method for class 'summary.predict.mex':
show(x, ...)
## S3 method for class 'predict.mex':
plot(x, pch=c(1, 3), col=c(2, 8), cex=c(1, 1), ask=TRUE, ...)

Arguments

data
A numeric matrix or data.frame, the columns of which are to be modelled.
which
The variable on which to condition.
mth
In mex, the threshold above which to fit generalized Pareto distributions. If this is a vector of length 1, the same threshold will be used for each variable. Otherwise, it should be a vector whose length is
mqu
As an alternative to specifying the thresholds via mth, you can specify the quantile above which to fit generalized Pareto distributions. If this is a vector of length 1, the same quantile will be used for each variable
dth
The threshold to use on the transformed scale; that is, the threshold to use when estimating the dependence structure. The same threshold will be used for each variable.
dqu
As an alternative to dth, specify the quantile at which to threshold the transformed data when estimating the dependence parameters.
penalty
How to penalize the likelihood when estimating the marginal generalized Pareto distributions. Defaults to ``gaussian''. See the help file for gpd for more information.
maxit
The maximum number of iterations to be used by the optimizer. defaults to maxit = 1000.
trace
Whether or not to inform the user of the progress of the optimizer. Defaults to 0, indicating no trace.
verbose
Whether or not to keep the user informed of progress. Defaults to verbose = FALSE.
priorParameters
A named list, each element of which contains two components: the first should be a vector of length 2 corresponding to the location of the Gaussian distribution; the second should be 2 by 2 matrix corresponding to the c
quantiles
A vector of quantiles taking values between 0 and 1 specifying the quantiles of the conditional distributions which will be plotted.
col
The color for points on scatterplots of residuals and original data. In plot.predict.mex, the colours of points for observed and simulated data.
x, object
Object of class mex as returned by function mex.
pqu
Argument to predict.mex. The quantile of the conditioning variable over which it will be thresholded. Defaults to pqu = .99.
nsim
Argument to predict.mex. The number of simulated observations to be generated for each set of bootstrap parameter estimates.
probs
In summary.predict.mex the quantiles of the conditional distribution(s) to calculate. Defaults to 5%, 50% and 95%.
pch, cex
Plotting characters, colours and symbol expansion. The observed and simulated data are plotted using different symbols, conrolled by these arguments and col, each of which should be of length 2.
ask
Whether or not to ask before changing the plot. Defaults to ask = TRUE.
...
Further arguments to be passed to methods.

Value

Details

The parameters in the generalized Pareto distribution are estimated for each column of the data in turn, independently of all other columns. Then, the conditional multivariate approach of Heffernan and Tawn is used to model the dependence between variables.

The predict method for mex works as follows. For each set of parameter estimates and normalized conditional Gumbel data, simulated values of the dependent variables are created, given that the conditioning variable is above its 100pqu quantile. The returned object has class 'predict.mex'. The simulated values based on the actual data and point estimates appear in component object$data$simulated. The simulated data from the bootstrap estimates appears in object$replicates. There are print, summary and plot methods available for the class 'predict.mex'. The plot method displays both the original data and the simulated data generated above the threshold for prediction; it shows the threshold for prediction (vertical line) and also the curve joining equal quantiles of the marginal distributions -- this is for reference, since variables that are perfectly dependent will lie exactly on this curve.

References

J. E. Heffernan and J. A. Tawn, A conditional approach for multivariate extreme values, Journal of the Royal Statistical Society B, 66, 497 - 546, 2004

See Also

migpd, mexDependence, bootmex

Examples

Run this code
w <- mex(winter, mqu=.7)
w
par(mfcol=c(4, 2))
plot(w)

Run the code above in your browser using DataLab