Learn R Programming

VineCopula (version 1.6-1)

BiCopDeriv: Derivatives of a Bivariate Copula Density

Description

This function evaluates the derivative of a given parametric bivariate copula density with respect to its parameter(s) or one of its arguments.

Usage

BiCopDeriv(u1, u2, family, par, par2 = 0, deriv = "par", log = FALSE, obj = NULL)

Arguments

u1,u2
Numeric vectors of equal length with values in [0,1].
family
An integer defining the bivariate copula family: 0 = independence copula 1 = Gaussian copula 2 = Student t copula (t-copula) 3 = Clayton copula 4 = Gumbel copula 5 = Frank
par
Copula parameter.
par2
Second parameter for bivariate t-copula; default: par2 = 0.
deriv
Derivative argument "par" = derivative with respect to the first parameter (default) "par2" = derivative with respect to the second parameter (only available for the t-copula) "u1" = derivative with respect to the
log
Logical; if TRUE than the derivative of the log-likelihood is returned (default: log = FALSE; only available for the derivatives with respect to the parameter(s) (deriv = "par" or deriv = "par2")).
obj
BiCop object containing the family and parameter specification.

Value

  • A numeric vector of the bivariate copula derivative with respect to deriv evaluated at u1 and u2 with parameter(s) par and par2.

Details

If the family and parameter specification is stored in a BiCop object obj, the alternative version BiCopDeriv(u1, u2, obj, deriv = "par", log = FALSE) can be used.

References

Schepsmeier, U. and J. Stoeber (2012). Derivatives and Fisher information of bivariate copulas. Statistical Papers. http://link.springer.com/article/10.1007/s00362-013-0498-x.

See Also

RVineGrad, RVineHessian, BiCopDeriv2, BiCopHfuncDeriv, BiCop

Examples

Run this code
## simulate from a bivariate t-copula
simdata <- BiCopSim(300, 2, -0.7, par2 = 4)

## derivative of the bivariate t-copula with respect to the first parameter
u1 <- simdata[,1]
u2 <- simdata[,2]
BiCopDeriv(u1, u2, 2, -0.7, par2 = 4, deriv = "par")

## estimate a bivariate copula from the data
## and evaluate its derivative w.r.t. the parameter
cop <- BiCopEst(u1, u2, family = 2)
BiCopDeriv(u1, u2, cop, deriv = "par")

Run the code above in your browser using DataLab