Learn R Programming

RTMBdist (version 0.1.0)

cfrank: Frank copula constructor

Description

Returns a function computing the log density of the bivariate Frank copula, intended to be used with dcopula.

Usage

cfrank(theta)

Value

Function of two arguments (u,v) returning log copula density.

Arguments

theta

Dependence parameter (\(\theta = 0\)).

Details

The Frank copula density is $$ c(u,v;\theta) = \frac{\theta (1-e^{-\theta}) e^{-\theta(u+v)}} {\left[(e^{-\theta u}-1)(e^{-\theta v}-1) + (1 - e^{-\theta}) \right]^2}, \quad \theta \ne 0. $$

See Also

cgaussian(), cclayton(), cgumbel()

Examples

Run this code
x <- c(0.5, 1); y <- c(1, 2)
d1 <- dnorm(x, 1, log = TRUE); d2 <- dexp(y, 2, log = TRUE)
p1 <- pnorm(x, 1); p2 <- pexp(y, 2)
dcopula(d1, d2, p1, p2, copula = cfrank(2), log = TRUE)

Run the code above in your browser using DataLab