rExtDep {ExtremalDep} | R Documentation |
Parametric and semi-parametric random generator of extreme events
Description
This function generates random samples of iid observations from extremal dependence models and semi-parametric stochastic generators.
Usage
rExtDep(n, model, par, angular=FALSE, mar=c(1,1,1), num, threshold,
exceed.type)
Arguments
n |
An integer indictaing the number of observations. |
model |
A character string with the name of the model. Parametric model include |
par |
A vector representing the parameters of the (parametric or non-parametric) model. |
angular |
A logical value; |
mar |
A vector or matrix of marginal parameters. |
num |
An integer indicating the number of observations the componentwise maxima is computed over. Required when |
threshold |
A bivariate vector indicating the level of exceedances. Required when |
exceed.type |
A character string taking value "and" or "or" indicating the type of exceednaces. Required when |
Details
There is no limit of the dimensionality when model="HR"
, "ET"
or "EST"
while model="semi.bvevd"
and "semi.bvexceed"
can only generate bivariate observations.
When angular=TRUE
and model="semi.bvevd"
or "semi.bvexceed"
the simulation of pseudo-angles follows Algorithm 1 of Marcon et al. (2017).
When model="semi.bvevd"
and angular=FALSE
, maxima samples are generated according to Algorithm 2 of Marcon et al. (2017).
When model="semi.bvexceed"
and angular=FALSE
, exceedance samples are generated above value specified by threshold
, according to Algorithm 3 of Marcon et al. (2017). exceed.type="and"
generates samples that exceed both thresholds while exceed.type="or"
generates samples exceeding at least one threshold.
When the argument mar
is a vector, the marginal distrutions are identical. When a matrix is provided each row corresponds to a set of marginal parameters. No marginal transformation is applied when mar=c(1,1,1)
.
Value
A matrix with n
rows and p>=2
columns. p=2
when model="semi.bvevd"
or "semi.bvexceed"
.
Author(s)
Simone Padoan, simone.padoan@unibocconi.it, https://faculty.unibocconi.it/simonepadoan/; Boris Beranger, borisberanger@gmail.com https://www.borisberanger.com;
References
Marcon, G., Naveau, P. and Padoan, S.A. (2017) A semi-parametric stochastic generator for bivariate extreme events Stat, 6, 184-201.
See Also
dExtDep
, pExtDep
, fExtDep
, fExtDep.np
Examples
# Example using the trivariate Husler-Reiss
set.seed(1)
data <- rExtDep(n=10, model="HR", par=c(2,3,3))
# Example using the semi-parammetric generator of maxima
set.seed(2)
beta <- c(1.0000000, 0.8714286, 0.7671560, 0.7569398,
0.7771908, 0.8031573, 0.8857143, 1.0000000)
data <- rExtDep(n=10, model="semi.bvevd", par=beta,
mar=rbind(c(0.2, 1.5, 0.6),c(-0.5, 0.4, 0.9)))
# Example using the semi-parammetric generator of maxima
set.seed(3)
data <- rExtDep(n=10, model="semi.bvexceed", par=beta,
threshold=c(0.2, 0.4), exceed.type="and")