rArchimaxMevlog: r function for Archimax Mevlog models.

View source: R/satdad_Rfunctions.R

rArchimaxMevlogR Documentation

r function for Archimax Mevlog models.

Description

Random vectors generation for some Archimax Mevlog models.

Usage

rArchimaxMevlog(n, ds, dist = "exp", dist.param = 1)

Arguments

n

The number of observations.

ds

An object of class ds.

dist

The underlying distribution. A character string among "exp" (the default value), "gamma" and "ext".

dist.param

The parameter associated with the choice dist. If dist is "exp", then dist.param is a postive real, the parameter of an exponential distribution. The default value is 1. If dist is "gamma", then dist.param is a vector that concatenates the shape and scale parameters (in this order) of a gamma distribution.

Details

We follow below Algorithm 4.1 of p. 124 in Charpentier et al. (2014). Let \psi defined by \psi(x)=\int_0^\infty \exp(-x t) dF(t), the Laplace transform of a positive random variable with cumulative distribution function F.

Define the random vector (U_1,...,U_d) as U_i=\psi(-\log(Y_i)/V) where

  • Z has a multivariate extreme value distribution with stable tail dependence function \ell ; here Z has standard Frechet margins,

  • (Y_1,...,Y_d)=(\exp(-1/Z_1),...,\exp(-1/Z_d)) the margin transform of Z so that Y is sampled from the extreme value copula associated with \ell,

  • V has the distribution function F,

  • Y and V are independent.

Then, U is sampled from the Archimax copula C(u_1,...,u_d) = \psi(\ell(\psi^{-1}(u_1),...,\psi^{-1}(u_d))).

We restrict here the function \ell to those associated with Mevlog models. See ellMevlog and gen.ds.

We restrict also the distribution of V to

  • exponential ; For a positive \lambda, set dF(t)=\lambda \exp(-\lambda t) 1_{t>0} dt, then \psi(x)=\frac{\lambda}{x+\lambda} and \psi^{-1}(x)=\lambda \frac{1-x}{x}.

  • gamma ; For positive scale \sigma and shape a, set dF(t)= \frac{1}{\sigma^a \Gamma(a)}t^{a-1}\exp(-t/\sigma)1_{t>0}, then \psi(x)=\frac{1}{(x+\sigma)^a} and \psi^{-1}(x)=\frac{x^{-1/a}-1}{\sigma}.

Value

returns a n x d matrix containing n realizations of a d-variate Archimax Mevlog random vector.

Author(s)

Cécile Mercadier (mercadier@math.univ-lyon1.fr)

References

Charpentier, A., Fougères, A.-L., Genest, C. and Nešlehová, J.G. (2014) Multivariate Archimax copulas. Journal of Multivariate Analysis, 126, 118–136.

See Also

rMevlog, copArchimaxMevlog, psiArchimaxMevlog, psiinvArchimaxMevlog, gen.ds

Examples


## Fix a  5-dimensional asymmetric tail dependence structure
(ds5 <- gen.ds(d = 5))

## Generate a 1000-sample of Archimax Mevlog random vectors
## associated with ds5 and underlying distribution gamma
(shape5 <- runif(1, 0.01, 5))
(scale5 <- runif(1, 0.01, 5))
sample5.gamma <- rArchimaxMevlog(n = 1000, ds = ds5, dist = "gamma", dist.param = c(shape5, scale5))

## Compare theoretical (left) and empirical (right) tail dependographs
oldpar <- par(mfrow = c(1,2))
graphs(ds = ds5)
graphsEmp(sample = sample5.gamma, k = 100)
par(oldpar)

## Generate a 1000-sample of Archimax Mevlog random vectors
## associated with ds5 and underlying distribution exp
(lambda <- runif(1, 0.01, 5))
sample5.exp <- rArchimaxMevlog(n = 1000, ds = ds5, dist = "exp", dist.param = lambda)
## Compare theoretical (left) and empirical (right) tail dependographs
graphs(ds = ds5)
graphsEmp(sample = sample5.exp, k = 100)


satdad documentation built on March 31, 2023, 11:34 p.m.