pub struct ArchimedeanCopula { /* private fields */ }Expand description
An exchangeable d-dimensional Archimedean copula with generator
ψ_θ, sampled by Marshall and Olkin’s frailty method: draw a frailty
V (whose Laplace transform is ψ), then d unit exponentials E_j,
and return u_j = ψ(E_j / V).
| Family | ψ(t) | Frailty V | θ | Kendall’s tau |
|---|---|---|---|---|
| Clayton | (1 + t)^(-1/θ) | Gamma(1/θ) | > 0 | θ / (θ + 2) |
| Gumbel | exp(-t^(1/θ)) | positive stable(1/θ) | >= 1 | 1 - 1/θ |
| Frank | -ln(1 - (1 - e^-θ) e^-t) / θ | logarithmic(1 - e^-θ) | > 0 | 1 + 4 (D_1(θ) - 1) / θ |
| Joe | 1 - (1 - e^-t)^(1/θ) | Sibuya(1/θ) | >= 1 | 1 - 4 Σ_k 1 / (k (θk + 2)(θ(k - 1) + 2)) |
Clayton has lower-tail dependence 2^(-1/θ); Gumbel and Joe have
upper-tail dependence 2 - 2^(1/θ); Frank has none. Draws use the
frailty first, then the exponentials, all from the simulation’s stream.
use prospicio_core::StreamRng;
use prospicio_prob::copula::{Archimedean, ArchimedeanCopula, Copula};
// Clayton with tau = 0.5.
let c = ArchimedeanCopula::new(Archimedean::Clayton, 2.0, 3).unwrap();
let mut u = [0.0; 3];
c.sample(&mut StreamRng::new(1, 0), &mut u);
assert!(u.iter().all(|&x| x > 0.0 && x < 1.0));Implementations§
Trait Implementations§
Source§impl Clone for ArchimedeanCopula
impl Clone for ArchimedeanCopula
Source§fn clone(&self) -> ArchimedeanCopula
fn clone(&self) -> ArchimedeanCopula
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Copula for ArchimedeanCopula
impl Copula for ArchimedeanCopula
Source§impl Debug for ArchimedeanCopula
impl Debug for ArchimedeanCopula
Source§impl PartialEq for ArchimedeanCopula
impl PartialEq for ArchimedeanCopula
impl StructuralPartialEq for ArchimedeanCopula
Auto Trait Implementations§
impl Freeze for ArchimedeanCopula
impl RefUnwindSafe for ArchimedeanCopula
impl Send for ArchimedeanCopula
impl Sync for ArchimedeanCopula
impl Unpin for ArchimedeanCopula
impl UnsafeUnpin for ArchimedeanCopula
impl UnwindSafe for ArchimedeanCopula
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more