Learn R Programming

cylcop (version 0.2.0)

ccylcop: Conditional Distributions of Circular-Linear Copulas

Description

Calculates the conditional distributions and their inverses of circular-linear copulas and 2-dimensional linear-linear copulas.

Usage

ccylcop(u, copula, cond_on = 2, inverse = FALSE, ...)

# S4 method for Copula ccylcop(u, copula, cond_on, inverse)

# S4 method for cyl_cubsec ccylcop(u, copula, cond_on = 2, inverse = FALSE)

# S4 method for cyl_quadsec ccylcop(u, copula, cond_on = 2, inverse = FALSE)

# S4 method for cyl_rect_combine ccylcop(u, copula, cond_on = 2, inverse = FALSE)

# S4 method for cyl_rot_combine ccylcop(u, copula, cond_on = 2, inverse = FALSE)

# S4 method for cyl_vonmises ccylcop(u, copula, cond_on = 2, inverse = FALSE)

Value

A vector containing the values of the distribution of the copula at u[,-cond_on] conditional on the values of u[,cond_on].

Arguments

u

matrix (or vector) of numeric values in \([0,1]^2\), containing as first column the circular (periodic) and as second the linear dimension.

copula

R object of class 'cyl_copula'. or 'Copula' (package 'copula', only 2-dimensional).

cond_on

column number of u on which the copula is conditioned. E.g if cond_on = 2, the function calculates for each element in the first column of u the copula conditional on the corresponding element in the second column.

inverse

logical indicating whether the inverse of the conditional copula is calculated.

...

additional arguments.

Details

This is a generic that calls the function copula::cCopula() for 2-dimensional 'Copula' objects from the 'copula' package for which copula::cCopula() is available. If copula::cCopula() is not available, the conditional copula is calculated numerically. For 'cyl_copula' objects, the conditional copula is calculated analytically or numerically (depending on the copula and the values of u). Note that the input arguments and the output of cylcop::ccylcop() differ from those of copula::cCopula().

References

Nelsen2006cylcop

Hodelmethodcylcop

See Also

copula::cCopula()

Examples

Run this code
cop <- cyl_quadsec(0.1)
#calculate C_u(v) with u = 0.1 and v = 0.5
cylcop::ccylcop(u = c(0.1, 0.5), copula = cop, cond_on = 1, inverse = FALSE)
#calculate C^-1_v(u) with u = 0.1 and v = 0.5 and with u = 0.4 and v = 0.2
cylcop::ccylcop(u = rbind(c(0.1, 0.5), c(0.4, 0.2)), copula = cop, cond_on = 2, inverse = TRUE)

Run the code above in your browser using DataLab