Learn R Programming

VineCopula (version 1.6-1)

BiCopPDF: Density of a Bivariate Copula

Description

This function evaluates the probability density function (PDF) of a given parametric bivariate copula.

Usage

BiCopPDF(u1, u2, family, par, par2 = 0, 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 the two parameter t-, BB1, BB6, BB7, BB8, Tawn type 1 and type 2 copulas (default: par2 = 0).
obj
BiCop object containing the family and parameter specification.

Value

  • A numeric vector of the bivariate copula density evaluated at u1 and u2.

Details

If the family and parameter specification is stored in a BiCop object obj, the alternative version BiCopPDF(u1, u2, obj) can be used.

See Also

BiCopCDF, BiCopHfunc, BiCopSim, BiCop

Examples

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

## evaluate the density of the bivariate t-copula
u1 <- simdata[,1]
u2 <- simdata[,2]
BiCopPDF(u1, u2, 2, -0.7, par2 = 4)

## estimate a bivariate copula from the data and evaluate its PDF
cop <- BiCopSelect(u1, u2)
round(BiCopPDF(u1, u2, cop), 8)

Run the code above in your browser using DataLab