| ddcopula | R Documentation |
Computes the joint probability mass function of two discrete margins combined with a copula CDF.
ddcopula(d1, d2, p1, p2, Copula, log = FALSE)
d1, d2 |
Marginal p.m.f. values at the observed points, not on log-scale. |
p1, p2 |
Marginal CDF values at the observed points. |
Copula |
A function of two arguments returning the copula CDF. |
log |
Logical; if |
The joint probability mass function for two discrete margins is
\Pr(Y_1 = y_1, Y_2 = y_2) =
C(F_1(y_1), F_2(y_2))
- C(F_1(y_1-1), F_2(y_2))
- C(F_1(y_1), F_2(y_2-1))
+ C(F_1(y_1-1), F_2(y_2-1)),
where F_i are the marginal CDFs, and C is the copula CDF.
Available copula CDF constructors are:
Cclayton (Clayton copula)
Cgumbel (Gumbel copula)
Cfrank (Frank copula)
Joint probability (or log-probability) under chosen copula
dcopula(), dmvcopula()
x <- c(3,5); y <- c(2,4)
d1 <- dpois(x, 4); d2 <- dpois(y, 3)
p1 <- ppois(x, 4); p2 <- ppois(y, 3)
ddcopula(d1, d2, p1, p2, Copula = Cclayton(2), log = FALSE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.