Skip to content

Commit

Permalink
Fixes a few typos (#124)
Browse files Browse the repository at this point in the history
* Noted typos in the review

* moar typooos

* Small typos everywhere.
  • Loading branch information
lrnv authored Feb 4, 2024
1 parent 12b2a58 commit 372e94a
Show file tree
Hide file tree
Showing 14 changed files with 59 additions and 59 deletions.
2 changes: 1 addition & 1 deletion docs/make.jl
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ makedocs(;
"empirical/available_models.md",
],
"Dependence measures" => "dependence_measures.md",
"Exemples" => [
"Examples" => [
"exemples/fitting_sklar.md",
"exemples/turing.md",
],
Expand Down
2 changes: 1 addition & 1 deletion docs/src/Liouville.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ CurrentModule = Copulas
## Liouville Copulas

!!! note "Not merged yet !"
Liouville copulas are comming in this PR : https://github.com/lrnv/Copulas.jl/pull/83, but this is not merged yet.
Liouville copulas are coming in this PR : https://github.com/lrnv/Copulas.jl/pull/83, but this is not merged yet.

Archimedean copulas have been widely used in the literature due to their nice decomposition properties and easy parametrization. The interested reader can refer to the extensive literature [hofert2010,hofert2013a,mcneil2010,cossette2017,cossette2018,genest2011a,dibernardino2013a,dibernardino2013a,dibernardino2016,cooray2018,spreeuw2014](@cite) on Archimedean copulas, their nesting extensions and most importantly their estimation.

Expand Down
2 changes: 1 addition & 1 deletion docs/src/Vines.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

One more noticeable class of copulas are the Vines copulas. These distributions use a graph of conditional distributions to encode the distribution of the random vector. To define such a model, working with conditional densities, and given any ordered partition $\bm i_1,...\bm i_p$ of $1,...d$, we write
One more noticeable class of copulas are the Vines copulas. These distributions use a graph of conditional distributions to encode the distribution of the random vector. To define such a model, working with conditional densities, and given any ordered partition $\bm i_1,...\bm i_p$ of $1,...d$, we write:
$$f(\bm x) = f(x_{\bm i_1}) \prod\limits_{j=1}^{p-1} f(x_{\bm i_{j+1}} | x_{\bm i_j}).$$

Of course, the choice of the partition, of its order, and of the conditional models is left to the practitioner. The goal when dealing with such dependency graphs is to tailor the graph to reduce the error of approximation, which can be a tricky task. There exists simplifying assumptions that help with this matter, and we refer to ~\cite{durante2017a,nagler2016,nagler2018,czado2013,czado2019,graler2014} for a deep dive into the vine theory, along with some nice results and extensions.
16 changes: 8 additions & 8 deletions docs/src/archimedean/generalities.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ In this package, we implemented it through the [`WilliamsonGenerator`](@ref) cla

`WilliamsonGenerator(X::UnivariateRandomVariable, d)`.

This function computes the Williamson d-transform of the provided random variable $X$ using the [WilliamsonTransforms.jl](https://github.com/lrnv/WilliamsonTransforms.jl) package. See [williamson1955multiply, mcneil2009](@cite) for the literature.
This function computes the Williamson d-transform of the provided random variable $X$ using the [`WilliamsonTransforms.jl`](https://github.com/lrnv/WilliamsonTransforms.jl) package. See [williamson1955multiply, mcneil2009](@cite) for the literature.

!!! warn "`max_monotony` of Williamson generators"
The $d$-transform of a positive random variable is $d$-monotonous but not $k$-monotonous for any $k > d$. Its max monotony is therefore $d$. This has a few implications, one of the biggest one is that the $d$-variate Archimedean copula that corresponds has no density.
Expand All @@ -76,24 +76,24 @@ WilliamsonGenerator
## [Inverse Williamson d-transform](@id w_trans_section)


The Williamson d-transform is a bijective transformation[^1] from the set of positive random variables to the set of generators, and therefore has an inverse transformation (called, suprisingly, the inverse Williamson $d$-transform) that construct the a positive random variable *R* from a generator $\phi$.
The Williamson d-transform is a bijective transformation[^1] from the set of positive random variables to the set of generators. It therefore has an inverse transformation (called, surprisingly, the inverse Williamson $d$-transform) that construct the positive random variable *R* from a generator $\phi$.

[^1]:

This bijection is to be taken carefully: the bijection is between random variables *with unit scales* and generators *with common value at 1*, sicne on both rescaling does not change the underlying copula.
This bijection is to be taken carefuly: the bijection is between random variables *with unit scales* and generators *with common value at 1*, sicne on both rescaling does not change the underlying copula.

This transformation is implemented through one method in the Generator interface that is worth talking a bit about : `williamson_dist(G::Generator, d)`. This function computes the inverse Williamson d-transform of the d-monotone archimedean generator ϕ, still using the [WilliamsonTransforms.jl](https://github.com/lrnv/WilliamsonTransforms.jl) package. See [williamson1955multiply, mcneil2009](@cite)
This transformation is implemented through one method in the Generator interface that is worth talking a bit about : `williamson_dist(G::Generator, d)`. This function computes the inverse Williamson d-transform of the d-monotone archimedean generator ϕ, still using the [`WilliamsonTransforms.jl`](https://github.com/lrnv/WilliamsonTransforms.jl) package. See [williamson1955multiply, mcneil2009](@cite).

To put it in a nutshell, for ``\phi`` a ``d``-monotone archimedean generator, the inverse Williamson-d-transform of ``\\phi`` is the cumulative distribution function ``F`` of a non-negative random variable ``R``, defined by :

```math
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!}
```

The [WilliamsonTransforms.jl](https://github.com/lrnv/WilliamsonTransforms.jl) package implements this transformation (and its inverse, the Williamson d-transfrom) in all generality. It returns this cumulative distribution function in the form of the corresponding random variable `<:Distributions.ContinuousUnivariateDistribution` from `Distributions.jl`. You may then compute :
The [`WilliamsonTransforms.jl`](https://github.com/lrnv/WilliamsonTransforms.jl) package implements this transformation (and its inverse, the Williamson d-transfrom) in all generality. It returns 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)`
* Samples from the distribution via `rand(X,n)`.


## Archimedean copulas
Expand All @@ -104,7 +104,7 @@ Let's first define formally archimedean copulas:
>
>$$C(\bm u) = \phi\left(\sum\limits_{i=1}^d \phi^{-1}(u_i)\right)$$ is a copula.
There are a few archimedean generators that are worth noting since they correspond to known archimedean copulas familiies:
There are a few archimedean generators that are worth noting since they correspond to known archimedean copulas families:
* [`IndependentGenerator`](@ref): $\phi(t) =e^{-t} \text{ generates } \Pi$.
* [`ClaytonGenerator`](@ref): $\phi_{\theta}(t) = \left(1+t\theta\right)^{-\theta^{-1}}$ generates the $\mathrm{Clayton}(\theta)$ copula.
* [`GumbelGenerator`](@ref): $\phi_{\theta}(t) = \exp\{-t^{\theta^{-1}}\}$ generates the $\mathrm{Gumbel}(\theta)$ copula.
Expand All @@ -114,7 +114,7 @@ There are a lot of others implemented in the package, see our [large list of imp

Archimedean copulas have a nice decomposition, called the Radial-simplex decomposition:

> **Property (Radial-simplex decomposition [mcneil2008,mcneil2009](@cite):** A $d$-variate random vector $\bm U$ following an Archimedean copula with generator $\phi$ can be decomposed into
> **Property (Radial-simplex decomposition [mcneil2008,mcneil2009](@cite)):** A $d$-variate random vector $\bm U$ following an Archimedean copula with generator $\phi$ can be decomposed into
>
> $\bm U = \phi.(\bm S R),$
> where $\bm S$ is uniform on the $d$-variate simplex and $R$ is a non-negative random variable, independent form $\bm S$, defined as the inverse Williamson $d$-transform of $\phi$.
Expand Down
20 changes: 10 additions & 10 deletions docs/src/dependence_measures.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Mesures of dependency
# Measures of dependency


Although the copula is an object that summarizes completely the dependence structure of any random vector, it is an infinite dimensional object and the interpretation of its properties can be difficult when the dimension gets high. Therefore, the literature has come up with some quantifications of the dependence structure that might be used as univariate summaries, of course imperfect, of certain properties of the copula at hand.
Although the copula is an object that summarizes completely the dependence structure of any random vector, it is an infinite dimensional object and the interpretation of its properties can be difficult when the dimension gets high. Therefore, the literature has come up with some quantification of the dependence structure that might be used as univariate summaries, of course imperfect, of certain properties of the copula at hand.

## Kendall's Tau

Expand All @@ -12,31 +12,31 @@ Although the copula is an object that summarizes completely the dependence struc
Kendall's tau can be obtained through `τ(C::Copula)`. Its value only depends on the dependence structure and not the marginals.

!!! warn "Multivariate case"
There exists several multivariate extensions of Kendall's tau. The one implemented here is the one we just defined what ever the dimension $d$, be carefull ad the normalisation might differ from other places in the litterature.
There exists several multivariate extensions of Kendall's tau. The one implemented here is the one we just defined what ever the dimension $d$, be careful as the normalization might differ from other places in the literature.



## Spearman's Rho

> **Definition (Sperman's ρ):** For a copula $C$ with a density $c$, the Sperman's ρ is defined as:
> **Definition (Spearman's ρ):** For a copula $C$ with a density $c$, the Spearman's ρ is defined as:
>
> $$\rho = 12 \int C(\bm u) d\bm u -3.$$
Spearman's Rho can be obtained through `ρ(C::Copula)`. Its value only depends on the dependence structure and not the marginals.
Spearman's Rho can be obtained through `ρ(C::Copula)`. Its value only depends on the dependence structure and not the marginals.

!!! warn "Multivariate case"
There exists several multivariate extensions of Spearman's rho. The one implemented here is the one we just defined what ever the dimension $d$, be carefull ad the normalisation might differ from other places in the litterature.
There exists several multivariate extensions of Spearman's rho. The one implemented here is the one we just defined what ever the dimension $d$, be careful as the normalization might differ from other places in the literature.

!!! note "Specific values of tau and rho"
Kendall's $\tau$ and Spearman's $\rho$ have values between -1 and 1, and are -1 in case of complete anticonomotony and 1 in case of comonotony. Moreover, they are 0 in case of independence. This is
why we say that they measure the 'strength' of the dependency.

!!! tip "More-that-bivariate cases"
These two dependence measures make more sense in the bivariate case than in other cases, and therefore we sometimes refer to the Kendall's matrix or the Spearman's matrix for the collection of bivariate coefficients associated to a multivariate copula. Many copula estimators are based on these coefficients, see e.g. [genest2011,fredricks2007,derumigny2017](@cite).
These two dependence measures make more sense in the bivariate case than in other cases, and therefore we sometimes refer to the Kendall's matrix or the Spearman's matrix for the collection of bivariate coefficients associated to a multivariate copula. Many copula estimators are based on these coefficients, see e.g., [genest2011,fredricks2007,derumigny2017](@cite).

## Tail dependency

Many people are interested in the tail beahvior of their dependence structures. Tail coefficients summarize this tail behavior.
Many people are interested in the tail behavior of their dependence structures. Tail coefficients summarize this tail behavior.

>**Definition (Tail dependency):** For a copula $C$, we define (when they exist):
> ```math
Expand All @@ -50,10 +50,10 @@ Many people are interested in the tail beahvior of their dependence structures.
The graph of $u \to \chi(u)$ over $[\frac{1}{2},1]$ is an interesting tool to assess the existence and strength of the tail dependency. The same kind of tools can be constructed for the lower tail.
All these coefficients are useful to quantify the behavior of the dependence structure, both generally and in the extremes, and are therefore widely used in the literature either as verification tools to assess the quality of fits, or even as parameters. Many parametric copulas families have simple surjections, injections, or even bijections between these coefficients and their parametrizations, allowing matching procedures of estimation (a lot like moments matching algorithm for fitting standard random variables).
All these coefficients quantify the behavior of the dependence structure, generally or in the extremes, and are therefore widely used in the literature either as verification tools to assess the quality of fits, or even as parameters. Many parametric copulas families have simple surjections, injections, or even bijections between these coefficients and their parametrization, allowing matching procedures of estimation (a lot like moments matching algorithm for fitting standard random variables).
!!! note "Unfinished work"
Unfortunately these coefficients are not yet well-specified in the package and implemented for all depndence structure, there is wtill work to do.
Unfortunately these coefficients are not yet well-specified in the package and implemented for all dependence structure, there is still work to do.
```@bibliography
Expand Down
6 changes: 3 additions & 3 deletions docs/src/dev_roadmap.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,18 @@ CurrentModule = Copulas

We hope to implement a few more copula models into this package. The next ones to be implemented will probably be:
- Extreme values copulas.
- Nested archimedeans (for any generators, with automatic nesting conditions checking).
- Nested Archimedeans (for any generators, with automatic nesting conditions checks).
- Bernstein copula and more general Beta copula as smoothing of the Empirical copula.
- `CheckerboardCopula` (and more generally `PatchworkCopula`)

More precisely, the following directions could be pursued:

**Next:**
- More documentation and tests for the current implementation.
- Docs: show how to use the `WilliamsonCopula` to implement generic archimedeans.
- Docs: show how to use the `WilliamsonCopula` to implement generic Archimedeans.
- Give the user the choice of fitting method via `fit(dist,data; method="MLE")` or `fit(dist,data; method="itau")` or `fit(dist,data; method="irho")`.
- Fitting a generic archimedean with an empirically produced generator
- Automatic checking of generator d-monotony ? Dunno if it is even possible.
- Automatic checks of generator d-monotony ? Dunno if it is even possible.

**Maybe later:**
- `NestedArchimedean`, with automatic checking of nesting conditions for generators.
Expand Down
2 changes: 1 addition & 1 deletion docs/src/elliptical/generalities.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ which is still a function of only the norm of $\bm t$. To fix ideas, for Gaussia

## Elliptical copulas

Elliptical copulas are simply copulas of elliptical distributions. This simplicity of definition is paid for in the expression of the copulas itself: the obtained function has usually no better expression than
Elliptical copulas are simply copulas of elliptical distributions. This simplicity of definition is paid for in the expression of the copulas itself: the obtained function has usually no better expression than:
```math
C = F \circ (F_1^{-1},...,F_d^{-1}),
```
Expand Down
12 changes: 6 additions & 6 deletions docs/src/empirical/available_models.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,15 @@ EmpiricalCopula

## `BernsteinCopula`

!!! note "Not implemeted yet!"
Do not hesitate to come talk on [our github](https://github.com/lrnv/Copulas.jl) !
!!! note "Not implemented yet!"
Do not hesitate to come talk on [our GitHub](https://github.com/lrnv/Copulas.jl) !

## `CheckerboardCopula`

!!! note "Not implemeted yet!"
Do not hesitate to come talk on [our github](https://github.com/lrnv/Copulas.jl) !
!!! note "Not implemented yet!"
Do not hesitate to come talk on [our GitHub](https://github.com/lrnv/Copulas.jl) !

## `BetaCopula`

!!! note "Not implemeted yet!"
Do not hesitate to come talk on [our github](https://github.com/lrnv/Copulas.jl) !
!!! note "Not implemented yet!"
Do not hesitate to come talk on [our GitHub](https://github.com/lrnv/Copulas.jl) !
Loading

0 comments on commit 372e94a

Please sign in to comment.