Learn R Programming

mev (version 1.11)

rmev: Exact simulations of multivariate extreme value distributions

Description

Implementation of the random number generators for multivariate extreme-value distributions and max-stable processes based on the two algorithms described in Dombry, Engelke and Oesting (2016).

Usage

rmev(n, d, param, asy, sigma, model = c("log", "alog", "neglog", "aneglog",
  "bilog", "negbilog", "hr", "br", "xstud", "smith", "schlather", "ct", "sdir",
  "dirmix"), alg = c("ef", "sm"), weights, vario, loc, grid = FALSE, ...)

Arguments

n

number of observations

d

dimension of sample

param

parameter vector for the logistic, bilogistic, negative bilogistic and extremal Dirichlet (Coles and Tawn) model. Parameter matrix for the Dirichlet mixture. Degree of freedoms for extremal student model. See Details.

asy

list of asymmetry parameters, as in rmvevd, of \(2^d-1\) vectors of size corresponding to the power set of d, with sum to one constraints.

sigma

covariance matrix for Brown-Resnick and extremal Student-t distributions. Symmetric matrix of squared coefficients \(\lambda^2\) for the Husler-Reiss model, with zero diagonal elements.

model

for multivariate extreme value distributions, users can choose between 1-parameter logistic and negative logistic, asymmetric logistic and negative logistic, bilogistic, Husler-Reiss, extremal Dirichlet model (Coles and Tawn) or the Dirichlet mixture. Spatial models include the Brown-Resnick, Smith, Schlather and extremal Student max-stable processes.

alg

algorithm, either simulation via extremal function ('ef') or via the spectral measure ('sm'). Default to ef.

weights

vector of length m for the m mixture components. Must sum to one

vario

variogram function whose first argument must be distance. Used only if provided in conjonction with loc and if sigma is missing

loc

d by k matrix of location, used as input in the variogram vario or as parameter for the Smith model. If grid is TRUE, unique entries should be supplied.

grid

Logical. TRUE if the coordinates are two-dimensional grid points (spatial models).

...

additional arguments for the vario function

Value

an n by d exact sample from the corresponding multivariate extreme value model

Warning

As of version 1.8 (August 16, 2016), there is a distinction between models hr and br. The latter is meant to be used in conjonction with variograms. The parametrization differs between the two models.

The former implementation of mev assumed that the Brown-Resnick process was stationary (NOT intrinsically stationary). To obtain this, one must provide a covariance matrix sigma. Passing a variogram (which must now be parameterized by distance and not location) will give the intrinsically stationary Brown-Resnick process.

The family of scaled Dirichlet is now parametrized by a parameter in \(-\min(\alpha)\) appended to the the d vector param containing the parameter alpha of the Dirichlet model. Arguments model="dir" and model="negdir" are still supported internally, but not listed in the options.

Details

The vector param differs depending on the model

  • log: one dimensional parameter greater than 1

  • alog: \(2^d-d-1\) dimensional parameter for dep. Values are recycled if needed.

  • neglog: one dimensional positive parameter

  • aneglog: \(2^d-d-1\) dimensional parameter for dep. Values are recycled if needed.

  • bilog: d-dimensional vector of parameters in \([0,1]\)

  • negbilog: d-dimensional vector of negative parameters

  • ct, dir, negdir, sdir: d-dimensional vector of positive (a)symmetry parameters. For dir and negdir, a \(d+1\) vector consisting of the d Dirichlet parameters and the last entry is an index of regular variation in \((-\min(\alpha_1, \ldots, \alpha_d), 1]\) treated as shape parameter

  • xstud: one dimensional parameter corresponding to degrees of freedom alpha

  • dirmix: d by m-dimensional matrix of positive (a)symmetry parameters

Stephenson points out that the multivariate asymmetric negative logistic model given in e.g. Coles and Tawn (1991) is not a valid distribution function in dimension \(d>3\). The implementation in mev uses the same construction as the asymmetric logistic distribution (see the vignette). As such it does not match the bivariate implementation of rbvevd.

The dependence parameter of the evd package for the Husler-Reiss distribution can be recovered taking for the Brown--Resnick model \(2/r=\sqrt(2\gamma(h))\) where \(h\) is the lag vector between sites and \(r=1/\lambda\) for the Husler--Reiss.

References

Dombry, Engelke and Oesting (2016). Exact simulation of max-stable processes, Biometrika, 103(2), 303--317.

See Also

rmevspec, rmvevd, rbvevd

Examples

Run this code
# NOT RUN {
set.seed(1)
rmev(n=100, d=3, param=2.5, model="log", alg="ef")
rmev(n=100, d=4, param=c(0.2,0.1,0.9,0.5), model="bilog", alg="sm")
## Spatial example using power variogram
#NEW: Variogram must take distance as argument
vario <- function(x, scale, alpha){ scale*x^alpha }
#grid specification
grid.loc <- as.matrix(expand.grid(runif(4), runif(4)))
rmev(n=100, vario=vario,loc=grid.loc, model="br", scale = 0.5, alpha = 1)
vario2cov <- function(loc, ...){
 sapply(1:nrow(loc), function(i) sapply(1:nrow(loc), function(j)
  vario(sqrt(sum((loc[i,])^2)), ...) +
  vario(sqrt(sum((loc[j,])^2)), ...) -
  vario(sqrt(sum((loc[i,]-loc[j,])^2)), ...)))
}
rmev(n=100, sigma=vario2cov(grid.loc, scale = 0.5, alpha = 1), model="br")
#Example with a grid (generating an array)
rmev(n=10, sigma=cbind(c(2,1),c(1,3)), loc=cbind(runif(4),runif(4)),model="smith", grid=TRUE)
## Example with Dirichlet mixture
alpha.mat <- cbind(c(2,1,1),c(1,2,1),c(1,1,2))
rmev(n=100, param=alpha.mat, weights=rep(1/3,3), model="dirmix")
# }

Run the code above in your browser using DataLab