Frank function

The Frank Distribution

The Frank Distribution

Density function, distribution function, quantile function, random generation.

dfrank(u, v, alpha, log = FALSE) pfrank(u, v, alpha, lower.tail=TRUE, log.p = FALSE) qfrank(p, alpha, lower.tail=TRUE, log.p = FALSE) rfrank(n, alpha)

Arguments

  • u, v: vector of quantiles.
  • p: vector of probabilities.
  • n: number of observations. If length(n) > 1, the length is taken to be the number required.
  • alpha: shape parameter.
  • log, log.p: logical; if TRUE, probabilities p are given as log(p).
  • lower.tail: logical; if TRUE (default), probabilities are P[Xx]P[X \le x], otherwise, P[X>x]P[X > x].

Details

The Frank is defined by the following distribution function

C(u,v)=1αlog[1(1eαu)(1eαv)1eα],C(u,v)=1/αlog(1(1exp(αu))(1exp(αv))/(1exp(α))), C(u,v) = - \frac{1}{\alpha} \log\left[1-\frac{(1-e^{-\alpha u})(1-e^{-\alpha v}) }{ 1-e^{-\alpha}}\right],C(u,v) = - 1/\alpha *log(1-(1-exp(-\alpha u))*(1-exp(-\alpha v)) /( 1-exp(-\alpha))),

for all u,vu,v in [0,1]. When lower.tail=FALSE, pfrank returns the survival copula P(U>u,V>v)P(U > u, V > v).

Returns

dfrank gives the density, pfrank gives the distribution function, qfrank gives the quantile function, and rfrank generates random deviates.

The length of the result is determined by n for rfrank, and is the maximum of the lengths of the numerical parameters for the other functions.

The numerical parameters other than n are recycled to the length of the result. Only the first elements of the logical parameters are used.

References

Nelsen, R. (2006), An Introduction to Copula, Second Edition, Springer.

Author(s)

Christophe Dutang

Examples

##### # (1) density function u <- v <- seq(0, 1, length=25) cbind(u, v, dfrank(u, v, 1/2)) cbind(u, v, outer(u, v, dfrank, alpha=1/2)) ##### # (2) distribution function cbind(u, v, pfrank(u, v, 1/2)) cbind(u, v, outer(u, v, pfrank, alpha=1/2))
  • Maintainer: Christophe Dutang
  • License: GPL (>= 2)
  • Last published: 2024-10-16

Useful links