rExtDep | R Documentation |
This function generates random samples of iid observations from extremal dependence models and semi-parametric stochastic generators.
rExtDep(n, model, par, angular=FALSE, mar=c(1,1,1), num, threshold, exceed.type)
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 |
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)
.
A matrix with n rows and p>=2 columns. p=2 when model="semi.bvevd"
or "semi.bvexceed"
.
Simone Padoan, simone.padoan@unibocconi.it, https://faculty.unibocconi.it/simonepadoan/; Boris Beranger, borisberanger@gmail.com https://www.borisberanger.com;
Marcon, G., Naveau, P. and Padoan, S.A. (2017) A semi-parametric stochastic generator for bivariate extreme events Stat, 6, 184-201.
dExtDep
, pExtDep
, fExtDep
, fExtDep.np
if(interactive()){ # 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) par <- ExtremalDep:::rcoef(k=6, pm=list(p0=0.05, p1=0.1)) data <- rExtDep(n=10, model="semi.bvevd", par=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=par$beta, threshold=c(0.2, 0.4), exceed.type="and") }
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.