From 4ae6f366b6dee0f4170dcb23baf2e4c85df334a5 Mon Sep 17 00:00:00 2001 From: Oskar Laverny Date: Tue, 13 Feb 2024 14:55:54 +0100 Subject: [PATCH 1/6] [Paper] Fixing a few issues (#153) --- joss/paper.md | 37 ++++++++++++++++++------------------- 1 file changed, 18 insertions(+), 19 deletions(-) diff --git a/joss/paper.md b/joss/paper.md index 46d82698..44fba07b 100644 --- a/joss/paper.md +++ b/joss/paper.md @@ -33,11 +33,11 @@ Copulas are functions that describe dependence structures of random vectors, wit Copulas are standard tools in probability and statistics, with a wide range of applications from biostatistics, finance or medicine, to fuzzy logic, global sensitivity and broader analysis. A few standard theoretical references on the matter are [@joe1997], [@nelsen2006], [@joe2014], and [@durantePrinciplesCopulaTheory2015]. -The Julia package `Copulas.jl` brings most standard copula-related features into native Julia: random number generation, density and distribution function evaluations, fitting, construction of multivariate models through Sklar's theorem, and many more related functionalities. Copulas being fundamentally distributions of random vectors, we fully comply with the [`Distributions.jl`](https://github.com/JuliaStats/Distributions.jl) API [@djl1; @djl2], the Julian standard for implementation of random variables and random vectors. This compliance allows interoperability with other packages based on this API such as, e.g., [`Turing.jl`](https://github.com/TuringLang/Turing.jl) [@turing] and several others. +The Julia package `Copulas.jl` brings most standard copula-related features into native Julia: random number generation, density and distribution function evaluations, fitting, construction of multivariate models through Sklar's theorem, and many more related functionalities. Since copulas can combine arbitrary univariate distributions to form distributions of multivariate random vectors, we fully comply with the [`Distributions.jl`](https://github.com/JuliaStats/Distributions.jl) API [@djl1; @djl2], the Julian standard for implementation of random variables and random vectors. This compliance allows interoperability with other packages based on this API such as, e.g., [`Turing.jl`](https://github.com/TuringLang/Turing.jl) [@turing] and several others. # Statement of need -The R package `copula` [@r_copula_citation1; @r_copula_citation2; @r_copula_citation3; @r_copula_citation4] is the gold standard when it comes to sampling, estimating, or simply working around dependence structures. However, in other languages, the available tools are not as developed and/or not as recognized. We bridge the gap in the Julian ecosystem with this Julia-native implementation. Due to the very flexible type system in Julia, our code expressiveness and tidiness will increase its usability and maintainability in the long-run. Type-stability allows sampling in arbitrary precision without requiring more code, and Julia's multiple dispatch yields most of the below-described applications. +The R package `copula` [@r_copula_citation1; @r_copula_citation2; @r_copula_citation3; @r_copula_citation4] is the gold standard when it comes to sampling, estimating, or simply working around dependence structures. However, in other languages, the available tools are not as developed and/or not as recognized. We bridge the gap in the Julian ecosystem with this Julia-native implementation. Due to the very flexible type system in Julia, our code's expressiveness and tidiness will increase its usability and maintainability in the long-run. Type-stability allows sampling in arbitrary precision without requiring more code, and Julia's multiple dispatch yields most of the below-described applications. There are competing packages in Julia, such as [`BivariateCopulas.jl`](https://github.com/AnderGray/BivariateCopulas.jl) [@BivariateCopulas] which only deals with a few models in bivariate settings but has very nice graphs, or [`DatagenCopulaBased.jl`](https://github.com/iitis/DatagenCopulaBased.jl) [@DatagenCopulaBased_1; @DatagenCopulaBased_2; @DatagenCopulaBased_3; @DatagenCopulaBased_4], which only provides sampling and does not have exactly the same models as `Copulas.jl`. While not fully covering out both of these package's functionality (mostly because the three projects chose different implementation paths), `Copulas.jl` brings, as a key feature, the compliance with the broader ecosystem. The following table provides a feature comparison between the three: @@ -53,13 +53,13 @@ There are competing packages in Julia, such as [`BivariateCopulas.jl`](https://g | - Obscure Bivariate | Yes | No | No | | - Archimedean Chains | No | Yes | No | -Since our primary target is maintainability and readability of the implementation, we did not consider the efficiency and the performance of the code yet. However, a (limited in scope) benchmark on Clayton's pdf shows competitive behavior of our implementation w.r.t `DatagenCopulaBased.jl` (but not `BivariateCopulas.jl`). To perform this test we use the [`BenchmarkTools.jl`](https://github.com/JuliaCI/BenchmarkTools.jl) [@BenchmarkTools] package and generate 10^6 samples for Clayton copulas of dimensions 2, 5, 10 with parameter 0.8. The execution times (in seconds) are given below: +Since our primary target is maintainability and readability of the implementation, we have not considered the efficiency and the performance of the code yet. However, a (limited in scope) benchmark on Clayton's `pdf` shows competitive behavior of our implementation w.r.t `DatagenCopulaBased.jl` (but not `BivariateCopulas.jl`). To perform this test we use the [`BenchmarkTools.jl`](https://github.com/JuliaCI/BenchmarkTools.jl) [@BenchmarkTools] package and generate 10^6 samples for Clayton copulas of dimensions 2, 5, 10 with parameter 0.8. The execution times (in seconds) are given below: -| | 2 | 5 | 10 | -|-----------------------------|-----------|-----------|-----------| -| Copulas.Clayton | 1.1495578 | 1.3448951 | 1.8044065 | -| BivariateCopulas.Clayton | 0.1331608 | X | X | -| DatagenCopulaBased.Clayton | 1.9868345 | 2.4276321 | 2.8009263 | +| | 2 | 5 | 10 | +|------------------------------|-----------|-----------|-----------| +| `Copulas.Clayton` | 1.1495578 | 1.3448951 | 1.8044065 | +| `BivariateCopulas.Clayton` | 0.1331608 | X | X | +| `DatagenCopulaBased.Clayton` | 1.9868345 | 2.4276321 | 2.8009263 | Code for these benchmarks in available in the repository. @@ -75,16 +75,15 @@ using Copulas, Distributions, Random # Define the marginals and the copula, then use Sklar's theorem: X₁ = Gamma(2,3) X₂ = Pareto(0.5) -X₃ = Binomial(10,0.8) +X₃ = Normal(10,0.8) C = ClaytonCopula(3,0.7) -X = SklarDist(C,(X₁,X₂,X₃)) +D = SklarDist(C,(X₁,X₂,X₃)) -# Sample from the model: +# Sample as follows: x = rand(D,1000) # You may estimate the model as follows: -D̂ = fit(SklarDist{FrankCopula,Tuple{Gamma,Normal,Binomial}}, x) -# Although you'll probbaly get a bad fit ! +D̂ = fit(SklarDist{ClaytonCopula,Tuple{Gamma,Pareto, Normal}}, x) ``` The API does not fix the fitting procedure, and only loosely specifies it, thus the implemented default might vary on the copula. If you want more control, you may turn to Bayesian estimation using `Turing.jl`: @@ -103,26 +102,26 @@ using Turing X₂ = Pareto(γ) X₃ = Binomial(10,η) C = ClaytonCopula(3,δ) - X = SklarDist(C,(X₁,X₂,X₃)) + D = SklarDist(C,(X₁,X₂,X₃)) - # Add the loglikelyhood to the model : + # Add the loglikelihood to the model : Turing.Turing.@addlogprob! loglikelihood(D, dataset) end ``` ## The Archimedean interface -Archimedean copulas are a huge family of copulas that has seen a lot of theoretical work. Among others, you may take a look at [@mcneilMultivariateArchimedeanCopulas2009b]. We use [`WilliamsonTransforms.jl`](https://github.com/lrnv/WilliamsonTransforms.jl/)'s implementation of the Williamson $d$-transfrom to sample from any archimedean copula, including for example the `ClaytonCopula` with negative dependence parameter in any dimension, which is a first to our knowledge. +Archimedean copulas form a large class of copulas that has seen a lot of theoretical work. Among others, you may take a look at [@mcneilMultivariateArchimedeanCopulas2009b]. We use [`WilliamsonTransforms.jl`](https://github.com/lrnv/WilliamsonTransforms.jl/)'s implementation of the Williamson $d$-transfrom to sample from any archimedean copula, including for example the `ClaytonCopula` with negative dependence parameter in any dimension, which is a first to our knowledge. To construct an archimedean copula, you first need to reference its generator through the following API: ```julia -struct MyGenerator{T} <: Generator +struct MyGenerator{T} <: Copulas.Generator θ::T end ϕ(G::MyGenerator,t) = exp(-G.θ * t) # can you recognise this one ? -max_monotony(G::MyGenerator) = Inf -C = ArchimedeanCopula(d,MyGenerator()) +Copulas.max_monotony(G::MyGenerator) = Inf +C = ArchimedeanCopula(4,MyGenerator(1.3)) # 4-dimensional copula ``` The obtained model automatically gets all copula functionalities (pdf, cdf, sampling, dependence measures, etc...). We nevertheless have specific implementation for a (large) list of known generators, and you may implement some other methods if you know closed form formulas for more performance. The use of the (inverse) Williamson d-transform allows the technical boundaries of our Archimedean implementation to *match* the necessary and sufficient conditions for a generator to produce a genuine Archimedean copula. From 9fd6733be3791d37e3e7d31ed764df4eab0c7484 Mon Sep 17 00:00:00 2001 From: Oskar Laverny Date: Tue, 13 Feb 2024 15:12:50 +0100 Subject: [PATCH 2/6] [Docs] Proof-reading (#154) * Move from exemples to examples * Anticonomotony -> anticomonotony * Typo * one more typo * Fix first example --- README.md | 3 +-- docs/make.jl | 6 +++--- docs/src/dependence_measures.md | 2 +- docs/src/{exemples => examples}/fitting_sklar.md | 0 docs/src/{exemples => examples}/other_usecases.md | 0 docs/src/{exemples => examples}/turing.md | 0 docs/src/{exemples => examples}/turing_plot.png | Bin docs/src/getting_started.md | 8 +++----- src/ArchimedeanCopula.jl | 10 +++++----- .../UnivariateGenerator/InvGaussianGenerator.jl | 2 +- src/Generator/WilliamsonGenerator.jl | 4 ++-- src/MiscellaneousCopulas/EmpiricalCopula.jl | 2 +- src/SklarDist.jl | 8 +++----- 13 files changed, 20 insertions(+), 25 deletions(-) rename docs/src/{exemples => examples}/fitting_sklar.md (100%) rename docs/src/{exemples => examples}/other_usecases.md (100%) rename docs/src/{exemples => examples}/turing.md (100%) rename docs/src/{exemples => examples}/turing_plot.png (100%) diff --git a/README.md b/README.md index 17f2ba75..b9381e5f 100644 --- a/README.md +++ b/README.md @@ -56,8 +56,7 @@ D = SklarDist(C,(X₁,X₂,X₃)) # The final distribution simu = rand(D,1000) # Generate a dataset # You may estimate a copula using the `fit` function: -D̂ = fit(SklarDist{FrankCopula,Tuple{Gamma,Normal,LogNormal}}, simu) -# Increase the number of observations to get a beter fit (or not?) +D̂ = fit(SklarDist{ClaytonCopula,Tuple{Gamma,Normal,LogNormal}}, simu) ``` The list of availiable copula models is *very* large, check it out on our [documentation](https://lrnv.github.io/Copulas.jl/stable) ! diff --git a/docs/make.jl b/docs/make.jl index e10ec98e..344f0fea 100644 --- a/docs/make.jl +++ b/docs/make.jl @@ -42,9 +42,9 @@ makedocs(; ], "Dependence measures" => "dependence_measures.md", "Examples" => [ - "exemples/fitting_sklar.md", - "exemples/turing.md", - "exemples/other_usecases.md" + "examples/fitting_sklar.md", + "examples/turing.md", + "examples/other_usecases.md" ], "Dev Roadmap" => "dev_roadmap.md", diff --git a/docs/src/dependence_measures.md b/docs/src/dependence_measures.md index c9647c48..5a15946a 100644 --- a/docs/src/dependence_measures.md +++ b/docs/src/dependence_measures.md @@ -33,7 +33,7 @@ Spearman's Rho can be obtained through `ρ(C::Copula)`. Its value only depends o 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 + Kendall's $\tau$ and Spearman's $\rho$ have values between -1 and 1, and are -1 in case of complete anticomonotony 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" diff --git a/docs/src/exemples/fitting_sklar.md b/docs/src/examples/fitting_sklar.md similarity index 100% rename from docs/src/exemples/fitting_sklar.md rename to docs/src/examples/fitting_sklar.md diff --git a/docs/src/exemples/other_usecases.md b/docs/src/examples/other_usecases.md similarity index 100% rename from docs/src/exemples/other_usecases.md rename to docs/src/examples/other_usecases.md diff --git a/docs/src/exemples/turing.md b/docs/src/examples/turing.md similarity index 100% rename from docs/src/exemples/turing.md rename to docs/src/examples/turing.md diff --git a/docs/src/exemples/turing_plot.png b/docs/src/examples/turing_plot.png similarity index 100% rename from docs/src/exemples/turing_plot.png rename to docs/src/examples/turing_plot.png diff --git a/docs/src/getting_started.md b/docs/src/getting_started.md index f0e5d038..2139d9d4 100644 --- a/docs/src/getting_started.md +++ b/docs/src/getting_started.md @@ -110,12 +110,10 @@ X₃ = LogNormal(0,1) C = ClaytonCopula(3,0.7) # A 3-variate Clayton Copula with θ = 0.7 D = SklarDist(C,(X₁,X₂,X₃)) # The final distribution -# This generates a (3,1000)-sized dataset from the multivariate distribution D -simu = rand(D,1000) +simu = rand(D,1000) # Generate a dataset -# While the following estimates the parameters of the model from a dataset: -D̂ = fit(SklarDist{FrankCopula,Tuple{Gamma,Normal,LogNormal}}, simu) -# Increase the number of observations to get a beter fit (or not?) +# You may estimate a copula using the `fit` function: +D̂ = fit(SklarDist{ClaytonCopula,Tuple{Gamma,Normal,LogNormal}}, simu) ``` !!! info "About fitting methods" diff --git a/src/ArchimedeanCopula.jl b/src/ArchimedeanCopula.jl index 9d6f8952..e0532620 100644 --- a/src/ArchimedeanCopula.jl +++ b/src/ArchimedeanCopula.jl @@ -8,13 +8,13 @@ Constructor: ArchimedeanCopula(d::Int,G::Generator) -For some Archimedean [`Generator`](@ref) `G::Generator` and some dimenson `d`, this class models the archimedean copula wich has this generator. The constructor checks for validity by ensuring that `max_monotony(G) ≥ d`. The ``d``-variate archimedean copula with generator ``\\phi`` writes: +For some Archimedean [`Generator`](@ref) `G::Generator` and some dimenson `d`, this class models the archimedean copula which has this generator. The constructor checks for validity by ensuring that `max_monotony(G) ≥ d`. The ``d``-variate archimedean copula with generator ``\\phi`` writes: ```math C(\\mathbf u) = \\phi^{-1}\\left(\\sum_{i=1}^d \\phi(u_i)\\right) ``` -The default sampling method is the Radial-simplex decomposition using the williamson transformation of ``\\phi``. +The default sampling method is the Radial-simplex decomposition using the Williamson transformation of ``\\phi``. There exists several known parametric generators that are implement in the package. For every `NamedGenerator <: Generator` implemented in the package, we provide a type alias ``NamedCopula{d,...} = ArchimedeanCopula{d,NamedGenerator{...}}` to be able to manipulate the classic archimedean copulas without too much hassle for known and usefull special cases. @@ -35,7 +35,7 @@ pdf(C,spl) # pdf loglikelihood(C,spl) # llh ``` -Bonus: If you know the williamson d-transform of your generator and not your generator itself, you may take a look at [`WilliamsonGenerator`](@ref) that implements them. If you rather know the frailty distribution, take a look at `WilliamsonFromFrailty`. +Bonus: If you know the Williamson d-transform of your generator and not your generator itself, you may take a look at [`WilliamsonGenerator`](@ref) that implements them. If you rather know the frailty distribution, take a look at `WilliamsonFromFrailty`. References: * [williamson1955multiply](@cite) Williamson, R. E. (1956). Multiply monotone functions and their Laplace transforms. Duke Math. J. 23 189–207. MR0077581 @@ -94,7 +94,7 @@ end # end function Distributions._rand!(rng::Distributions.AbstractRNG, C::CT, x::AbstractVector{T}) where {T<:Real, CT<:ArchimedeanCopula} - # By default, we use the williamson sampling. + # By default, we use the Williamson sampling. Random.randexp!(rng,x) r = rand(rng,williamson_dist(C)) sx = sum(x) @@ -104,7 +104,7 @@ function Distributions._rand!(rng::Distributions.AbstractRNG, C::CT, x::Abstract return x end function Distributions._rand!(rng::Distributions.AbstractRNG, C::CT, A::DenseMatrix{T}) where {T<:Real, CT<:ArchimedeanCopula} - # More efficient version that precomputes the williamson transform on each call to sample in batches: + # More efficient version that precomputes the Williamson transform on each call to sample in batches: Random.randexp!(rng,A) n = size(A,2) r = rand(rng,williamson_dist(C),n) diff --git a/src/Generator/UnivariateGenerator/InvGaussianGenerator.jl b/src/Generator/UnivariateGenerator/InvGaussianGenerator.jl index 5ae2206d..cd4f13b8 100644 --- a/src/Generator/UnivariateGenerator/InvGaussianGenerator.jl +++ b/src/Generator/UnivariateGenerator/InvGaussianGenerator.jl @@ -12,7 +12,7 @@ Constructor The Inverse Gaussian copula in dimension ``d`` is parameterized by ``\\theta \\in [0,\\infty)``. It is an Archimedean copula with generator : ```math -\\phi(t) = \\exp{\\frac{(1-\\sqrt{1+2θ^{2}t}}{θ}}. +\\phi(t) = \\exp{\\frac{1-\\sqrt{1+2θ^{2}t}}{θ}}. ``` More details about Inverse Gaussian Archimedean copula are found in : diff --git a/src/Generator/WilliamsonGenerator.jl b/src/Generator/WilliamsonGenerator.jl index 6b2feb59..178579b8 100644 --- a/src/Generator/WilliamsonGenerator.jl +++ b/src/Generator/WilliamsonGenerator.jl @@ -3,7 +3,7 @@ i𝒲{TX} Fields: -* `X::TX` -- a random variable that represents its williamson d-transform +* `X::TX` -- a random variable that represents its Williamson d-transform * `d::Int` -- the dimension of the transformation. Constructor @@ -11,7 +11,7 @@ Constructor WilliamsonGenerator(X::Distributions.UnivariateDistribution, d) i𝒲(X::Distributions.UnivariateDistribution,d) -The `WilliamsonGenerator` (alias `i𝒲`) allows to construct a d-monotonous archimedean generator from a positive random variable `X::Distributions.UnivariateDistribution`. The transformation, wich is called the inverse williamson transformation, is implemented in [WilliamsonTransforms.jl](https://www.github.com/lrnv/WilliamsonTransforms.jl). +The `WilliamsonGenerator` (alias `i𝒲`) allows to construct a d-monotonous archimedean generator from a positive random variable `X::Distributions.UnivariateDistribution`. The transformation, which is called the inverse Williamson transformation, is implemented in [WilliamsonTransforms.jl](https://www.github.com/lrnv/WilliamsonTransforms.jl). 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: diff --git a/src/MiscellaneousCopulas/EmpiricalCopula.jl b/src/MiscellaneousCopulas/EmpiricalCopula.jl index e91b6917..3830d27e 100644 --- a/src/MiscellaneousCopulas/EmpiricalCopula.jl +++ b/src/MiscellaneousCopulas/EmpiricalCopula.jl @@ -8,7 +8,7 @@ Constructor EmpiricalCopula(u;pseudos=true) -The EmpiricalCopula in dimension ``d`` is parameterized by a pseudo-data matrix wich should have shape (d,N). Its expression is given as : +The EmpiricalCopula in dimension ``d`` is parameterized by a pseudo-data matrix which should have shape (d,N). Its expression is given as : ```math C(\\mathbf x) = \\frac{1}{N}\\sum_{i=1}^n \\mathbf 1_{\\mathbf u_i \\le \\mathbf x} diff --git a/src/SklarDist.jl b/src/SklarDist.jl index 76f5b565..36c70647 100644 --- a/src/SklarDist.jl +++ b/src/SklarDist.jl @@ -27,12 +27,10 @@ X₃ = LogNormal(0,1) C = ClaytonCopula(3,0.7) # A 3-variate Clayton Copula with θ = 0.7 D = SklarDist(C,(X₁,X₂,X₃)) # The final distribution -# This generates a (3,1000)-sized dataset from the multivariate distribution D -simu = rand(D,1000) +simu = rand(D,1000) # Generate a dataset -# While the following estimates the parameters of the model from a dataset: -D̂ = fit(SklarDist{FrankCopula,Tuple{Gamma,Normal,LogNormal}}, simu) -# Increase the number of observations to get a beter fit (or not?) +# You may estimate a copula using the `fit` function: +D̂ = fit(SklarDist{ClaytonCopula,Tuple{Gamma,Normal,LogNormal}}, simu) ``` References: From f3a6aa757ebb3bccfd7c625ad614e6a314a47b03 Mon Sep 17 00:00:00 2001 From: Oskar Laverny Date: Tue, 13 Feb 2024 15:20:49 +0100 Subject: [PATCH 3/6] Correct fitting for DatagenCopulaBased (#155) --- README.md | 2 +- joss/paper.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index b9381e5f..168a3332 100644 --- a/README.md +++ b/README.md @@ -71,7 +71,7 @@ There are competing packages in Julia, such as [`BivariateCopulas.jl`](https://g | | `Copulas.jl` | `DatagenCopulaBased.jl` | `BivariateCopulas.jl` | |----------------|--------------|-------------------------|-----------------------| | `Distributions.jl`'s API | ✔️ | ❌ | ✔️ | -| Fitting | ✔️ | ✔️ | ❌ | +| Fitting | ✔️ | ❌ | ❌ | | Plotting | ❌ | ❌ | ✔️ | | Available copulas | | | | | - Classic Bivariate | ✔️ | ✔️ | ✔️ | diff --git a/joss/paper.md b/joss/paper.md index 44fba07b..6dd598e8 100644 --- a/joss/paper.md +++ b/joss/paper.md @@ -44,7 +44,7 @@ There are competing packages in Julia, such as [`BivariateCopulas.jl`](https://g | | `Copulas.jl` | `DatagenCopulaBased.jl` | `BivariateCopulas.jl` | |--------------------------|--------------|-------------------------|-----------------------| | `Distributions.jl`'s API | Yes | No | Yes | -| Fitting | Yes | Yes | No | +| Fitting | Yes | No | No | | Plotting | No | No | Yes | | Available copulas | | | | | - Classic Bivariate | Yes | Yes | Yes | From 3ecdae08898811eebb4a12d76812825717e45826 Mon Sep 17 00:00:00 2001 From: Oskar Laverny Date: Wed, 14 Feb 2024 16:48:22 +0100 Subject: [PATCH 4/6] [Docs] Add examples. (#156) * Remove pull request conputation of the docs. * Add archimedeans examples * Add eliptical examples * refactor fitting example * add examples in the getting_started page * typo * add examples to the sklar page * add dependencies to the docs environnement * add examples to the GaussianCopula docstring * add example to the TCopula docstring * typo * add example to the EllipticalCopula docstring * typo * typos --- .github/workflows/CI.yml | 3 + docs/Manifest.toml | 942 +++++++++++++++++++-- docs/Project.toml | 3 + docs/src/archimedean/generalities.md | 86 +- docs/src/elliptical/generalities.md | 74 +- docs/src/examples/fitting_sklar.md | 10 +- docs/src/getting_started.md | 59 +- docs/src/index.md | 2 +- docs/src/miscellaneous.md | 2 +- docs/src/sklar.md | 16 +- src/EllipticalCopula.jl | 12 +- src/EllipticalCopulas/GaussianCopula.jl | 15 +- src/EllipticalCopulas/TCopula.jl | 16 +- src/Generator.jl | 2 +- src/MiscellaneousCopulas/SurvivalCopula.jl | 3 - 15 files changed, 1116 insertions(+), 129 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 8c95d47f..a4473b0e 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -41,6 +41,9 @@ jobs: docs: name: Documentation runs-on: ubuntu-latest + if: >- + !contains(github.event.head_commit.message, '[skip docs]') + && github.event_name != 'pull_request' steps: - uses: actions/checkout@v4 - uses: julia-actions/setup-julia@v1 diff --git a/docs/Manifest.toml b/docs/Manifest.toml index 32c640a7..628b5821 100644 --- a/docs/Manifest.toml +++ b/docs/Manifest.toml @@ -1,8 +1,8 @@ # This file is machine-generated - editing it directly is not advised -julia_version = "1.9.3" +julia_version = "1.10.0" manifest_format = "2.0" -project_hash = "b8383b73a83199fa32de626ae6cfd3c80b867cb1" +project_hash = "ab0d1e9747a499a467f203cc4e7c184d6495c3d5" [[deps.ANSIColoredPrinters]] git-tree-sha1 = "574baf8110975760d391c710b6341da1afa48d8c" @@ -14,6 +14,25 @@ git-tree-sha1 = "faa260e4cb5aba097a73fab382dd4b5819d8ec8c" uuid = "1520ce14-60c1-5f80-bbc7-55ef81b5835c" version = "0.4.4" +[[deps.Accessors]] +deps = ["CompositionsBase", "ConstructionBase", "Dates", "InverseFunctions", "LinearAlgebra", "MacroTools", "Test"] +git-tree-sha1 = "cb96992f1bec110ad211b7e410e57ddf7944c16f" +uuid = "7d9f7c33-5ae7-4f3b-8dc6-eff91059b697" +version = "0.1.35" + + [deps.Accessors.extensions] + AccessorsAxisKeysExt = "AxisKeys" + AccessorsIntervalSetsExt = "IntervalSets" + AccessorsStaticArraysExt = "StaticArrays" + AccessorsStructArraysExt = "StructArrays" + + [deps.Accessors.weakdeps] + AxisKeys = "94b1ba4f-4ee9-5380-92f1-94cde586c3c5" + IntervalSets = "8197267c-284f-5f27-9208-e0e47529a953" + Requires = "ae029012-a4dd-5104-9daa-d747884805df" + StaticArrays = "90137ffa-7385-5640-81b9-e52037218182" + StructArrays = "09ab397b-f2b6-538f-b94a-2f83cf4a842a" + [[deps.ArgTools]] uuid = "0dad84c5-d112-42e6-8d28-ef12dabb789f" version = "1.1.1" @@ -41,6 +60,23 @@ git-tree-sha1 = "520c679daed011ce835d9efa7778863aad6687ed" uuid = "f1be7e48-bf82-45af-a471-ae754a193061" version = "0.2.20" +[[deps.BitFlags]] +git-tree-sha1 = "2dc09997850d68179b69dafb58ae806167a32b1b" +uuid = "d1d4a3ce-64b1-5f1a-9ba4-7e7e69966f35" +version = "0.1.8" + +[[deps.Bzip2_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] +git-tree-sha1 = "9e2a6b69137e6969bab0152632dcb3bc108c8bdd" +uuid = "6e34b625-4abd-537c-b88f-471c36dfa7a0" +version = "1.0.8+1" + +[[deps.Cairo_jll]] +deps = ["Artifacts", "Bzip2_jll", "CompilerSupportLibraries_jll", "Fontconfig_jll", "FreeType2_jll", "Glib_jll", "JLLWrappers", "LZO_jll", "Libdl", "Pixman_jll", "Pkg", "Xorg_libXext_jll", "Xorg_libXrender_jll", "Zlib_jll", "libpng_jll"] +git-tree-sha1 = "4b859a208b2397a7a623a03449e4636bdb17bcf2" +uuid = "83423d85-b0ee-5818-9007-b63ccbeb887a" +version = "1.16.1+1" + [[deps.Calculus]] deps = ["LinearAlgebra"] git-tree-sha1 = "f641eb0a4f00c343bbc32346e1217b86f3ce9dad" @@ -49,14 +85,48 @@ version = "0.5.1" [[deps.ChainRulesCore]] deps = ["Compat", "LinearAlgebra"] -git-tree-sha1 = "e0af648f0692ec1691b5d094b8724ba1346281cf" +git-tree-sha1 = "ad25e7d21ce10e01de973cdc68ad0f850a953c52" uuid = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4" -version = "1.18.0" +version = "1.21.1" weakdeps = ["SparseArrays"] [deps.ChainRulesCore.extensions] ChainRulesCoreSparseArraysExt = "SparseArrays" +[[deps.CodecZlib]] +deps = ["TranscodingStreams", "Zlib_jll"] +git-tree-sha1 = "59939d8a997469ee05c4b4944560a820f9ba0d73" +uuid = "944b1d66-785c-5afd-91f1-9de20f533193" +version = "0.7.4" + +[[deps.ColorSchemes]] +deps = ["ColorTypes", "ColorVectorSpace", "Colors", "FixedPointNumbers", "PrecompileTools", "Random"] +git-tree-sha1 = "67c1f244b991cad9b0aa4b7540fb758c2488b129" +uuid = "35d6a980-a343-548e-a6ea-1d62b119f2f4" +version = "3.24.0" + +[[deps.ColorTypes]] +deps = ["FixedPointNumbers", "Random"] +git-tree-sha1 = "eb7f0f8307f71fac7c606984ea5fb2817275d6e4" +uuid = "3da002f7-5984-5a60-b8a6-cbb66c0b333f" +version = "0.11.4" + +[[deps.ColorVectorSpace]] +deps = ["ColorTypes", "FixedPointNumbers", "LinearAlgebra", "Requires", "Statistics", "TensorCore"] +git-tree-sha1 = "a1f44953f2382ebb937d60dafbe2deea4bd23249" +uuid = "c3611d14-8923-5661-9e6a-0046d554d3a4" +version = "0.10.0" +weakdeps = ["SpecialFunctions"] + + [deps.ColorVectorSpace.extensions] + SpecialFunctionsExt = "SpecialFunctions" + +[[deps.Colors]] +deps = ["ColorTypes", "FixedPointNumbers", "Reexport"] +git-tree-sha1 = "fc08e5930ee9a4e03f84bfb5211cb54e7769758a" +uuid = "5ae59095-9a9b-59fe-a467-6f913c188581" +version = "0.12.10" + [[deps.Combinatorics]] git-tree-sha1 = "08c8b6831dc00bfea825826be0bc8336fc369860" uuid = "861a8166-3701-5b0c-9a16-15d98fcdc6aa" @@ -74,10 +144,10 @@ uuid = "bbf7d656-a473-5ed7-a52c-81e309532950" version = "0.3.0" [[deps.Compat]] -deps = ["UUIDs"] -git-tree-sha1 = "8a62af3e248a8c4bad6b32cbbe663ae02275e32c" +deps = ["TOML", "UUIDs"] +git-tree-sha1 = "75bd5b6fc5089df449b5d35fa501c846c9b6549b" uuid = "34da2185-b29b-5c13-b0c7-acf172513d20" -version = "4.10.0" +version = "4.12.0" weakdeps = ["Dates", "LinearAlgebra"] [deps.Compat.extensions] @@ -86,7 +156,22 @@ weakdeps = ["Dates", "LinearAlgebra"] [[deps.CompilerSupportLibraries_jll]] deps = ["Artifacts", "Libdl"] uuid = "e66e0078-7015-5450-92f7-15fbd957f2ae" -version = "1.0.5+0" +version = "1.0.5+1" + +[[deps.CompositionsBase]] +git-tree-sha1 = "802bb88cd69dfd1509f6670416bd4434015693ad" +uuid = "a33af91c-f02d-484b-be07-31d278c5ca2b" +version = "0.1.2" +weakdeps = ["InverseFunctions"] + + [deps.CompositionsBase.extensions] + CompositionsBaseInverseFunctionsExt = "InverseFunctions" + +[[deps.ConcurrentUtilities]] +deps = ["Serialization", "Sockets"] +git-tree-sha1 = "9c4708e3ed2b799e6124b5673a712dda0b596a9b" +uuid = "f0e56b4a-5159-44fe-b623-3e5288b988bb" +version = "2.3.1" [[deps.ConstructionBase]] deps = ["LinearAlgebra"] @@ -102,11 +187,16 @@ version = "1.5.4" IntervalSets = "8197267c-284f-5f27-9208-e0e47529a953" StaticArrays = "90137ffa-7385-5640-81b9-e52037218182" +[[deps.Contour]] +git-tree-sha1 = "d05d9e7b7aedff4e5b51a029dced05cfb6125781" +uuid = "d38c429a-6771-53c6-b99e-75d170b6e991" +version = "0.6.2" + [[deps.Copulas]] -deps = ["Combinatorics", "Cubature", "Distributions", "ForwardDiff", "InteractiveUtils", "LogExpFunctions", "MvNormalCDF", "QuadGK", "Random", "Roots", "SpecialFunctions", "StatsBase", "TaylorSeries", "WilliamsonTransforms"] +deps = ["Combinatorics", "Cubature", "Distributions", "ForwardDiff", "InteractiveUtils", "LogExpFunctions", "MvNormalCDF", "PrecompileTools", "QuadGK", "Random", "Roots", "SpecialFunctions", "StatsBase", "TaylorSeries", "WilliamsonTransforms"] path = "C:\\Users\\lrnv\\.julia\\dev\\Copulas" uuid = "ae264745-0b69-425e-9d9d-cf662c5eec93" -version = "0.1.18" +version = "0.1.20" [[deps.Cubature]] deps = ["Cubature_jll"] @@ -121,20 +211,26 @@ uuid = "7bc98958-0e37-5d67-a6ac-a3a19030071a" version = "1.0.5+0" [[deps.DataAPI]] -git-tree-sha1 = "8da84edb865b0b5b0100c0666a9bc9a0b71c553c" +git-tree-sha1 = "abe83f3a2f1b857aac70ef8b269080af17764bbe" uuid = "9a962f9c-6df0-11e9-0e5d-c546b8b5ee8a" -version = "1.15.0" +version = "1.16.0" [[deps.DataStructures]] deps = ["Compat", "InteractiveUtils", "OrderedCollections"] -git-tree-sha1 = "3dbd312d370723b6bb43ba9d02fc36abade4518d" +git-tree-sha1 = "ac67408d9ddf207de5cfa9a97e114352430f01ed" uuid = "864edb3b-99cc-5e75-8d2d-829cb0a9cfe8" -version = "0.18.15" +version = "0.18.16" [[deps.Dates]] deps = ["Printf"] uuid = "ade2ca70-3891-5945-98fb-dc099432e06a" +[[deps.DelimitedFiles]] +deps = ["Mmap"] +git-tree-sha1 = "9e2f36d3c96a820c678f2f1f1782582fcf685bae" +uuid = "8bb1440f-4735-579b-a4ab-409b98df4dab" +version = "1.9.1" + [[deps.DiffResults]] deps = ["StaticArraysCore"] git-tree-sha1 = "782dd5f4561f5d267313f23853baaaa4c52ea621" @@ -149,9 +245,9 @@ version = "1.15.1" [[deps.Distributions]] deps = ["FillArrays", "LinearAlgebra", "PDMats", "Printf", "QuadGK", "Random", "SpecialFunctions", "Statistics", "StatsAPI", "StatsBase", "StatsFuns"] -git-tree-sha1 = "a6c00f894f24460379cb7136633cef54ac9f6f4a" +git-tree-sha1 = "7c302d7a5fec5214eb8a5a4c466dcf7a51fcf169" uuid = "31c24e10-a181-5473-b8eb-7969acd0382f" -version = "0.25.103" +version = "0.25.107" [deps.Distributions.extensions] DistributionsChainRulesCoreExt = "ChainRulesCore" @@ -170,16 +266,16 @@ uuid = "ffbed154-4ef7-542d-bbb7-c09d3a79fcae" version = "0.9.3" [[deps.Documenter]] -deps = ["ANSIColoredPrinters", "AbstractTrees", "Base64", "Dates", "DocStringExtensions", "Downloads", "IOCapture", "InteractiveUtils", "JSON", "LibGit2", "Logging", "Markdown", "MarkdownAST", "Pkg", "PrecompileTools", "REPL", "RegistryInstances", "SHA", "Test", "Unicode"] -git-tree-sha1 = "662fb21ae7fad33e044c2b59ece832fdce32c171" +deps = ["ANSIColoredPrinters", "AbstractTrees", "Base64", "Dates", "DocStringExtensions", "Downloads", "Git", "IOCapture", "InteractiveUtils", "JSON", "LibGit2", "Logging", "Markdown", "MarkdownAST", "Pkg", "PrecompileTools", "REPL", "RegistryInstances", "SHA", "Test", "Unicode"] +git-tree-sha1 = "2613dbec8f4748273bbe30ba71fd5cb369966bac" uuid = "e30172f5-a6a5-5a46-863b-614d45cd2de4" -version = "1.1.2" +version = "1.2.1" [[deps.DocumenterCitations]] deps = ["AbstractTrees", "Bibliography", "Dates", "Documenter", "Logging", "Markdown", "MarkdownAST", "OrderedCollections", "Unicode"] -git-tree-sha1 = "5bab3faaa2e87b09efd75c674c039364a6d85104" +git-tree-sha1 = "848c180c853afcfed0604b9cc1204a723957ee74" uuid = "daee34ce-89f3-4625-b898-19384cb65244" -version = "1.3.1" +version = "1.3.2" [[deps.Downloads]] deps = ["ArgTools", "FileWatching", "LibCURL", "NetworkOptions"] @@ -192,26 +288,75 @@ git-tree-sha1 = "5837a837389fccf076445fce071c8ddaea35a566" uuid = "fa6b7ba4-c1ee-5f82-b5fc-ecf0adba8f74" version = "0.6.8" +[[deps.EpollShim_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl"] +git-tree-sha1 = "8e9441ee83492030ace98f9789a654a6d0b1f643" +uuid = "2702e6a9-849d-5ed8-8c21-79e8b8f9ee43" +version = "0.0.20230411+0" + +[[deps.ExceptionUnwrapping]] +deps = ["Test"] +git-tree-sha1 = "dcb08a0d93ec0b1cdc4af184b26b591e9695423a" +uuid = "460bff9d-24e4-43bc-9d9f-a8973cb893f4" +version = "0.1.10" + +[[deps.Expat_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl"] +git-tree-sha1 = "4558ab818dcceaab612d1bb8c19cee87eda2b83c" +uuid = "2e619515-83b5-522b-bb60-26c02a35a201" +version = "2.5.0+0" + +[[deps.FFMPEG]] +deps = ["FFMPEG_jll"] +git-tree-sha1 = "b57e3acbe22f8484b4b5ff66a7499717fe1a9cc8" +uuid = "c87230d0-a227-11e9-1b43-d7ebe4e7570a" +version = "0.4.1" + +[[deps.FFMPEG_jll]] +deps = ["Artifacts", "Bzip2_jll", "FreeType2_jll", "FriBidi_jll", "JLLWrappers", "LAME_jll", "Libdl", "Ogg_jll", "OpenSSL_jll", "Opus_jll", "PCRE2_jll", "Zlib_jll", "libaom_jll", "libass_jll", "libfdk_aac_jll", "libvorbis_jll", "x264_jll", "x265_jll"] +git-tree-sha1 = "466d45dc38e15794ec7d5d63ec03d776a9aff36e" +uuid = "b22a6f82-2f65-5046-a5b2-351ab43fb4e5" +version = "4.4.4+1" + [[deps.FileIO]] deps = ["Pkg", "Requires", "UUIDs"] -git-tree-sha1 = "299dc33549f68299137e51e6d49a13b5b1da9673" +git-tree-sha1 = "c5c28c245101bd59154f649e19b038d15901b5dc" uuid = "5789e2e9-d7fb-5bc7-8068-2c6fae9b9549" -version = "1.16.1" +version = "1.16.2" [[deps.FileWatching]] uuid = "7b1f6079-737a-58dc-b8bc-7a2ca5c1b5ee" [[deps.FillArrays]] deps = ["LinearAlgebra", "Random"] -git-tree-sha1 = "35f0c0f345bff2c6d636f95fdb136323b5a796ef" +git-tree-sha1 = "5b93957f6dcd33fc343044af3d48c215be2562f1" uuid = "1a297f60-69ca-5386-bcde-b61e274b549b" -version = "1.7.0" -weakdeps = ["SparseArrays", "Statistics"] +version = "1.9.3" +weakdeps = ["PDMats", "SparseArrays", "Statistics"] [deps.FillArrays.extensions] + FillArraysPDMatsExt = "PDMats" FillArraysSparseArraysExt = "SparseArrays" FillArraysStatisticsExt = "Statistics" +[[deps.FixedPointNumbers]] +deps = ["Statistics"] +git-tree-sha1 = "335bfdceacc84c5cdf16aadc768aa5ddfc5383cc" +uuid = "53c48c17-4a7d-5ca2-90c5-79b7896eea93" +version = "0.8.4" + +[[deps.Fontconfig_jll]] +deps = ["Artifacts", "Bzip2_jll", "Expat_jll", "FreeType2_jll", "JLLWrappers", "Libdl", "Libuuid_jll", "Pkg", "Zlib_jll"] +git-tree-sha1 = "21efd19106a55620a188615da6d3d06cd7f6ee03" +uuid = "a3f928ae-7b40-5064-980b-68af3947d34b" +version = "2.13.93+0" + +[[deps.Formatting]] +deps = ["Printf"] +git-tree-sha1 = "8339d61043228fdd3eb658d86c926cb282ae72a8" +uuid = "59287772-0a20-5a39-b81b-1366585eb4c0" +version = "0.4.2" + [[deps.ForwardDiff]] deps = ["CommonSubexpressions", "DiffResults", "DiffRules", "LinearAlgebra", "LogExpFunctions", "NaNMath", "Preferences", "Printf", "Random", "SpecialFunctions"] git-tree-sha1 = "cf0fe81336da9fb90944683b8c41984b08793dad" @@ -224,9 +369,82 @@ version = "0.10.36" [deps.ForwardDiff.weakdeps] StaticArrays = "90137ffa-7385-5640-81b9-e52037218182" -[[deps.Future]] -deps = ["Random"] -uuid = "9fa8497b-333b-5362-9e8d-4d0656e87820" +[[deps.FreeType2_jll]] +deps = ["Artifacts", "Bzip2_jll", "JLLWrappers", "Libdl", "Zlib_jll"] +git-tree-sha1 = "d8db6a5a2fe1381c1ea4ef2cab7c69c2de7f9ea0" +uuid = "d7e528f0-a631-5988-bf34-fe36492bcfd7" +version = "2.13.1+0" + +[[deps.FriBidi_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] +git-tree-sha1 = "aa31987c2ba8704e23c6c8ba8a4f769d5d7e4f91" +uuid = "559328eb-81f9-559d-9380-de523a88c83c" +version = "1.0.10+0" + +[[deps.GLFW_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Libglvnd_jll", "Xorg_libXcursor_jll", "Xorg_libXi_jll", "Xorg_libXinerama_jll", "Xorg_libXrandr_jll"] +git-tree-sha1 = "ff38ba61beff76b8f4acad8ab0c97ef73bb670cb" +uuid = "0656b61e-2033-5cc2-a64a-77c0f6c09b89" +version = "3.3.9+0" + +[[deps.GR]] +deps = ["Artifacts", "Base64", "DelimitedFiles", "Downloads", "GR_jll", "HTTP", "JSON", "Libdl", "LinearAlgebra", "Pkg", "Preferences", "Printf", "Random", "Serialization", "Sockets", "TOML", "Tar", "Test", "UUIDs", "p7zip_jll"] +git-tree-sha1 = "3458564589be207fa6a77dbbf8b97674c9836aab" +uuid = "28b8d3ca-fb5f-59d9-8090-bfdbd6d07a71" +version = "0.73.2" + +[[deps.GR_jll]] +deps = ["Artifacts", "Bzip2_jll", "Cairo_jll", "FFMPEG_jll", "Fontconfig_jll", "FreeType2_jll", "GLFW_jll", "JLLWrappers", "JpegTurbo_jll", "Libdl", "Libtiff_jll", "Pixman_jll", "Qt6Base_jll", "Zlib_jll", "libpng_jll"] +git-tree-sha1 = "77f81da2964cc9fa7c0127f941e8bce37f7f1d70" +uuid = "d2c73de3-f751-5644-a686-071e5b155ba9" +version = "0.73.2+0" + +[[deps.Gettext_jll]] +deps = ["Artifacts", "CompilerSupportLibraries_jll", "JLLWrappers", "Libdl", "Libiconv_jll", "Pkg", "XML2_jll"] +git-tree-sha1 = "9b02998aba7bf074d14de89f9d37ca24a1a0b046" +uuid = "78b55507-aeef-58d4-861c-77aaff3498b1" +version = "0.21.0+0" + +[[deps.Git]] +deps = ["Git_jll"] +git-tree-sha1 = "51764e6c2e84c37055e846c516e9015b4a291c7d" +uuid = "d7ba0133-e1db-5d97-8f8c-041e4b3a1eb2" +version = "1.3.0" + +[[deps.Git_jll]] +deps = ["Artifacts", "Expat_jll", "JLLWrappers", "LibCURL_jll", "Libdl", "Libiconv_jll", "OpenSSL_jll", "PCRE2_jll", "Zlib_jll"] +git-tree-sha1 = "b30c473c97fcc1e1e44fab8f3e88fd1b89c9e9d1" +uuid = "f8c6e375-362e-5223-8a59-34ff63f689eb" +version = "2.43.0+0" + +[[deps.Glib_jll]] +deps = ["Artifacts", "Gettext_jll", "JLLWrappers", "Libdl", "Libffi_jll", "Libiconv_jll", "Libmount_jll", "PCRE2_jll", "Zlib_jll"] +git-tree-sha1 = "e94c92c7bf4819685eb80186d51c43e71d4afa17" +uuid = "7746bdde-850d-59dc-9ae8-88ece973131d" +version = "2.76.5+0" + +[[deps.Graphite2_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] +git-tree-sha1 = "344bf40dcab1073aca04aa0df4fb092f920e4011" +uuid = "3b182d85-2403-5c21-9c21-1e1f0cc25472" +version = "1.3.14+0" + +[[deps.Grisu]] +git-tree-sha1 = "53bb909d1151e57e2484c3d1b53e19552b887fb2" +uuid = "42e2da0e-8278-4e71-bc24-59509adca0fe" +version = "1.0.2" + +[[deps.HTTP]] +deps = ["Base64", "CodecZlib", "ConcurrentUtilities", "Dates", "ExceptionUnwrapping", "Logging", "LoggingExtras", "MbedTLS", "NetworkOptions", "OpenSSL", "Random", "SimpleBufferStream", "Sockets", "URIs", "UUIDs"] +git-tree-sha1 = "abbbb9ec3afd783a7cbd82ef01dcd088ea051398" +uuid = "cd3eb016-35fb-5094-929b-558a96fad6f3" +version = "1.10.1" + +[[deps.HarfBuzz_jll]] +deps = ["Artifacts", "Cairo_jll", "Fontconfig_jll", "FreeType2_jll", "Glib_jll", "Graphite2_jll", "JLLWrappers", "Libdl", "Libffi_jll", "Pkg"] +git-tree-sha1 = "129acf094d168394e80ee1dc4bc06ec835e510a3" +uuid = "2e76f6c2-a576-52d4-95c1-20adfe4de566" +version = "2.8.1+1" [[deps.HypergeometricFunctions]] deps = ["DualNumbers", "LinearAlgebra", "OpenLibm_jll", "SpecialFunctions"] @@ -236,9 +454,9 @@ version = "0.3.23" [[deps.IOCapture]] deps = ["Logging", "Random"] -git-tree-sha1 = "d75853a0bdbfb1ac815478bacd89cd27b550ace6" +git-tree-sha1 = "8b72179abc660bfab5e28472e019392b97d0985c" uuid = "b5f81e59-6552-4d32-b1f0-c071b021bf89" -version = "0.2.3" +version = "0.2.4" [[deps.IntegerMathUtils]] git-tree-sha1 = "b8ffb903da9f7b8cf695a8bead8e01814aa24b30" @@ -249,11 +467,23 @@ version = "0.1.2" deps = ["Markdown"] uuid = "b77e0a4c-d291-57a0-90e8-8db25a27a240" +[[deps.InverseFunctions]] +deps = ["Test"] +git-tree-sha1 = "68772f49f54b479fa88ace904f6127f0a3bb2e46" +uuid = "3587e190-3f89-42d0-90ee-14403ec27112" +version = "0.1.12" + [[deps.IrrationalConstants]] git-tree-sha1 = "630b497eafcc20001bba38a4651b327dcfc491d2" uuid = "92d709cd-6900-40b7-9082-c6be49f344b6" version = "0.2.2" +[[deps.JLFzf]] +deps = ["Pipe", "REPL", "Random", "fzf_jll"] +git-tree-sha1 = "a53ebe394b71470c7f97c2e7e170d51df21b17af" +uuid = "1019f520-868f-41f5-a6de-eb00f4b6a39c" +version = "0.1.7" + [[deps.JLLWrappers]] deps = ["Artifacts", "Preferences"] git-tree-sha1 = "7e5d6779a1e09a36db2a7b6cff50942a0a7d0fca" @@ -268,9 +498,15 @@ version = "0.21.4" [[deps.JSON3]] deps = ["Dates", "Mmap", "Parsers", "PrecompileTools", "StructTypes", "UUIDs"] -git-tree-sha1 = "95220473901735a0f4df9d1ca5b171b568b2daa3" +git-tree-sha1 = "eb3edce0ed4fa32f75a0a11217433c31d56bd48b" uuid = "0f8b85d8-7281-11e9-16c2-39a750bddbf1" -version = "1.13.2" +version = "1.14.0" + + [deps.JSON3.extensions] + JSON3ArrowExt = ["ArrowTypes"] + + [deps.JSON3.weakdeps] + ArrowTypes = "31f734f8-188a-4ce0-8406-c8a06bd891cd" [[deps.JSONSchema]] deps = ["Downloads", "JSON", "JSON3", "URIs"] @@ -278,43 +514,145 @@ git-tree-sha1 = "5f0bd0cd69df978fa64ccdcb5c152fbc705455a1" uuid = "7d188eb4-7ad8-530c-ae41-71a32a6d4692" version = "1.3.0" +[[deps.JpegTurbo_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl"] +git-tree-sha1 = "60b1194df0a3298f460063de985eae7b01bc011a" +uuid = "aacddb02-875f-59d6-b918-886e6ef4fbf8" +version = "3.0.1+0" + +[[deps.LAME_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] +git-tree-sha1 = "f6250b16881adf048549549fba48b1161acdac8c" +uuid = "c1c5ebd0-6772-5130-a774-d5fcae4a789d" +version = "3.100.1+0" + +[[deps.LERC_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] +git-tree-sha1 = "bf36f528eec6634efc60d7ec062008f171071434" +uuid = "88015f11-f218-50d7-93a8-a6af411a945d" +version = "3.0.0+1" + +[[deps.LLVMOpenMP_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl"] +git-tree-sha1 = "d986ce2d884d49126836ea94ed5bfb0f12679713" +uuid = "1d63c593-3942-5779-bab2-d838dc0a180e" +version = "15.0.7+0" + +[[deps.LZO_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] +git-tree-sha1 = "e5b909bcf985c5e2605737d2ce278ed791b89be6" +uuid = "dd4b983a-f0e5-5f8d-a1b7-129d4a5fb1ac" +version = "2.10.1+0" + +[[deps.LaTeXStrings]] +git-tree-sha1 = "50901ebc375ed41dbf8058da26f9de442febbbec" +uuid = "b964fa9f-0449-5b57-a5c2-d3ea65f4040f" +version = "1.3.1" + +[[deps.Latexify]] +deps = ["Formatting", "InteractiveUtils", "LaTeXStrings", "MacroTools", "Markdown", "OrderedCollections", "Printf", "Requires"] +git-tree-sha1 = "f428ae552340899a935973270b8d98e5a31c49fe" +uuid = "23fbe1c1-3f47-55db-b15f-69d7ec21a316" +version = "0.16.1" + + [deps.Latexify.extensions] + DataFramesExt = "DataFrames" + SymEngineExt = "SymEngine" + + [deps.Latexify.weakdeps] + DataFrames = "a93c6f00-e57d-5684-b7b6-d8193f3e46c0" + SymEngine = "123dc426-2d89-5057-bbad-38513e3affd8" + [[deps.LazilyInitializedFields]] -git-tree-sha1 = "410fe4739a4b092f2ffe36fcb0dcc3ab12648ce1" +git-tree-sha1 = "8f7f3cabab0fd1800699663533b6d5cb3fc0e612" uuid = "0e77f7df-68c5-4e49-93ce-4cd80f5598bf" -version = "1.2.1" +version = "1.2.2" [[deps.LibCURL]] deps = ["LibCURL_jll", "MozillaCACerts_jll"] uuid = "b27032c2-a3e7-50c8-80cd-2d36dbcbfd21" -version = "0.6.3" +version = "0.6.4" [[deps.LibCURL_jll]] deps = ["Artifacts", "LibSSH2_jll", "Libdl", "MbedTLS_jll", "Zlib_jll", "nghttp2_jll"] uuid = "deac9b47-8bc7-5906-a0fe-35ac56dc84c0" -version = "7.84.0+0" +version = "8.4.0+0" [[deps.LibGit2]] -deps = ["Base64", "NetworkOptions", "Printf", "SHA"] +deps = ["Base64", "LibGit2_jll", "NetworkOptions", "Printf", "SHA"] uuid = "76f85450-5226-5b5a-8eaa-529ad045b433" +[[deps.LibGit2_jll]] +deps = ["Artifacts", "LibSSH2_jll", "Libdl", "MbedTLS_jll"] +uuid = "e37daf67-58a4-590a-8e99-b0245dd2ffc5" +version = "1.6.4+0" + [[deps.LibSSH2_jll]] deps = ["Artifacts", "Libdl", "MbedTLS_jll"] uuid = "29816b5a-b9ab-546f-933c-edad1886dfa8" -version = "1.10.2+0" +version = "1.11.0+1" [[deps.Libdl]] uuid = "8f399da3-3557-5675-b5ff-fb832c97cbdb" +[[deps.Libffi_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] +git-tree-sha1 = "0b4a5d71f3e5200a7dff793393e09dfc2d874290" +uuid = "e9f186c6-92d2-5b65-8a66-fee21dc1b490" +version = "3.2.2+1" + +[[deps.Libgcrypt_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Libgpg_error_jll", "Pkg"] +git-tree-sha1 = "64613c82a59c120435c067c2b809fc61cf5166ae" +uuid = "d4300ac3-e22c-5743-9152-c294e39db1e4" +version = "1.8.7+0" + +[[deps.Libglvnd_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg", "Xorg_libX11_jll", "Xorg_libXext_jll"] +git-tree-sha1 = "6f73d1dd803986947b2c750138528a999a6c7733" +uuid = "7e76a0d4-f3c7-5321-8279-8d96eeed0f29" +version = "1.6.0+0" + +[[deps.Libgpg_error_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] +git-tree-sha1 = "c333716e46366857753e273ce6a69ee0945a6db9" +uuid = "7add5ba3-2f88-524e-9cd5-f83b8a55f7b8" +version = "1.42.0+0" + [[deps.Libiconv_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl"] git-tree-sha1 = "f9557a255370125b405568f9767d6d195822a175" uuid = "94ce4f54-9a6c-5748-9c1c-f9c7231a4531" version = "1.17.0+0" +[[deps.Libmount_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] +git-tree-sha1 = "9c30530bf0effd46e15e0fdcf2b8636e78cbbd73" +uuid = "4b2f31a3-9ecc-558c-b454-b3730dcb73e9" +version = "2.35.0+0" + +[[deps.Libtiff_jll]] +deps = ["Artifacts", "JLLWrappers", "JpegTurbo_jll", "LERC_jll", "Libdl", "XZ_jll", "Zlib_jll", "Zstd_jll"] +git-tree-sha1 = "2da088d113af58221c52828a80378e16be7d037a" +uuid = "89763e89-9b03-5906-acba-b20f662cd828" +version = "4.5.1+1" + +[[deps.Libuuid_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] +git-tree-sha1 = "7f3efec06033682db852f8b3bc3c1d2b0a0ab066" +uuid = "38a345b3-de98-5d2b-a5d3-14cd9215e700" +version = "2.36.0+0" + [[deps.LinearAlgebra]] deps = ["Libdl", "OpenBLAS_jll", "libblastrampoline_jll"] uuid = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e" +[[deps.LiveServer]] +deps = ["HTTP", "LoggingExtras", "MIMEs", "Pkg", "Sockets", "Test"] +git-tree-sha1 = "24d05efe53436b22a42bf2ae459f47c48b0c2603" +uuid = "16fef848-5104-11e9-1b77-fb7a48bbb589" +version = "1.2.7" + [[deps.LogExpFunctions]] deps = ["DocStringExtensions", "IrrationalConstants", "LinearAlgebra"] git-tree-sha1 = "7d6dd4e9212aebaeed356de34ccf262a3cd415aa" @@ -334,11 +672,22 @@ version = "0.3.26" [[deps.Logging]] uuid = "56ddb016-857b-54e1-b83d-db4d58db5568" +[[deps.LoggingExtras]] +deps = ["Dates", "Logging"] +git-tree-sha1 = "c1dd6d7978c12545b4179fb6153b9250c96b0075" +uuid = "e6f89c97-d47a-5376-807f-9c37f3926c36" +version = "1.0.3" + +[[deps.MIMEs]] +git-tree-sha1 = "65f28ad4b594aebe22157d6fac869786a255b7eb" +uuid = "6c6e2e6c-3030-632d-7369-2d6c69616d65" +version = "0.1.4" + [[deps.MacroTools]] deps = ["Markdown", "Random"] -git-tree-sha1 = "9ee1618cbf5240e6d4e0371d6f24065083f60c48" +git-tree-sha1 = "2fa9ee3e63fd3a4f7a9a4f4744a52f4856de82df" uuid = "1914dd2f-81c6-5fcd-8719-6d5c9610ff09" -version = "0.5.11" +version = "0.5.13" [[deps.Markdown]] deps = ["Base64"] @@ -350,10 +699,21 @@ git-tree-sha1 = "465a70f0fc7d443a00dcdc3267a497397b8a3899" uuid = "d0879d2d-cac2-40c8-9cee-1863dc0c7391" version = "0.1.2" +[[deps.MbedTLS]] +deps = ["Dates", "MbedTLS_jll", "MozillaCACerts_jll", "NetworkOptions", "Random", "Sockets"] +git-tree-sha1 = "c067a280ddc25f196b5e7df3877c6b226d390aaf" +uuid = "739be429-bea8-5141-9913-cc70e7f3736d" +version = "1.1.9" + [[deps.MbedTLS_jll]] deps = ["Artifacts", "Libdl"] uuid = "c8ffd9c3-330d-5841-b78e-0817d7145fa1" -version = "2.28.2+0" +version = "2.28.2+1" + +[[deps.Measures]] +git-tree-sha1 = "c13304c81eec1ed3af7fc20e75fb6b26092a1102" +uuid = "442fdcdd-2543-5da2-b0f3-8c86c306513e" +version = "0.3.2" [[deps.Missings]] deps = ["DataAPI"] @@ -366,7 +726,7 @@ uuid = "a63ad114-7e13-5084-954f-fe012c677804" [[deps.MozillaCACerts_jll]] uuid = "14a3606d-f60d-562e-9121-12d972cd8159" -version = "2022.10.11" +version = "2023.1.10" [[deps.MvNormalCDF]] deps = ["Distributions", "FillArrays", "LinearAlgebra", "Primes", "Random", "StatsBase"] @@ -384,15 +744,33 @@ version = "1.0.2" uuid = "ca575930-c2e3-43a9-ace4-1e988b2c1908" version = "1.2.0" +[[deps.Ogg_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] +git-tree-sha1 = "887579a3eb005446d514ab7aeac5d1d027658b8f" +uuid = "e7412a2a-1a6e-54c0-be00-318e2571c051" +version = "1.3.5+1" + [[deps.OpenBLAS_jll]] deps = ["Artifacts", "CompilerSupportLibraries_jll", "Libdl"] uuid = "4536629a-c528-5b80-bd46-f80d51c5b363" -version = "0.3.21+4" +version = "0.3.23+2" [[deps.OpenLibm_jll]] deps = ["Artifacts", "Libdl"] uuid = "05823500-19ac-5b8b-9628-191a04bc5112" -version = "0.8.1+0" +version = "0.8.1+2" + +[[deps.OpenSSL]] +deps = ["BitFlags", "Dates", "MozillaCACerts_jll", "OpenSSL_jll", "Sockets"] +git-tree-sha1 = "51901a49222b09e3743c65b8847687ae5fc78eb2" +uuid = "4d8831e6-92b7-49fb-bdf8-b643e874388c" +version = "1.4.1" + +[[deps.OpenSSL_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl"] +git-tree-sha1 = "60e3045590bd104a16fefb12836c00c0ef8c7f8c" +uuid = "458c3c95-2e84-50aa-8efc-19380b2a3a95" +version = "3.0.13+0" [[deps.OpenSpecFun_jll]] deps = ["Artifacts", "CompilerSupportLibraries_jll", "JLLWrappers", "Libdl", "Pkg"] @@ -400,27 +778,81 @@ git-tree-sha1 = "13652491f6856acfd2db29360e1bbcd4565d04f1" uuid = "efe28fd5-8261-553b-a9e1-b2916fc3738e" version = "0.5.5+0" +[[deps.Opus_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] +git-tree-sha1 = "51a08fb14ec28da2ec7a927c4337e4332c2a4720" +uuid = "91d4177d-7536-5919-b921-800302f37372" +version = "1.3.2+0" + [[deps.OrderedCollections]] -git-tree-sha1 = "2e73fe17cac3c62ad1aebe70d44c963c3cfdc3e3" +git-tree-sha1 = "dfdf5519f235516220579f949664f1bf44e741c5" uuid = "bac558e1-5e72-5ebc-8fee-abe8a469f55d" -version = "1.6.2" +version = "1.6.3" + +[[deps.PCRE2_jll]] +deps = ["Artifacts", "Libdl"] +uuid = "efcefdf7-47ab-520b-bdef-62a2eaa19f15" +version = "10.42.0+1" [[deps.PDMats]] deps = ["LinearAlgebra", "SparseArrays", "SuiteSparse"] -git-tree-sha1 = "66b2fcd977db5329aa35cac121e5b94dd6472198" +git-tree-sha1 = "949347156c25054de2db3b166c52ac4728cbad65" uuid = "90014a1f-27ba-587c-ab20-58faa44d9150" -version = "0.11.28" +version = "0.11.31" [[deps.Parsers]] deps = ["Dates", "PrecompileTools", "UUIDs"] -git-tree-sha1 = "716e24b21538abc91f6205fd1d8363f39b442851" +git-tree-sha1 = "8489905bcdbcfac64d1daa51ca07c0d8f0283821" uuid = "69de0a69-1ddd-5017-9359-2bf0b02dc9f0" -version = "2.7.2" +version = "2.8.1" + +[[deps.Pipe]] +git-tree-sha1 = "6842804e7867b115ca9de748a0cf6b364523c16d" +uuid = "b98c9c47-44ae-5843-9183-064241ee97a0" +version = "1.3.0" + +[[deps.Pixman_jll]] +deps = ["Artifacts", "CompilerSupportLibraries_jll", "JLLWrappers", "LLVMOpenMP_jll", "Libdl"] +git-tree-sha1 = "64779bc4c9784fee475689a1752ef4d5747c5e87" +uuid = "30392449-352a-5448-841d-b1acce4e97dc" +version = "0.42.2+0" [[deps.Pkg]] deps = ["Artifacts", "Dates", "Downloads", "FileWatching", "LibGit2", "Libdl", "Logging", "Markdown", "Printf", "REPL", "Random", "SHA", "Serialization", "TOML", "Tar", "UUIDs", "p7zip_jll"] uuid = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f" -version = "1.9.2" +version = "1.10.0" + +[[deps.PlotThemes]] +deps = ["PlotUtils", "Statistics"] +git-tree-sha1 = "1f03a2d339f42dca4a4da149c7e15e9b896ad899" +uuid = "ccf2f8ad-2431-5c83-bf29-c5338b663b6a" +version = "3.1.0" + +[[deps.PlotUtils]] +deps = ["ColorSchemes", "Colors", "Dates", "PrecompileTools", "Printf", "Random", "Reexport", "Statistics"] +git-tree-sha1 = "862942baf5663da528f66d24996eb6da85218e76" +uuid = "995b91a9-d308-5afd-9ec6-746e21dbc043" +version = "1.4.0" + +[[deps.Plots]] +deps = ["Base64", "Contour", "Dates", "Downloads", "FFMPEG", "FixedPointNumbers", "GR", "JLFzf", "JSON", "LaTeXStrings", "Latexify", "LinearAlgebra", "Measures", "NaNMath", "Pkg", "PlotThemes", "PlotUtils", "PrecompileTools", "Printf", "REPL", "Random", "RecipesBase", "RecipesPipeline", "Reexport", "RelocatableFolders", "Requires", "Scratch", "Showoff", "SparseArrays", "Statistics", "StatsBase", "UUIDs", "UnicodeFun", "UnitfulLatexify", "Unzip"] +git-tree-sha1 = "c4fa93d7d66acad8f6f4ff439576da9d2e890ee0" +uuid = "91a5bcdd-55d7-5caf-9e0b-520d859cae80" +version = "1.40.1" + + [deps.Plots.extensions] + FileIOExt = "FileIO" + GeometryBasicsExt = "GeometryBasics" + IJuliaExt = "IJulia" + ImageInTerminalExt = "ImageInTerminal" + UnitfulExt = "Unitful" + + [deps.Plots.weakdeps] + FileIO = "5789e2e9-d7fb-5bc7-8068-2c6fae9b9549" + GeometryBasics = "5c1252a2-5f33-56bf-86c9-59e7332b4326" + IJulia = "7073ff75-c697-5162-941a-fcdaad2a7d2a" + ImageInTerminal = "d8c32880-2388-543b-8c61-d9f865259254" + Unitful = "1986cc42-f94f-5a68-af5c-568840ba703d" [[deps.PrecompileTools]] deps = ["Preferences"] @@ -436,28 +868,46 @@ version = "1.4.1" [[deps.Primes]] deps = ["IntegerMathUtils"] -git-tree-sha1 = "4c9f306e5d6603ae203c2000dd460d81a5251489" +git-tree-sha1 = "1d05623b5952aed1307bf8b43bec8b8d1ef94b6e" uuid = "27ebfcd6-29c5-5fa9-bf4b-fb8fc14df3ae" -version = "0.5.4" +version = "0.5.5" [[deps.Printf]] deps = ["Unicode"] uuid = "de0858da-6303-5e67-8744-51eddeeeb8d7" +[[deps.Qt6Base_jll]] +deps = ["Artifacts", "CompilerSupportLibraries_jll", "Fontconfig_jll", "Glib_jll", "JLLWrappers", "Libdl", "Libglvnd_jll", "OpenSSL_jll", "Vulkan_Loader_jll", "Xorg_libSM_jll", "Xorg_libXext_jll", "Xorg_libXrender_jll", "Xorg_libxcb_jll", "Xorg_xcb_util_cursor_jll", "Xorg_xcb_util_image_jll", "Xorg_xcb_util_keysyms_jll", "Xorg_xcb_util_renderutil_jll", "Xorg_xcb_util_wm_jll", "Zlib_jll", "libinput_jll", "xkbcommon_jll"] +git-tree-sha1 = "37b7bb7aabf9a085e0044307e1717436117f2b3b" +uuid = "c0090381-4147-56d7-9ebc-da0b1113ec56" +version = "6.5.3+1" + [[deps.QuadGK]] deps = ["DataStructures", "LinearAlgebra"] -git-tree-sha1 = "9ebcd48c498668c7fa0e97a9cae873fbee7bfee1" +git-tree-sha1 = "9b23c31e76e333e6fb4c1595ae6afa74966a729e" uuid = "1fd47b50-473d-5c70-9696-f719f8f3bcdc" -version = "2.9.1" +version = "2.9.4" [[deps.REPL]] deps = ["InteractiveUtils", "Markdown", "Sockets", "Unicode"] uuid = "3fa0cd96-eef1-5676-8a61-b3b8758bbffb" [[deps.Random]] -deps = ["SHA", "Serialization"] +deps = ["SHA"] uuid = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c" +[[deps.RecipesBase]] +deps = ["PrecompileTools"] +git-tree-sha1 = "5c3d09cc4f31f5fc6af001c250bf1278733100ff" +uuid = "3cdcf5f2-1ef4-517c-9805-6587b60abb01" +version = "1.3.4" + +[[deps.RecipesPipeline]] +deps = ["Dates", "NaNMath", "PlotUtils", "PrecompileTools", "RecipesBase"] +git-tree-sha1 = "45cf9fd0ca5839d06ef333c8201714e888486342" +uuid = "01d81517-befc-4cb6-b9ec-a95719d0359c" +version = "0.6.12" + [[deps.Reexport]] git-tree-sha1 = "45e428421666073eab6f2da5c9d310d99bb12f9b" uuid = "189a3867-3050-52da-a836-e630ba90ab69" @@ -469,6 +919,12 @@ git-tree-sha1 = "ffd19052caf598b8653b99404058fce14828be51" uuid = "2792f1a3-b283-48e8-9a74-f99dce5104f3" version = "0.1.0" +[[deps.RelocatableFolders]] +deps = ["SHA", "Scratch"] +git-tree-sha1 = "ffdaf70d81cf6ff22c2b6e733c900c3321cab864" +uuid = "05181044-ff0b-4ac5-8273-598c1e38db00" +version = "1.0.1" + [[deps.Requires]] deps = ["UUIDs"] git-tree-sha1 = "838a3a4188e2ded87a4f9f184b4b0d78a1e91cb7" @@ -488,10 +944,10 @@ uuid = "f50d1b31-88e8-58de-be2c-1cc44531875f" version = "0.4.0+0" [[deps.Roots]] -deps = ["ChainRulesCore", "CommonSolve", "Printf", "Setfield"] -git-tree-sha1 = "0f1d92463a020321983d04c110f476c274bafe2e" +deps = ["Accessors", "ChainRulesCore", "CommonSolve", "Printf"] +git-tree-sha1 = "754acd3031a9f2eaf6632ba4850b1c01fe4460c1" uuid = "f2b01f46-fcfa-551c-844a-d8ac1e96c665" -version = "2.0.22" +version = "2.1.2" [deps.Roots.extensions] RootsForwardDiffExt = "ForwardDiff" @@ -509,27 +965,39 @@ version = "2.0.22" uuid = "ea8e919c-243c-51af-8825-aaa63cd721ce" version = "0.7.0" +[[deps.Scratch]] +deps = ["Dates"] +git-tree-sha1 = "3bac05bc7e74a75fd9cba4295cde4045d9fe2386" +uuid = "6c6a2e73-6563-6170-7368-637461726353" +version = "1.2.1" + [[deps.Serialization]] uuid = "9e88b42a-f829-5b0c-bbe9-9e923198166b" -[[deps.Setfield]] -deps = ["ConstructionBase", "Future", "MacroTools", "StaticArraysCore"] -git-tree-sha1 = "e2cc6d8c88613c05e1defb55170bf5ff211fbeac" -uuid = "efcf1570-3423-57d1-acb7-fd33fddbac46" -version = "1.1.1" +[[deps.Showoff]] +deps = ["Dates", "Grisu"] +git-tree-sha1 = "91eddf657aca81df9ae6ceb20b959ae5653ad1de" +uuid = "992d4aef-0814-514b-bc4d-f2e9a6c4116f" +version = "1.0.3" + +[[deps.SimpleBufferStream]] +git-tree-sha1 = "874e8867b33a00e784c8a7e4b60afe9e037b74e1" +uuid = "777ac1f9-54b0-4bf8-805c-2214025038e7" +version = "1.1.0" [[deps.Sockets]] uuid = "6462fe0b-24de-5631-8697-dd941f90decc" [[deps.SortingAlgorithms]] deps = ["DataStructures"] -git-tree-sha1 = "5165dfb9fd131cf0c6957a3a7605dede376e7b63" +git-tree-sha1 = "66e0a8e672a0bdfca2c3f5937efb8538b9ddc085" uuid = "a2af1166-a08f-5f64-846c-94a0d3cef48c" -version = "1.2.0" +version = "1.2.1" [[deps.SparseArrays]] deps = ["Libdl", "LinearAlgebra", "Random", "Serialization", "SuiteSparse_jll"] uuid = "2f01184e-e22b-5df5-ae63-d93ebab69eaf" +version = "1.10.0" [[deps.SpecialFunctions]] deps = ["IrrationalConstants", "LogExpFunctions", "OpenLibm_jll", "OpenSpecFun_jll"] @@ -549,7 +1017,7 @@ version = "1.4.2" [[deps.Statistics]] deps = ["LinearAlgebra", "SparseArrays"] uuid = "10745b16-79ce-11e8-11f9-7d13ad32a3b2" -version = "1.9.0" +version = "1.10.0" [[deps.StatsAPI]] deps = ["LinearAlgebra"] @@ -568,15 +1036,12 @@ deps = ["HypergeometricFunctions", "IrrationalConstants", "LogExpFunctions", "Re git-tree-sha1 = "f625d686d5a88bcd2b15cd81f18f98186fdc0c9a" uuid = "4c63d2b9-4356-54db-8cca-17b64c39e42c" version = "1.3.0" +weakdeps = ["ChainRulesCore", "InverseFunctions"] [deps.StatsFuns.extensions] StatsFunsChainRulesCoreExt = "ChainRulesCore" StatsFunsInverseFunctionsExt = "InverseFunctions" - [deps.StatsFuns.weakdeps] - ChainRulesCore = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4" - InverseFunctions = "3587e190-3f89-42d0-90ee-14403ec27112" - [[deps.StringEncodings]] deps = ["Libiconv_jll"] git-tree-sha1 = "b765e46ba27ecf6b44faf70df40c57aa3a547dcb" @@ -594,9 +1059,9 @@ deps = ["Libdl", "LinearAlgebra", "Serialization", "SparseArrays"] uuid = "4607b0f0-06f3-5cda-b6b1-a6196a1729e9" [[deps.SuiteSparse_jll]] -deps = ["Artifacts", "Libdl", "Pkg", "libblastrampoline_jll"] +deps = ["Artifacts", "Libdl", "libblastrampoline_jll"] uuid = "bea87d4a-7f5b-5778-9afe-8cc45184846c" -version = "5.10.1+6" +version = "7.2.1+1" [[deps.TOML]] deps = ["Dates"] @@ -610,9 +1075,9 @@ version = "1.10.0" [[deps.TaylorSeries]] deps = ["LinearAlgebra", "Markdown", "Requires", "SparseArrays"] -git-tree-sha1 = "50718b4fc1ce20cecf28d85215028c78b4d875c2" +git-tree-sha1 = "1c7170668366821b0c4c4fe03ee78f8d6cf36e2c" uuid = "6aa5eb33-94cf-58f4-a9d0-e4b2c4fc25ea" -version = "0.15.2" +version = "0.16.0" [deps.TaylorSeries.extensions] TaylorSeriesIAExt = "IntervalArithmetic" @@ -620,10 +1085,25 @@ version = "0.15.2" [deps.TaylorSeries.weakdeps] IntervalArithmetic = "d1acc4aa-44c8-5952-acd4-ba5d80a2a253" +[[deps.TensorCore]] +deps = ["LinearAlgebra"] +git-tree-sha1 = "1feb45f88d133a655e001435632f019a9a1bcdb6" +uuid = "62fd8b95-f654-4bbd-a8a5-9c27f68ccd50" +version = "0.1.1" + [[deps.Test]] deps = ["InteractiveUtils", "Logging", "Random", "Serialization"] uuid = "8dfed614-e22c-5e08-85e1-65c5234f0b40" +[[deps.TranscodingStreams]] +git-tree-sha1 = "54194d92959d8ebaa8e26227dbe3cdefcdcd594f" +uuid = "3bb67fe8-82b1-5028-8e26-92a6c54297fa" +version = "0.10.3" +weakdeps = ["Random", "Test"] + + [deps.TranscodingStreams.extensions] + TestExt = ["Test", "Random"] + [[deps.URIs]] git-tree-sha1 = "67db6cc7b3821e19ebe75791a9dd19c9b1188f2b" uuid = "5c2747f8-b7ea-4ff2-ba2e-563bfd36b1d4" @@ -636,11 +1116,219 @@ uuid = "cf7118a7-6976-5b1a-9a39-7adc72f591a4" [[deps.Unicode]] uuid = "4ec0a83e-493e-50e2-b9ac-8f72acf5a8f5" +[[deps.UnicodeFun]] +deps = ["REPL"] +git-tree-sha1 = "53915e50200959667e78a92a418594b428dffddf" +uuid = "1cfade01-22cf-5700-b092-accc4b62d6e1" +version = "0.4.1" + +[[deps.Unitful]] +deps = ["Dates", "LinearAlgebra", "Random"] +git-tree-sha1 = "3c793be6df9dd77a0cf49d80984ef9ff996948fa" +uuid = "1986cc42-f94f-5a68-af5c-568840ba703d" +version = "1.19.0" +weakdeps = ["ConstructionBase", "InverseFunctions"] + + [deps.Unitful.extensions] + ConstructionBaseUnitfulExt = "ConstructionBase" + InverseFunctionsUnitfulExt = "InverseFunctions" + +[[deps.UnitfulLatexify]] +deps = ["LaTeXStrings", "Latexify", "Unitful"] +git-tree-sha1 = "e2d817cc500e960fdbafcf988ac8436ba3208bfd" +uuid = "45397f5d-5981-4c77-b2b3-fc36d6e9b728" +version = "1.6.3" + +[[deps.Unzip]] +git-tree-sha1 = "ca0969166a028236229f63514992fc073799bb78" +uuid = "41fe7b60-77ed-43a1-b4f0-825fd5a5650d" +version = "0.2.0" + +[[deps.Vulkan_Loader_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Wayland_jll", "Xorg_libX11_jll", "Xorg_libXrandr_jll", "xkbcommon_jll"] +git-tree-sha1 = "2f0486047a07670caad3a81a075d2e518acc5c59" +uuid = "a44049a8-05dd-5a78-86c9-5fde0876e88c" +version = "1.3.243+0" + +[[deps.Wayland_jll]] +deps = ["Artifacts", "EpollShim_jll", "Expat_jll", "JLLWrappers", "Libdl", "Libffi_jll", "Pkg", "XML2_jll"] +git-tree-sha1 = "7558e29847e99bc3f04d6569e82d0f5c54460703" +uuid = "a2964d1f-97da-50d4-b82a-358c7fce9d89" +version = "1.21.0+1" + +[[deps.Wayland_protocols_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] +git-tree-sha1 = "93f43ab61b16ddfb2fd3bb13b3ce241cafb0e6c9" +uuid = "2381bf8a-dfd0-557d-9999-79630e7b1b91" +version = "1.31.0+0" + [[deps.WilliamsonTransforms]] deps = ["Distributions", "Roots", "TaylorSeries"] -git-tree-sha1 = "fb3d8309785fa242d5641eefff62763f580f597f" +git-tree-sha1 = "90a71432a131e9217f75476bd031444f33c483d7" uuid = "48feb556-9bdd-43a2-8e10-96100ec25e22" -version = "0.1.0" +version = "0.1.4" + +[[deps.XML2_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Libiconv_jll", "Zlib_jll"] +git-tree-sha1 = "801cbe47eae69adc50f36c3caec4758d2650741b" +uuid = "02c8fc9c-b97f-50b9-bbe4-9be30ff0a78a" +version = "2.12.2+0" + +[[deps.XSLT_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Libgcrypt_jll", "Libgpg_error_jll", "Libiconv_jll", "Pkg", "XML2_jll", "Zlib_jll"] +git-tree-sha1 = "91844873c4085240b95e795f692c4cec4d805f8a" +uuid = "aed1982a-8fda-507f-9586-7b0439959a61" +version = "1.1.34+0" + +[[deps.XZ_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl"] +git-tree-sha1 = "522b8414d40c4cbbab8dee346ac3a09f9768f25d" +uuid = "ffd25f8a-64ca-5728-b0f7-c24cf3aae800" +version = "5.4.5+0" + +[[deps.Xorg_libICE_jll]] +deps = ["Libdl", "Pkg"] +git-tree-sha1 = "e5becd4411063bdcac16be8b66fc2f9f6f1e8fe5" +uuid = "f67eecfb-183a-506d-b269-f58e52b52d7c" +version = "1.0.10+1" + +[[deps.Xorg_libSM_jll]] +deps = ["Libdl", "Pkg", "Xorg_libICE_jll"] +git-tree-sha1 = "4a9d9e4c180e1e8119b5ffc224a7b59d3a7f7e18" +uuid = "c834827a-8449-5923-a945-d239c165b7dd" +version = "1.2.3+0" + +[[deps.Xorg_libX11_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Xorg_libxcb_jll", "Xorg_xtrans_jll"] +git-tree-sha1 = "afead5aba5aa507ad5a3bf01f58f82c8d1403495" +uuid = "4f6342f7-b3d2-589e-9d20-edeb45f2b2bc" +version = "1.8.6+0" + +[[deps.Xorg_libXau_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl"] +git-tree-sha1 = "6035850dcc70518ca32f012e46015b9beeda49d8" +uuid = "0c0b7dd1-d40b-584c-a123-a41640f87eec" +version = "1.0.11+0" + +[[deps.Xorg_libXcursor_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg", "Xorg_libXfixes_jll", "Xorg_libXrender_jll"] +git-tree-sha1 = "12e0eb3bc634fa2080c1c37fccf56f7c22989afd" +uuid = "935fb764-8cf2-53bf-bb30-45bb1f8bf724" +version = "1.2.0+4" + +[[deps.Xorg_libXdmcp_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl"] +git-tree-sha1 = "34d526d318358a859d7de23da945578e8e8727b7" +uuid = "a3789734-cfe1-5b06-b2d0-1dd0d9d62d05" +version = "1.1.4+0" + +[[deps.Xorg_libXext_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg", "Xorg_libX11_jll"] +git-tree-sha1 = "b7c0aa8c376b31e4852b360222848637f481f8c3" +uuid = "1082639a-0dae-5f34-9b06-72781eeb8cb3" +version = "1.3.4+4" + +[[deps.Xorg_libXfixes_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg", "Xorg_libX11_jll"] +git-tree-sha1 = "0e0dc7431e7a0587559f9294aeec269471c991a4" +uuid = "d091e8ba-531a-589c-9de9-94069b037ed8" +version = "5.0.3+4" + +[[deps.Xorg_libXi_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg", "Xorg_libXext_jll", "Xorg_libXfixes_jll"] +git-tree-sha1 = "89b52bc2160aadc84d707093930ef0bffa641246" +uuid = "a51aa0fd-4e3c-5386-b890-e753decda492" +version = "1.7.10+4" + +[[deps.Xorg_libXinerama_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg", "Xorg_libXext_jll"] +git-tree-sha1 = "26be8b1c342929259317d8b9f7b53bf2bb73b123" +uuid = "d1454406-59df-5ea1-beac-c340f2130bc3" +version = "1.1.4+4" + +[[deps.Xorg_libXrandr_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg", "Xorg_libXext_jll", "Xorg_libXrender_jll"] +git-tree-sha1 = "34cea83cb726fb58f325887bf0612c6b3fb17631" +uuid = "ec84b674-ba8e-5d96-8ba1-2a689ba10484" +version = "1.5.2+4" + +[[deps.Xorg_libXrender_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg", "Xorg_libX11_jll"] +git-tree-sha1 = "19560f30fd49f4d4efbe7002a1037f8c43d43b96" +uuid = "ea2f1a96-1ddc-540d-b46f-429655e07cfa" +version = "0.9.10+4" + +[[deps.Xorg_libpthread_stubs_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl"] +git-tree-sha1 = "8fdda4c692503d44d04a0603d9ac0982054635f9" +uuid = "14d82f49-176c-5ed1-bb49-ad3f5cbd8c74" +version = "0.1.1+0" + +[[deps.Xorg_libxcb_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "XSLT_jll", "Xorg_libXau_jll", "Xorg_libXdmcp_jll", "Xorg_libpthread_stubs_jll"] +git-tree-sha1 = "b4bfde5d5b652e22b9c790ad00af08b6d042b97d" +uuid = "c7cfdc94-dc32-55de-ac96-5a1b8d977c5b" +version = "1.15.0+0" + +[[deps.Xorg_libxkbfile_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Xorg_libX11_jll"] +git-tree-sha1 = "730eeca102434283c50ccf7d1ecdadf521a765a4" +uuid = "cc61e674-0454-545c-8b26-ed2c68acab7a" +version = "1.1.2+0" + +[[deps.Xorg_xcb_util_cursor_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Xorg_xcb_util_image_jll", "Xorg_xcb_util_jll", "Xorg_xcb_util_renderutil_jll"] +git-tree-sha1 = "04341cb870f29dcd5e39055f895c39d016e18ccd" +uuid = "e920d4aa-a673-5f3a-b3d7-f755a4d47c43" +version = "0.1.4+0" + +[[deps.Xorg_xcb_util_image_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg", "Xorg_xcb_util_jll"] +git-tree-sha1 = "0fab0a40349ba1cba2c1da699243396ff8e94b97" +uuid = "12413925-8142-5f55-bb0e-6d7ca50bb09b" +version = "0.4.0+1" + +[[deps.Xorg_xcb_util_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg", "Xorg_libxcb_jll"] +git-tree-sha1 = "e7fd7b2881fa2eaa72717420894d3938177862d1" +uuid = "2def613f-5ad1-5310-b15b-b15d46f528f5" +version = "0.4.0+1" + +[[deps.Xorg_xcb_util_keysyms_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg", "Xorg_xcb_util_jll"] +git-tree-sha1 = "d1151e2c45a544f32441a567d1690e701ec89b00" +uuid = "975044d2-76e6-5fbe-bf08-97ce7c6574c7" +version = "0.4.0+1" + +[[deps.Xorg_xcb_util_renderutil_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg", "Xorg_xcb_util_jll"] +git-tree-sha1 = "dfd7a8f38d4613b6a575253b3174dd991ca6183e" +uuid = "0d47668e-0667-5a69-a72c-f761630bfb7e" +version = "0.3.9+1" + +[[deps.Xorg_xcb_util_wm_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg", "Xorg_xcb_util_jll"] +git-tree-sha1 = "e78d10aab01a4a154142c5006ed44fd9e8e31b67" +uuid = "c22f9ab0-d5fe-5066-847c-f4bb1cd4e361" +version = "0.4.1+1" + +[[deps.Xorg_xkbcomp_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Xorg_libxkbfile_jll"] +git-tree-sha1 = "330f955bc41bb8f5270a369c473fc4a5a4e4d3cb" +uuid = "35661453-b289-5fab-8a00-3d9160c6a3a4" +version = "1.4.6+0" + +[[deps.Xorg_xkeyboard_config_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Xorg_xkbcomp_jll"] +git-tree-sha1 = "691634e5453ad362044e2ad653e79f3ee3bb98c3" +uuid = "33bec58e-1273-512f-9401-5d533626f822" +version = "2.39.0+0" + +[[deps.Xorg_xtrans_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl"] +git-tree-sha1 = "e92a1a012a10506618f10b7047e478403a046c77" +uuid = "c5fb5394-a638-5e4d-96e5-b29de1b5cf10" +version = "1.5.0+0" [[deps.YAML]] deps = ["Base64", "Dates", "Printf", "StringEncodings"] @@ -651,19 +1339,109 @@ version = "0.4.9" [[deps.Zlib_jll]] deps = ["Libdl"] uuid = "83775a58-1f1d-513f-b197-d71354ab007a" -version = "1.2.13+0" +version = "1.2.13+1" + +[[deps.Zstd_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl"] +git-tree-sha1 = "49ce682769cd5de6c72dcf1b94ed7790cd08974c" +uuid = "3161d3a3-bdf6-5164-811a-617609db77b4" +version = "1.5.5+0" + +[[deps.eudev_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg", "gperf_jll"] +git-tree-sha1 = "431b678a28ebb559d224c0b6b6d01afce87c51ba" +uuid = "35ca27e7-8b34-5b7f-bca9-bdc33f59eb06" +version = "3.2.9+0" + +[[deps.fzf_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl"] +git-tree-sha1 = "a68c9655fbe6dfcab3d972808f1aafec151ce3f8" +uuid = "214eeab7-80f7-51ab-84ad-2988db7cef09" +version = "0.43.0+0" + +[[deps.gperf_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] +git-tree-sha1 = "3516a5630f741c9eecb3720b1ec9d8edc3ecc033" +uuid = "1a1c6b14-54f6-533d-8383-74cd7377aa70" +version = "3.1.1+0" + +[[deps.libaom_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] +git-tree-sha1 = "3a2ea60308f0996d26f1e5354e10c24e9ef905d4" +uuid = "a4ae2306-e953-59d6-aa16-d00cac43593b" +version = "3.4.0+0" + +[[deps.libass_jll]] +deps = ["Artifacts", "Bzip2_jll", "FreeType2_jll", "FriBidi_jll", "HarfBuzz_jll", "JLLWrappers", "Libdl", "Pkg", "Zlib_jll"] +git-tree-sha1 = "5982a94fcba20f02f42ace44b9894ee2b140fe47" +uuid = "0ac62f75-1d6f-5e53-bd7c-93b484bb37c0" +version = "0.15.1+0" [[deps.libblastrampoline_jll]] deps = ["Artifacts", "Libdl"] uuid = "8e850b90-86db-534c-a0d3-1478176c7d93" -version = "5.8.0+0" +version = "5.8.0+1" + +[[deps.libevdev_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] +git-tree-sha1 = "141fe65dc3efabb0b1d5ba74e91f6ad26f84cc22" +uuid = "2db6ffa8-e38f-5e21-84af-90c45d0032cc" +version = "1.11.0+0" + +[[deps.libfdk_aac_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] +git-tree-sha1 = "daacc84a041563f965be61859a36e17c4e4fcd55" +uuid = "f638f0a6-7fb0-5443-88ba-1cc74229b280" +version = "2.0.2+0" + +[[deps.libinput_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg", "eudev_jll", "libevdev_jll", "mtdev_jll"] +git-tree-sha1 = "ad50e5b90f222cfe78aa3d5183a20a12de1322ce" +uuid = "36db933b-70db-51c0-b978-0f229ee0e533" +version = "1.18.0+0" + +[[deps.libpng_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Zlib_jll"] +git-tree-sha1 = "93284c28274d9e75218a416c65ec49d0e0fcdf3d" +uuid = "b53b4c65-9356-5827-b1ea-8c7a1a84506f" +version = "1.6.40+0" + +[[deps.libvorbis_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Ogg_jll", "Pkg"] +git-tree-sha1 = "b910cb81ef3fe6e78bf6acee440bda86fd6ae00c" +uuid = "f27f6e37-5d2b-51aa-960f-b287f2bc3b7a" +version = "1.3.7+1" + +[[deps.mtdev_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] +git-tree-sha1 = "814e154bdb7be91d78b6802843f76b6ece642f11" +uuid = "009596ad-96f7-51b1-9f1b-5ce2d5e8a71e" +version = "1.1.6+0" [[deps.nghttp2_jll]] deps = ["Artifacts", "Libdl"] uuid = "8e850ede-7688-5339-a07c-302acd2aaf8d" -version = "1.48.0+0" +version = "1.52.0+1" [[deps.p7zip_jll]] deps = ["Artifacts", "Libdl"] uuid = "3f19e933-33d8-53b3-aaab-bd5110c3b7a0" -version = "17.4.0+0" +version = "17.4.0+2" + +[[deps.x264_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] +git-tree-sha1 = "4fea590b89e6ec504593146bf8b988b2c00922b2" +uuid = "1270edf5-f2f9-52d2-97e9-ab00b5d0237a" +version = "2021.5.5+0" + +[[deps.x265_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] +git-tree-sha1 = "ee567a171cce03570d77ad3a43e90218e38937a9" +uuid = "dfaa095f-4041-5dcd-9319-2fabd8486b76" +version = "3.5.0+0" + +[[deps.xkbcommon_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg", "Wayland_jll", "Wayland_protocols_jll", "Xorg_libxcb_jll", "Xorg_xkeyboard_config_jll"] +git-tree-sha1 = "9c304562909ab2bab0262639bd4f444d7bc2be37" +uuid = "d8fb68d0-12a3-5cfd-a85a-d49703b185fd" +version = "1.4.1+1" diff --git a/docs/Project.toml b/docs/Project.toml index 674e06ca..f892adcd 100644 --- a/docs/Project.toml +++ b/docs/Project.toml @@ -1,4 +1,7 @@ [deps] Copulas = "ae264745-0b69-425e-9d9d-cf662c5eec93" +Distributions = "31c24e10-a181-5473-b8eb-7969acd0382f" Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4" DocumenterCitations = "daee34ce-89f3-4625-b898-19384cb65244" +LiveServer = "16fef848-5104-11e9-1b77-fb7a48bbb589" +Plots = "91a5bcdd-55d7-5caf-9e0b-520d859cae80" diff --git a/docs/src/archimedean/generalities.md b/docs/src/archimedean/generalities.md index fa926cf8..a2016915 100644 --- a/docs/src/archimedean/generalities.md +++ b/docs/src/archimedean/generalities.md @@ -27,7 +27,7 @@ In this package, there is an abstract class [`Generator`](@ref) that contains th If you do not find the one you need, you may define it yourself by subtyping `Generator`. The API does not ask for much information, which is really convenient. Only the two following methods are required: * The `ϕ(G::MyGenerator,t)` function returns the value of the archimedean generator itself. -* The `max_monotony(G::MyGenerator)` returns its maximum monotony. +* The `max_monotony(G::MyGenerator)` returns its maximum monotony, that is the greater integer $d$ making the generator $d$-monotonous. Thus, a new generator implementation may simply look like: @@ -41,10 +41,39 @@ max_monotony(G::MyGenerator) = Inf !!! tip "Win-Win strategy" These two functions are enough to sample the corresponding Archimedean copula (see how in the [Inverse Williamson $d$-transforms](@ref w_trans_section) section of the documentation). However, if you know a bit more about your generator, implementing a few more simple methods can largely fasten the algorithms. You'll find more details on these methods in the [`Generator`](@ref) docstring. + +For example, Here is a graph of a few Clayton Generators: +```@example +using Copulas: ϕ,ClaytonGenerator,IndependentGenerator +using Plots +plot( x -> ϕ(ClaytonGenerator(-0.5),x), xlims=(0,5), label="ClaytonGenerator(-0.5)") +plot!(x -> ϕ(IndependentGenerator(),x), label="IndependentGenerator()") +plot!(x -> ϕ(ClaytonGenerator(0.5),x), label="ClaytonGenerator(0.5)") +plot!(x -> ϕ(ClaytonGenerator(1),x), label="ClaytonGenerator(1)") +plot!(x -> ϕ(ClaytonGenerator(5),x), label="ClaytonGenerator(5)") +``` + +And the corresponding inverse functions: + +```@example +using Copulas: ϕ⁻¹,ClaytonGenerator,IndependentGenerator +using Plots +plot( x -> ϕ⁻¹(ClaytonGenerator(-0.5),x), xlims=(0,1), ylims=(0,5), label="ClaytonGenerator(-0.5)") +plot!(x -> ϕ⁻¹(IndependentGenerator(),x), label="IndependentGenerator()") +plot!(x -> ϕ⁻¹(ClaytonGenerator(0.5),x), label="ClaytonGenerator(0.5)") +plot!(x -> ϕ⁻¹(ClaytonGenerator(1),x), label="ClaytonGenerator(1)") +plot!(x -> ϕ⁻¹(ClaytonGenerator(5),x), label="ClaytonGenerator(5)") +``` + ```@docs Generator ``` +Note that the rate at which these functions are reaching 0 (and their inverse reaching infinity on the left boundary) can vary a lot from one to the other. Note also that the difference between each of them is easier to grasp on the inverse plot. + + + + ## Williamson d-transform An easy way to construct new $d$-monotonous generators is the use of the Williamson $d$-transform. @@ -66,16 +95,12 @@ This function computes the Williamson d-transform of the provided random variabl More genrally, if you want your Archimedean copula to have a density, you have to use a generator that is more-monotonous that the dimension of your model. - - - ```@docs 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. 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]: @@ -96,6 +121,31 @@ The [`WilliamsonTransforms.jl`](https://github.com/lrnv/WilliamsonTransforms.jl) * Samples from the distribution via `rand(X,n)`. +As an example of a generator produced by the Williamson transformation and its inverse, we propose to construct a generator from a LogNormal distribution: + +```@example +using Distributions +using Copulas: i𝒲, ϕ⁻¹, IndependentGenerator +using Plots +G = i𝒲(LogNormal(), 2) +plot(x -> ϕ⁻¹(G,x), xlims=(0.1,0.9), label="G") +plot!(x -> ϕ⁻¹(IndependentGenerator(),x), label="Independence") +``` + +The `i𝒲` alias stands for `WiliamsonGenerator`. To stress the generality of the approach, remark that any positive distribution is allowed, including discrete ones: + +```@example +using Distributions +using Copulas: i𝒲, ϕ⁻¹ +using Plots +G1 = i𝒲(Binomial(10,0.3), 2) +G2 = i𝒲(Binomial(10,0.3), 3) +plot(x -> ϕ⁻¹(G1,x), xlims=(0.1,0.9), label="G1") +plot!(x -> ϕ⁻¹(G2,x), xlims=(0.1,0.9), label="G2") +``` + +As obvious from the definition of the Williamson transform, using a discrete distribution produces piecewise-linear generators, where the number of pieces is dependent on the order of the transformation. + ## Archimedean copulas Let's first define formally archimedean copulas: @@ -120,7 +170,21 @@ Archimedean copulas have a nice decomposition, called the Radial-simplex decompo > 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$. -This is why `williamson_dist(G::Generator,d)` is such an important function in the API: it allows to generator the radial part and sample the Archimedean copula. +This is why `williamson_dist(G::Generator,d)` is such an important function in the API: it allows to generator the radial part and sample the Archimedean copula. You may call this function directly to see what distribution will be used: + +```@example +using Copulas: williamson_dist, FrankCopula +williamson_dist(FrankCopula(3,7)) +``` + +For the Frank Copula, as for many classic copulas, the distribution used is known. We pull some of them from `Distributions.jl` but implement a few more, as this Logarithmic one. Another useful example are negatively-dependent Clayton copulas: + +```@example +using Copulas: williamson_dist, ClaytonCopula +williamson_dist(ClaytonCopula(3,-0.2)) +``` + +for which the corresponding distribution is known but has no particular name, thus we implemented it under the `ClaytonWilliamsonDistribution` name. !!! note "Frailty decomposition for completely monotonous generators" It is well-known that completely monotone generators are Laplace transforms of non-negative random variables. This gives rise to another decomposition: @@ -131,11 +195,21 @@ This is why `williamson_dist(G::Generator,d)` is such an important function in t The link between the distribution of $R$ and the distribution of $W$ can be explicited. We exploit this link and provide the `WilliamsonFromFrailty()` constructor that construct the distribution of $R$ from the distribution of $W$ and returns the corresponding `WilliamsonGenerator` from the frailty distribution itself. The corresponding ϕ is simply the laplace transform of $W$. This is another potential way of constructing new archimedean copulas ! + We use this fraily approach for several generators, since sometimes it is faster, including e.g. the Clayton one with positive dependence: + ```@example + using Copulas: williamson_dist, ClaytonCopula + williamson_dist(ClaytonCopula(3,10)) + ``` + ```@docs ArchimedeanCopula ``` + + ```@bibliography Pages = ["generalities.md"] Canonical = false diff --git a/docs/src/elliptical/generalities.md b/docs/src/elliptical/generalities.md index 91372f7e..2c21d958 100644 --- a/docs/src/elliptical/generalities.md +++ b/docs/src/elliptical/generalities.md @@ -4,7 +4,7 @@ CurrentModule = Copulas # [General Discussion](@id elliptical_copulas_header) ## Elliptical random vectors -The easiest families of copulas are the one derived from known families of random vectors, and the first presented one is, generally, the Elliptical family. +The easiest families of copulas are the one derived from known families of random vectors, and the first presented one are, generally, the Elliptical families (in particular, the Gaussian and Student families are very standard in the litterature). > **Definition (Spherical and elliptical random vectors):** A random vector $\bm X$ is said to be spherical if for all orthogonal matrix $\bm A \in O_d(\mathbb R)$, $\bm A\bm X \sim \bm X$. > @@ -22,7 +22,24 @@ This class contains the (multivariate) Normal and Student distributions, and it ```math \phi(\bm t) = \prod_{i=1}^n \phi_i(\bm t) = \prod_{i=1}^n \psi_i(\lVert \bm t \rVert_2^2) = \psi(\lVert \bm t \rVert_2^2), ``` -which is still a function of only the norm of $\bm t$. To fix ideas, for Gaussian random vectors, $\psi(t) = e^{-\frac{t^2}{2}}$. +which is still a function of only the norm of $\bm t$. + +To fix ideas, for Gaussian random vectors, $\psi(t) = e^{-\frac{t^2}{2}}$. + +!!! note "Sampling with `Distributions.jl`" + Elliptical random vectors in the Gaussian and Student families are available from `Distributions.jl`: + + ```@example 3 + using Distributions + Σ = [1 0.5 + 0.5 1] # variance-covariance matrix. + ν = 3 # number of degrees of freedom for the student. + N = MvNormal(Σ) + ``` + + ```@example 3 + T = MvTDist(ν,Σ) + ``` ## Elliptical copulas @@ -41,9 +58,60 @@ Moreover, the form of dependence structures that can be reached inside this clas On the other hand, there exist performant estimators of high-dimensional covariance matrices, and a large theory is built on the elliptical assumption of high dimensional random vectors, see e.g., [elidan2013,friedman2010,muller2019](@cite) among others. See also [derumigny2022](@cite) for a recent work on nonparametric estimation of the underlying univariate spherical distribution. -!!! note "Discrepancy with the code" +!!! note "Note on internal implementation" If the exposition we just did on characteristic functions of Elliptical random vectors is fundamental to the definition of elliptical copulas, the package does not use this at all to function, and rather rely on the existence of multivariate and corresponding univariate families of distributions in `Distributions.jl`. +You can obtain these elliptical copulas by the following code: +```julia +using Copulas +Σ = [1 0.5 + 0.5 1] # variance-covariance matrix. +ν = 3 # number of degrees of freedom for the student. +C_N = GaussianCopula(Σ) +C_T = TCopula(ν,Σ) +``` + +As already stated, the underlying code simply applies Sklar. In all generalities, you may define another elliptical copula by the following structure: + +```julia +struct MyElliptical{d,T} <: EllipticalCopula{d,T} + θ:T +end +U(::Type{MyElliptical{d,T}}) where {d,T} # Distribution of the univaraite marginals, Normal() for the Gaussian case. +N(::Type{MyElliptical{d,T}}) where {d,T} # Distribution of the mutlivariate random vector, MvNormal(\Sigma) for the Gaussian case. +``` + +However, not much other cases than the Gaussian and Elliptical one are really used in the literature. + +## Example + +To construct, e.g., a Student copula, you need to provide the Correlation matrix and the number of degree of freedom, as follows: + +```@example 4 +using Copulas, Distributions +Σ = [1 0.5 + 0.5 1] # variance-covariance matrix. +ν = 3 # number of degrees of freedom +C = TCopula(ν,Σ) +``` + +You can sample it and compute its density and distribution functions via the standard interface. We could try to fit a GaussianCopula on the sampled data, even if we already know that the tails will not be properly taken into account: + +```@example 4 +u = rand(C,1000) +Ĉ = fit(GaussianCopula,u) # to fit on the sampled data. +``` + +We see that the estimation we have on the correlation matrix is quite good, but rest assured that the tails of the distributions are not the same at all. To see that, let's plot the lower tail function (see [nelsen2006](@cite)) for both copulas: + +```@example 4 +using Plots +chi(C,u) = 2 * log(1-u) / log(1 - 2u + cdf(C,[u,u])) -1 +u = 0.5:0.03:0.99 +plot(u, chi.(Ref(C),u), label="True student copula") +plot!(u, chi.(Ref(Ĉ),u), label="Estimated Gaussian copula") +``` + ## Implementation ```@docs diff --git a/docs/src/examples/fitting_sklar.md b/docs/src/examples/fitting_sklar.md index c5545e88..ca0d4691 100644 --- a/docs/src/examples/fitting_sklar.md +++ b/docs/src/examples/fitting_sklar.md @@ -2,7 +2,7 @@ Through the `SklarDist` interface, there is the possibility to fit directly distributions that are constructed from a copula and some marginals: -```julia +```@example 5 using Copulas using Distributions @@ -14,14 +14,18 @@ X₄ = Normal() C = SurvivalCopula(FrankCopula(4,7),(2,4)) D = SklarDist(C,(X₁,X₂,X₃,X₄)) data = rand(D,1000) +``` -# The fit function uses a type as its first argument that describes the structure of the model : +The fit function uses a type as its first argument that describes the structure of the model : +```@example 5 MyCop = SurvivalCopula{4,ClaytonCopula,(2,4)} MyMargs = Tuple{LogNormal,Pareto,Gamma,Normal} MyD = SklarDist{MyCop, MyMargs} fitted_model = fit(MyD,data) +``` -# Another posisbility is to use an empirical copula and only fit the marginals: +Another possibility is to use an empirical copula and only fit the marginals: +```@example 5 other_fitted_model = fit(SklarDist{EmpiricalCopula,MyMargs},data) ``` diff --git a/docs/src/getting_started.md b/docs/src/getting_started.md index 2139d9d4..74e74eda 100644 --- a/docs/src/getting_started.md +++ b/docs/src/getting_started.md @@ -14,12 +14,13 @@ Consider a real valued random vector $\bm X = \left(X_1,...,X_d\right): \Omega \ !!! info "Constructing random variables in Julia via `Distributions.jl`" Recall that you can construct random variables in Julia by the following code : - ```julia + ```@example 1 using Distributions X₁ = Normal() # A standard gaussian random variable X₂ = Gamma(2,3) # A Gamma random variable X₃ = Pareto(1) # A Pareto random variable with no variance. X₄ = LogNormal(0,1) # A Lognormal random variable + nothing # hide ``` We refer to [Distributions.jl's documentation](https://github.com/JuliaStats/Distributions.jl) for more details on what you can do with these objects, but here we assume that you are familiar with their API. @@ -51,6 +52,24 @@ There is a fundamental functional link between the function $F$ and its marginal !!! note "Vocabulary" In this documentation but more largely in the literature, the term *Copula* refers both to the random vector and its distribution function. Usually, the distinction is clear from context. +You may define a copula object in Julia by simply calling its constructor: + +```@example 1 +using Copulas +d = 4 # The dimension of the model +θ = 7 # Parameter +C = ClaytonCopula(4,7) # A 4-dimensional clayton copula with parameter θ = 7. +``` + +This object is a random vector, and behaves exactly as you would expect a random vector from `Distributions.jl` to behave: you may sample it with `rand(C,100)`, compute its pdf or cdf with `pdf(C,x)` and `cdf(C,x)`, etc: + +```@example 1 +u = rand(C,10) +``` +```@example 1 +cdf(C,u) +``` + At the grounds of the theory of copulas lies Sklar's Theorem [sklar1959](@cite), dating back from 1959. > **Theorem (Sklar):** For every random vector $\bm X$, there exists a copula $C$ such that @@ -67,17 +86,29 @@ This result allows to decompose the distribution of $\bm X$ into several compone The independence copula can be constructed using the [`IndependentCopula(d)`](@ref IndependentGenerator) syntax as follows: -```julia -using Copulas -d = 4 # The dimension of the model -Π = IndependentCopula(d) +```@example 1 +Π = IndependentCopula(d) # A 4-variate independence structure. +nothing # hide ``` -And then the Sklar's theorem can be applied to it as follows, using the previously-defined marginals : +We leverage the Sklar theorem to construct multivariate random vectors from a copula-marginals specification. This can be used as follows: -```julia +```@example 1 MyDistribution = SklarDist(Π, (X₁,X₂,X₃,X₄)) +MyOtherDistribution = SklarDist(C, (X₁,X₂,X₃,X₄)) +nothing # hide +``` + +And the API is still the same: +```@example 1 +rand(MyDistribution,10) ``` +```@example 1 +rand(MyOtherDistribution,10) +``` + + +On the other hand, the [`pseudo()`](@ref Pseudo-observations) function computes ranks, effectively using Sklar's theorem the other way around (from the marginal space to the unit hypercube). !!! note "Independent random vectors" @@ -93,7 +124,15 @@ Copulas are bounded functions > **Example (Fréchet-Hoeffding bounds [lux2017](@cite)):** The function $M : \bm x \mapsto \min\bm x$, called the upper Fréchet-Hoeffding bound, is a copula. The function $W : \bm x \mapsto \langle \bm 1, \bm x - 1 + d^{-1}\rangle_{+}$, called the lower Fréchet-Hoeffding bound, is on the other hand a copula only when $d=2$. -These two copulas can be constructed through [`MCopula(d)`](@ref MGenerator) and [`WCopula(2)`](@ref WGenerator). The upper Fréchet-Hoeffding bound corresponds to the case of comonotone random vector: a random vector $\bm X$ is said to be comonotone, i.e., to have copula $M$, when each of its marginals can be written as a non-decreasing transformation of the same random variable (say with $\mathcal U\left([0,1]\right)$ distribution). This is a simple but important dependence structure. See e.g.,[kaas2002,hua2017](@cite) on this particular copula. +These two copulas can be constructed through [`MCopula(d)`](@ref MGenerator) and [`WCopula(2)`](@ref WGenerator). The upper Fréchet-Hoeffding bound corresponds to the case of comonotone random vector: a random vector $\bm X$ is said to be comonotone, i.e., to have copula $M$, when each of its marginals can be written as a non-decreasing transformation of the same random variable (say with $\mathcal U\left([0,1]\right)$ distribution). This is a simple but important dependence structure. See e.g.,[kaas2002,hua2017](@cite) on this particular copula. Note that sampling from them is quite straightforward due to their particular shape: + +```@example 1 +rand(MCopula(2),10) # sampled values are all equal, this is comonotony +``` +```@example 1 +u = rand(WCopula(2),10) +sum(u, dims=1) # sum is always equal to one, this is anticomonotony +``` Since copulas are distribution functions, like distribution functions of real-valued random variables and random vectors, there exists classical and useful parametric families of copulas. This is mostly the content of this package, and we refer to the rest of the documentation for more details on the models and their implementations. @@ -102,7 +141,7 @@ Since copulas are distribution functions, like distribution functions of real-va `Distributions.jl` proposes the `fit` function in their API for random ve tors and random variables. We used it to implement fitting of multivariate models (copulas, of course, but also compound distributions). It can be used as follows: -```julia +```@example 2 using Copulas, Distributions, Random X₁ = Gamma(2,3) X₂ = Pareto() @@ -116,6 +155,8 @@ simu = rand(D,1000) # Generate a dataset D̂ = fit(SklarDist{ClaytonCopula,Tuple{Gamma,Normal,LogNormal}}, simu) ``` +We see on the output that the parameters were correctly estimated from this sample. More details on the estimator, including e.g. standard errors, can be obtained from e.g., Bayesian approach, see [this example](@ref Bayesian-inference-with-Turing.jl). + !!! info "About fitting methods" [`Distributions.jl` documentation](https://juliastats.org/Distributions.jl/stable/fit/#Distribution-Fitting) states that : diff --git a/docs/src/index.md b/docs/src/index.md index 16404b8d..c2717491 100644 --- a/docs/src/index.md +++ b/docs/src/index.md @@ -22,7 +22,7 @@ The package revolves around two main types: - `Copula`, the abstract mother type of all copulas - `SklarDist`, the type for multivariate compound distribution through [Sklar's theorem](https://en.wikipedia.org/wiki/Copula_(probability_theory)#Sklar's_theorem). -## Instalation +## Installation The package is available on Julia's general registry, and can be installed as follows: diff --git a/docs/src/miscellaneous.md b/docs/src/miscellaneous.md index fb9fab89..c77c2459 100644 --- a/docs/src/miscellaneous.md +++ b/docs/src/miscellaneous.md @@ -20,7 +20,7 @@ Farlie-Gumbel-Morgenstern (FGM) copula FGMCopula ``` -# Raftery copula +# `RafteryCopula` ```@docs RafteryCopula diff --git a/docs/src/sklar.md b/docs/src/sklar.md index 6e6deea3..dd75f695 100644 --- a/docs/src/sklar.md +++ b/docs/src/sklar.md @@ -15,7 +15,7 @@ Recall the following theorem from [sklar1959](@cite): The implementation we have of this theorem allows building multivariate distributions by specifying separately their marginals and dependence structures as follows: -```julia +```@example 2 using Copulas, Distributions, Random X₁ = Gamma(2,3) X₂ = Pareto() @@ -24,6 +24,20 @@ C = ClaytonCopula(3,0.7) # A 3-variate Clayton Copula with θ = 0.7 D = SklarDist(C,(X₁,X₂,X₃)) # The final distribution ``` +Although the output is not formatted, the model is constructed, and can be used in different ways: + +```@example 2 +u = rand(D,10) +``` + +```@example 2 +pdf(D, u) +``` +```@example 2 +cdf(D, u) +``` + + From this construction, the object `D` is a genuine multivariate random vector following `Distributions.jl`'s API, and can be sampled (`rand()`), can have its probability density function and its distribution function evaluated (respectively `pdf` and `cdf`), etc. diff --git a/src/EllipticalCopula.jl b/src/EllipticalCopula.jl index 4cc072f0..b60b2f35 100644 --- a/src/EllipticalCopula.jl +++ b/src/EllipticalCopula.jl @@ -30,7 +30,17 @@ Recall that spherical random vectors are random vectors which characteristic fun We can therefore express this characteristic function as ``\\phi(\\bm t) = \\psi(\\lVert \\bm t \\rVert_2^2)``, where ``\\psi`` is a function that characterizes the spherical family, called the *generator* of the family. Any characteristic function that can be expressed as a function of the norm of its argument is the characteristic function of a spherical random vector, since ``\\lVert \\bm A \\bm t \\rVert_2 = \\lVert \\bm t \\rVert_2`` for any orthogonal matrix ``\\bm A``. -However, note that this is not how the underlying code is working, we do not check for validity of the proposed generator (we dont even use it) +However, note that this is not how the underlying code is working, we do not check for validity of the proposed generator (we dont even use it). You can construct such an elliptical family using simply Sklar: + +```julia +struct MyElliptical{d,T} <: EllipticalCopula{d,T} + θ:T +end +U(::Type{MyElliptical{d,T}}) where {d,T} # Distribution of the univaraite marginals, Normal() for the Gaussian case. +N(::Type{MyElliptical{d,T}}) where {d,T} # Distribution of the mutlivariate random vector, MvNormal(C.Σ) for the Gaussian case. +``` + +These two functions are enough to implement the rest of the interface. References: * [nelsen2006](@cite) Nelsen, Roger B. An introduction to copulas. Springer, 2006. diff --git a/src/EllipticalCopulas/GaussianCopula.jl b/src/EllipticalCopulas/GaussianCopula.jl index b299b40b..d2a120d0 100644 --- a/src/EllipticalCopulas/GaussianCopula.jl +++ b/src/EllipticalCopulas/GaussianCopula.jl @@ -21,16 +21,13 @@ It can be constructed in Julia via: C = GaussianCopula(Σ) ``` -The random number generation works as expected: +You can sample it, compute pdf and cdf, or even fit the distribution via: ```julia -rand(C,1000) -# or -Random.rand!(C,u) -``` - -And yo can fit the distribution via : -```julia -fit(GaussianCopula,data) +u = rand(C,1000) +Random.rand!(C,u) # other calling syntax for rng. +pdf(C,u) # to get the density +cdf(C,u) # to get the distribution function +Ĉ = fit(GaussianCopula,u) # to fit on the sampled data. ``` References: diff --git a/src/EllipticalCopulas/TCopula.jl b/src/EllipticalCopulas/TCopula.jl index 5676ceeb..cc51cb88 100644 --- a/src/EllipticalCopulas/TCopula.jl +++ b/src/EllipticalCopulas/TCopula.jl @@ -19,20 +19,18 @@ where ``F_{n,\\Sigma}`` is a cdf of a multivariate student random vector with co It can be constructed in Julia via: ```julia -C = TCopula(n,Σ) +C = TCopula(2,Σ) ``` -The random number generation works as expected: +You can sample it, compute pdf and cdf, or even fit the distribution via: ```julia -rand(C,1000) -# or -Random.rand!(C,u) +u = rand(C,1000) +Random.rand!(C,u) # other calling syntax for rng. +pdf(C,u) # to get the density +cdf(C,u) # to get the distribution function +Ĉ = fit(TCopula,u) # to fit on the sampled data. ``` -And yo can fit the distribution via : -```julia -fit(TCopula,data) -``` Except that currently it does not work since `fit(Distributions.MvTDist,data)` does not dispatch. diff --git a/src/Generator.jl b/src/Generator.jl index b2f3a26c..3e143249 100644 --- a/src/Generator.jl +++ b/src/Generator.jl @@ -22,7 +22,7 @@ We do not check algorithmically that the proposed generators are d-monotonous. I More methods can be implemented for performance, althouhg there are implement defaults in the package : -* `ϕ⁻¹( G::Generator, x)` gives the inverse function of teh generator. +* `ϕ⁻¹( G::Generator, x)` gives the inverse function of the generator. * `ϕ⁽¹⁾(G::Generator, t)` gives the first derivative. * `ϕ⁽ᵏ⁾(G::Generator, k, t)` gives the kth derivative. * `williamson_dist(G::Generator, d)` gives the Wiliamson d-transform of the generator, see [WilliamsonTransforms.jl](https://github.com/lrnv/WilliamsonTransforms.jl). diff --git a/src/MiscellaneousCopulas/SurvivalCopula.jl b/src/MiscellaneousCopulas/SurvivalCopula.jl index 58c9ee81..56799e34 100644 --- a/src/MiscellaneousCopulas/SurvivalCopula.jl +++ b/src/MiscellaneousCopulas/SurvivalCopula.jl @@ -1,7 +1,4 @@ """ -SurvivalCopula{d,CT,VI} - -Constructor SurvivalCopula(C,indices) From 8655de576a82e2f0c4e34a2d8cc3b92fd93d5d65 Mon Sep 17 00:00:00 2001 From: Oskar Laverny Date: Mon, 19 Feb 2024 15:53:57 +0100 Subject: [PATCH 5/6] [Docs] Reorganize the docs (#158) Fixes #157 --- docs/make.jl | 30 +++++++++++------------- docs/src/Liouville.md | 2 +- docs/src/archimedean/available_models.md | 2 +- docs/src/elliptical/available_models.md | 2 +- docs/src/elliptical/generalities.md | 7 +++--- docs/src/empirical/available_models.md | 2 +- docs/src/sklar.md | 2 +- 7 files changed, 23 insertions(+), 24 deletions(-) diff --git a/docs/make.jl b/docs/make.jl index 344f0fea..ad09a2ff 100644 --- a/docs/make.jl +++ b/docs/make.jl @@ -22,31 +22,29 @@ makedocs(; collapselevel=3, ), pages=[ - "Copulas.jl package" => "index.md", - "Getting Started" => "getting_started.md", - "Sklar's Distributions" => "sklar.md", - "Elliptical Copulas" => [ - "elliptical/generalities.md", - "elliptical/available_models.md", + "Home" => "index.md", + "Manual" => [ + "Getting Started" => "getting_started.md", + "Sklar's Distributions" => "sklar.md", + "Elliptical Copulas" => "elliptical/generalities.md", + "Archimedean Copulas" => "archimedean/generalities.md", + "Liouville Copulas" => "Liouville.md", + "Empirical Copulas" => "empirical/generalities.md", + "Dependence measures" => "dependence_measures.md", ], - "Archimedean Copulas" => [ - "archimedean/generalities.md", + + "Bestiary" => [ + "elliptical/available_models.md", "archimedean/available_models.md", - ], - "Liouville Copulas" => "Liouville.md", - "Other Copulas" => "miscellaneous.md", - "Transformed Copulas" => "transformations.md", - "Empirical Copulas" => [ - "empirical/generalities.md", "empirical/available_models.md", + "Other Copulas" => "miscellaneous.md", + "Transformed Copulas" => "transformations.md", ], - "Dependence measures" => "dependence_measures.md", "Examples" => [ "examples/fitting_sklar.md", "examples/turing.md", "examples/other_usecases.md" ], - "Dev Roadmap" => "dev_roadmap.md", "Package Index" => "idx.md", "References" => "references.md", diff --git a/docs/src/Liouville.md b/docs/src/Liouville.md index 23b92b07..c5434911 100644 --- a/docs/src/Liouville.md +++ b/docs/src/Liouville.md @@ -2,7 +2,7 @@ CurrentModule = Copulas ``` -## Liouville Copulas +# Liouville Copulas !!! note "Not merged yet !" Liouville copulas are coming in this PR : https://github.com/lrnv/Copulas.jl/pull/83, but this is not merged yet. diff --git a/docs/src/archimedean/available_models.md b/docs/src/archimedean/available_models.md index 473ee44a..0cad0372 100644 --- a/docs/src/archimedean/available_models.md +++ b/docs/src/archimedean/available_models.md @@ -2,7 +2,7 @@ CurrentModule = Copulas ``` -# [Available Models](@id available_archimedean_models) +# [Archimedean Generators](@id available_archimedean_models) ## `WilliamsonGenerator` ```@docs; canonical=false diff --git a/docs/src/elliptical/available_models.md b/docs/src/elliptical/available_models.md index d280c8b1..763c594a 100644 --- a/docs/src/elliptical/available_models.md +++ b/docs/src/elliptical/available_models.md @@ -2,7 +2,7 @@ CurrentModule = Copulas ``` -# Available models +# Elliptical Copulas ## `GaussianCopula` diff --git a/docs/src/elliptical/generalities.md b/docs/src/elliptical/generalities.md index 2c21d958..6d182552 100644 --- a/docs/src/elliptical/generalities.md +++ b/docs/src/elliptical/generalities.md @@ -1,8 +1,8 @@ ```@meta CurrentModule = Copulas ``` -# [General Discussion](@id elliptical_copulas_header) -## Elliptical random vectors +# [Elliptical Copulas](@id elliptical_copulas_header) + The easiest families of copulas are the one derived from known families of random vectors, and the first presented one are, generally, the Elliptical families (in particular, the Gaussian and Student families are very standard in the litterature). @@ -41,7 +41,7 @@ To fix ideas, for Gaussian random vectors, $\psi(t) = e^{-\frac{t^2}{2}}$. T = MvTDist(ν,Σ) ``` -## 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: ```math @@ -61,6 +61,7 @@ On the other hand, there exist performant estimators of high-dimensional covaria !!! note "Note on internal implementation" If the exposition we just did on characteristic functions of Elliptical random vectors is fundamental to the definition of elliptical copulas, the package does not use this at all to function, and rather rely on the existence of multivariate and corresponding univariate families of distributions in `Distributions.jl`. + You can obtain these elliptical copulas by the following code: ```julia using Copulas diff --git a/docs/src/empirical/available_models.md b/docs/src/empirical/available_models.md index 078a9ebb..fb333cdb 100644 --- a/docs/src/empirical/available_models.md +++ b/docs/src/empirical/available_models.md @@ -2,7 +2,7 @@ CurrentModule = Copulas ``` -# Available Models +# Empirical Copulas ## `EmpiricalCopula` diff --git a/docs/src/sklar.md b/docs/src/sklar.md index dd75f695..0a748bc8 100644 --- a/docs/src/sklar.md +++ b/docs/src/sklar.md @@ -2,7 +2,7 @@ CurrentModule = Copulas ``` -# Sklar's Theorem +# Sklar's Distribution Recall the following theorem from [sklar1959](@cite): From c6976cf947b3dca45de69e270515183c4de75539 Mon Sep 17 00:00:00 2001 From: Oskar Laverny Date: Mon, 19 Feb 2024 16:34:56 +0100 Subject: [PATCH 6/6] [Docs] Proofreading (#159) --- docs/src/getting_started.md | 35 +++++++++++++++++------------------ docs/src/index.md | 1 - 2 files changed, 17 insertions(+), 19 deletions(-) diff --git a/docs/src/getting_started.md b/docs/src/getting_started.md index 74e74eda..37bff82b 100644 --- a/docs/src/getting_started.md +++ b/docs/src/getting_started.md @@ -4,11 +4,10 @@ CurrentModule = Copulas ## Multivariate random vectors -This section gives some general definitions and tools about dependence structures. Along this journey through the mathematical theory of copulas, we link to the rest of the documentation for more specific and detailed arguments on particular points, or simply to link the technical documentation of our implementation. - -The interested theoretical reader can take a look at the standard books on the subject [joe1997,cherubini2004,nelsen2006,joe2014](@cite) or more recently [mai2017, durante2015a, czado2019,grosser2021](@cite). We start here by defining a few concepts about dependence structures and copulas. - +This section gives some general definitions and tools about dependence structures, multivariate random vectors and copulas. Along this journey through the mathematical theory of copulas, we link to the rest of the documentation for more specific and detailed arguments on particular points, or simply to the technical documentation of the actual implementation. +The interested theoretical reader can take a look at the standard books on the subject [joe1997,cherubini2004,nelsen2006,joe2014](@cite) or more recently [mai2017, durante2015a, czado2019,grosser2021](@cite). +We start here by defining a few concepts about dependence structures and copulas. Consider a real valued random vector $\bm X = \left(X_1,...,X_d\right): \Omega \to \mathbb R^d$. The random variables $X_1,...,X_d$ are called the marginals of the random vector $\bm X$. !!! info "Constructing random variables in Julia via `Distributions.jl`" @@ -23,10 +22,10 @@ Consider a real valued random vector $\bm X = \left(X_1,...,X_d\right): \Omega \ nothing # hide ``` - We refer to [Distributions.jl's documentation](https://github.com/JuliaStats/Distributions.jl) for more details on what you can do with these objects, but here we assume that you are familiar with their API. + We refer to [Distributions.jl's documentation](https://github.com/JuliaStats/Distributions.jl) for more details on what you can do with these objects. We assume here that you are familiar with their API. -The distribution of the random vector $\bm X$ can be characterized by its distribution function $F$: +The probability distribution of the random vector $\bm X$ can be characterized by its *distribution function* $F$: ```math \begin{align*} F(\bm x) &= \mathbb P\left(\bm X \le \bm x\right)\\ @@ -70,7 +69,7 @@ u = rand(C,10) cdf(C,u) ``` -At the grounds of the theory of copulas lies Sklar's Theorem [sklar1959](@cite), dating back from 1959. +One of the reasons that makes copulas so useful is discovered by Sklar [sklar1959](@cite) in 1959: > **Theorem (Sklar):** For every random vector $\bm X$, there exists a copula $C$ such that > @@ -112,19 +111,19 @@ On the other hand, the [`pseudo()`](@ref Pseudo-observations) function computes !!! note "Independent random vectors" - Distributions.jl proposes the [`product_distribution`](https://juliastats.org/Distributions.jl/stable/multivariate/#Product-distributions) function to create those independent random vectors with given marginals. But you'll see that our approach is much more powerfull. + Distributions.jl proposes the [`product_distribution`](https://juliastats.org/Distributions.jl/stable/multivariate/#Product-distributions) function to create those independent random vectors with given marginals. But you can already see that our approach generalizes to other dependence structres, and is thus much powerfull. -Copulas are bounded functions +Copulas are bounded functions with values in [0,1] since they correspond to probabilities. But their range can be bounded more precisely: > **Property (Fréchet-Hoeffding bounds [lux2017](@cite)):** For all $\bm x \in [0,1]^d$, every copula $C$ satisfies : > >$\langle \bm 1, \bm x - 1 + d^{-1}\rangle_{+} \le C(\bm x) \le \min \bm x,$ >where $y_{+} = \max(0,y)$. -> **Example (Fréchet-Hoeffding bounds [lux2017](@cite)):** The function $M : \bm x \mapsto \min\bm x$, called the upper Fréchet-Hoeffding bound, is a copula. The function $W : \bm x \mapsto \langle \bm 1, \bm x - 1 + d^{-1}\rangle_{+}$, called the lower Fréchet-Hoeffding bound, is on the other hand a copula only when $d=2$. +The function $M : \bm x \mapsto \min\bm x$, called the upper Fréchet-Hoeffding bound, is a copula. The function $W : \bm x \mapsto \langle \bm 1, \bm x - 1 + d^{-1}\rangle_{+}$, called the lower Fréchet-Hoeffding bound, is on the other hand a copula only when $d=2$. +These two copulas can be constructed through [`MCopula(d)`](@ref MGenerator) and [`WCopula(2)`](@ref WGenerator). - -These two copulas can be constructed through [`MCopula(d)`](@ref MGenerator) and [`WCopula(2)`](@ref WGenerator). The upper Fréchet-Hoeffding bound corresponds to the case of comonotone random vector: a random vector $\bm X$ is said to be comonotone, i.e., to have copula $M$, when each of its marginals can be written as a non-decreasing transformation of the same random variable (say with $\mathcal U\left([0,1]\right)$ distribution). This is a simple but important dependence structure. See e.g.,[kaas2002,hua2017](@cite) on this particular copula. Note that sampling from them is quite straightforward due to their particular shape: +The upper Fréchet-Hoeffding bound corresponds to the case of comonotone random vector: a random vector $\bm X$ is said to be comonotone, i.e., to have copula $M$, when each of its marginals can be written as a non-decreasing transformation of the same random variable (say with $\mathcal U\left([0,1]\right)$ distribution). This is a simple but important dependence structure. See e.g.,[kaas2002,hua2017](@cite) on this particular copula. Note that the implementation of their sampler was straightforward due to their particular shapes: ```@example 1 rand(MCopula(2),10) # sampled values are all equal, this is comonotony @@ -138,11 +137,11 @@ Since copulas are distribution functions, like distribution functions of real-va ## Fitting copulas and compound distributions. -`Distributions.jl` proposes the `fit` function in their API for random ve tors and random variables. We used it to implement fitting of multivariate models (copulas, of course, but also compound distributions). It can be used as follows: - +`Distributions.jl`'s API contains a `fit` function for random vectors and random variables. We propose an implementation of it for copulas and multivariate compound distributions (composed of a copula and some given marginals). It can be used as follows: ```@example 2 using Copulas, Distributions, Random +# Construct a given model: X₁ = Gamma(2,3) X₂ = Pareto() X₃ = LogNormal(0,1) @@ -155,14 +154,14 @@ simu = rand(D,1000) # Generate a dataset D̂ = fit(SklarDist{ClaytonCopula,Tuple{Gamma,Normal,LogNormal}}, simu) ``` -We see on the output that the parameters were correctly estimated from this sample. More details on the estimator, including e.g. standard errors, can be obtained from e.g., Bayesian approach, see [this example](@ref Bayesian-inference-with-Turing.jl). +We see on the output that the parameters were correctly estimated from this sample. More details on the estimator, including, e.g., standard errors, may be obtained with more complicated estimation routines. For a Bayesian approach using `Turing.jl`, see [this example](@ref Bayesian-inference-with-Turing.jl). -!!! info "About fitting methods" - [`Distributions.jl` documentation](https://juliastats.org/Distributions.jl/stable/fit/#Distribution-Fitting) states that : +!!! info "Fitting procedures are not part of the API" + [`Distributions.jl` documentation](https://juliastats.org/Distributions.jl/stable/fit/#Distribution-Fitting) states that: > The fit function will choose a reasonable way to fit the distribution, which, in most cases, is maximum likelihood estimation. - The results of this fitting function should then only be used as "quick-and-dirty" fits, since the fitting method is "hidden" to the user. We embrace this philosophy: from one copula to the other, the fitting method might not be the same. + The results of this fitting function should then only be used as "quick-and-dirty" fits, since the fitting method is "hidden" to the user and might even change without breaking releases. We embrace this philosophy: from one copula to the other, the fitting method might not be the same. ## Going further diff --git a/docs/src/index.md b/docs/src/index.md index c2717491..1dcf7f5c 100644 --- a/docs/src/index.md +++ b/docs/src/index.md @@ -13,7 +13,6 @@ The [Copulas.jl](https://github.com/lrnv/Copulas.jl) package provides a large co Since copulas are distribution functions, we fully comply with the [`Distributions.jl`](https://github.com/JuliaStats/Distributions.jl) API. This compliance allows direct interoperability with other packages based on this API such as, e.g., [`Turing.jl`](https://github.com/TuringLang/Turing.jl). Usually, people that use and work with copulas turn to the `R` package [`copula`](https://cran.r-project.org/web/packages/copula/copula.pdf). While still well-maintained and regularly updated, the `R` package `copula` is a complicated code base for readability, extensibility, reliability, and maintenance. - This is an attempt to provide a very light, fast, reliable and maintainable copula implementation in native Julia. Among others, one of the notable benefits of such a native implementation is the floating point type agnosticism, i.e., compatibility with `BigFloat`, [`DoubleFloats`](https://github.com/JuliaMath/DoubleFloats.jl), [`MultiFloats`](https://github.com/dzhang314/MultiFloats.jl) and other kind of numbers.