absdpsiMC: Absolute Value of Generator Derivatives via Monte Carlo

absdPsiMCR Documentation

Absolute Value of Generator Derivatives via Monte Carlo


Computes the absolute values of the dth generator derivative psi^{(d)} via Monte Carlo simulation.


absdPsiMC(t, family, theta, degree = 1, n.MC,
          method = c("log", "direct", "pois.direct", "pois"),
          log = FALSE, is.log.t = FALSE)



numeric vector of evaluation points.


Archimedean family (name or object).


parameter value.


order d of the derivative.


Monte Carlo sample size.


different methods:


evaluates the logarithm of the sum involved in the Monte Carlo approximation in a numerically stable way;


directly evaluates the sum;


interprets the sum in terms of the density of a Poisson distribution and evaluates this density directly;


as for method="pois" but evaluates the logarithm of the Poisson density in a numerically stable way.


if TRUE the logarithm of absdPsi is returned.


if TRUE the argument t contains the logarithm of the “mathematical” t, i.e., conceptually, psi(t, *) == psi(log(t), *, is.log.t=TRUE), where the latter may potentially be numerically accurate, e.g., for t = 10^{500}, where as the former would just return psi(Inf, *) = 0.


The absolute value of the dth derivative of the Laplace-Stieltjes transform psi=LS[F] can be approximated via

(-1)^d psi^{(d)}(t) = int_0^Inf x^d exp(-tx) dF(x) ~= (1/N) sum(k=1..N)V_k^d exp(-V_k t), t > 0,

where V_k ~ F, k in {1,...,N}. This approximation is used where d=degree and N=n.MC. Note that this is comparably fast even if t contains many evaluation points, since the random variates V_k ~ F, k in {1,...,N} only have to be generated once, not depending on t.


numeric vector of the same length as t containing the absolute values of the generator derivatives.


Hofert, M., Mächler, M., and McNeil, A. J. (2013). Archimedean Copulas in High Dimensions: Estimators and Numerical Challenges Motivated by Financial Applications. Journal de la Société Française de Statistique 154(1), 25–63.

See Also



t <- c(0:100,Inf)
(ps <- absdPsiMC(t, family="Gumbel", theta=2, degree=10, n.MC=10000, log=TRUE))
## Note: The absolute value of the derivative at 0 should be Inf for
## Gumbel, however, it is always finite for the Monte Carlo approximation
ps2 <- absdPsiMC(log(t), family="Gumbel", theta=2, degree=10,
                 n.MC=10000, log=TRUE, is.log.t = TRUE)
stopifnot(all.equal(ps[-1], ps2[-1], tolerance=1e-14))
## Now is there an advantage of using "is.log.t" ?
sapply(eval(formals(absdPsiMC)$method), function(MM)
       absdPsiMC(780, family="Gumbel", method = MM,
                 theta=2, degree=10, n.MC=10000, log=TRUE, is.log.t = TRUE))
## not really better, yet...

copula documentation built on June 15, 2022, 5:07 p.m.