WilliamsonTransforms
Documentation for WilliamsonTransforms.
WilliamsonTransforms.WilliamsonTransforms
— ModuleWilliamsonTransforms.jl
This rather simple package providing a Julia-native implementation of the Williamson d-transform and of its inverse. See the documentations for the definitions.
Do not hesitate to open an issue and talk if you are interested.
See the following references and the documentation of the package for the definition and motivations of this (rather niche) transformation:
@book{williamson1955multiply,
title={On multiply monotone functions and their laplace transforms},
author={Williamson, Richard Edmund},
year={1955},
publisher={Mathematics Division, Office of Scientific Research, US Air Force}
}
@article{mcneil2009multivariate,
title={Multivariate Archimedean copulas, d-monotone functions and ℓ 1-norm symmetric distributions},
author={McNeil, Alexander J and Ne{\v{s}}lehov{\'a}, Johanna},
year={2009}
}
@article{mcneil2010archimedean,
title={From archimedean to liouville copulas},
author={McNeil, Alexander J and Ne{\v{s}}lehov{\'a}, Johanna},
journal={Journal of Multivariate Analysis},
volume={101},
number={8},
pages={1772--1790},
year={2010},
publisher={Elsevier}
}
@book{durante2015principles,
title={Principles of copula theory},
author={Durante, Fabrizio and Sempi, Carlo},
year={2015},
publisher={CRC press}
}
Citing this work
If you end up using these routines in a scholarly work, please cite this work using the following bibtex:
@article{Laverny2024,
author = {Oskar Laverny and Santiago Jimenez},
title = {Copulas.jl: A fully Distributions.jl-compliant copula package},
journal = {Journal of Open Source Software},
doi = {10.21105/joss.06189},
url = {https://doi.org/10.21105/joss.06189},
year = {2024},
publisher = {The Open Journal},
volume = {9},
number = {94},
pages = {6189}
}
WilliamsonTransforms.𝒲
— Type𝒲(X,d)(x)
Computes the Williamson d-transform of the random variable X, taken at point x.
For a univariate non-negative random variable $X$, with cumulative distribution function $F$ and an integer $d\ge 2$, the Williamson-d-transform of $X$ is the real function supported on $[0,\infty[$ given by:
\[\phi(t) = 𝒲_{d}(X)(t) = \int_{t}^{\infty} \left(1 - \frac{t}{x}\right)^{d-1} dF(x) = \mathbb E\left( (1 - \frac{t}{X})^{d-1}_+\right) \mathbb 1_{t > 0} + \left(1 - F(0)\right)\mathbb 1_{t <0}\]
This function has several properties: - We have that $\phi(0) = 1$ and $\phi(Inf) = 0$ - $\phi$ is $d-2$ times derivable, and the signs of its derivatives alternates : $\forall k \in 0,...,d-2, (-1)^k \phi^{(k)} \ge 0$. - $\phi^{(d-2)}$ is convex.
These properties makes this function what is called an archimedean generator, able to generate archimedean copulas in dimensions up to $d$.
References:
- Williamson, R. E. (1956). Multiply monotone functions and their Laplace transforms. Duke Math. J. 23 189–207. MR0077581
- McNeil, Alexander J., and Johanna Nešlehová. "Multivariate Archimedean copulas, d-monotone functions and ℓ 1-norm symmetric distributions." (2009): 3059-3097.
WilliamsonTransforms.𝒲₋₁
— Type𝒲₋₁(ϕ,d)
Computes the inverse Williamson d-transform of the d-monotone archimedean generator ϕ.
A $d$-monotone archimedean generator is a function $\phi$ on $\mathbb R_+$ that has these three properties:
- $\phi(0) = 1$ and $\phi(Inf) = 0$
- $\phi$ is $d-2$ times derivable, and the signs of its derivatives alternates : $\forall k \in 0,...,d-2, (-1)^k \phi^{(k)} \ge 0$.
- $\phi^{(d-2)}$ is convex.
For such a function $\phi$, the inverse Williamson-d-transform of $\phi$ is the cumulative distribution function $F$ of a non-negative random variable $X$, defined by :
\[F(x) = 𝒲_{d}^{-1}(\phi)(x) = 1 - \frac{(-x)^{d-1} \phi_+^{(d-1)}(x)}{k!} - \sum_{k=0}^{d-2} \frac{(-x)^k \phi^{(k)}(x)}{k!}\]
We return this cumulative distribution function in the form of the corresponding random variable <:Distributions.ContinuousUnivariateDistribution
from Distributions.jl
. You may then compute : - The cdf via Distributions.cdf
- The pdf via Distributions.pdf
and the logpdf via Distributions.logpdf
- Samples from the distribution via rand(X,n)
References: - Williamson, R. E. (1956). Multiply monotone functions and their Laplace transforms. Duke Math. J. 23 189–207. MR0077581 - McNeil, Alexander J., and Johanna Nešlehová. "Multivariate Archimedean copulas, d-monotone functions and ℓ 1-norm symmetric distributions." (2009): 3059-3097.