Helpful Stan Functions
|
Functions | |
real | clayton_copula_lpdf (real u, real v, real theta) |
The Clayton copula bivariate cumulative density function is defined as
\[ C(u,v) = (u^{-\theta} + v^{-\theta} - 1)^{-1/\theta} \]
for \(0 < \theta < \infty\).
The Clayton copula bivariate probability density function is defined as
\[ c(u, v) = \frac{ \partial^2 C(u, v) }{ \partial u \partial v} = (\theta + 1)(uv)^{-(\theta + 1)}(u^{-\theta} + v^{-\theta} - 1)^{-\frac{2 \theta + 1}{\theta}} \]
real clayton_copula_lpdf | ( | real | u, |
real | v, | ||
real | theta | ||
) |
Clayton Bivariate Copula Log Density
Stan Example: clayton_copula_example.stan
R: clayton_example.R
Copyright Andre Pfeuffer, Sean Pinkney
https://groups.google.com/g/stan-users/c/hnUtkMYlLhQ/m/XdX3u1vDAAAJ
Accessed and modified Feb. 5, 2021
The copula is defined \(0 < \theta < \infty\)
u | Real number on \((0,1]\), not checked but function will return NaN |
v | Real number on \((0,1]\), not checked but function will return NaN |
theta | Real number on (0, Inf) |
reject | if theta \(\le 0\) |