hkdecop: H-function and inverse of a 'kdecop()' fit

Description Usage Arguments Value Author(s) Examples

Description

Evaluates the h-function (or its inverse) corresponding to a kdecopula object. H-functions are conditional distribution functions obtained by integrating the copula density w.r.t. to one of its arguments (see also VineCopula::BiCopHfunc().

Usage

1
hkdecop(u, obj, cond.var, inverse = FALSE)

Arguments

u

n x 2 matrix of evaluation points.

obj

kdecopula object.

cond.var

integer; cond.var = 1 conditions on the first variable, cond.var = 2 on the second.

inverse

logical; indicates whether the h-function or its inverse shall be calculated.

Value

A length n vector of the (inverse) h-function evaluated at u.

Author(s)

Thomas Nagler

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
## load data and transform with empirical cdf
data(wdbc)
udat <- apply(wdbc[, -1], 2, function(x) rank(x) / (length(x) + 1))

## estimation of copula density of variables 5 and 6
fit <- kdecop(udat[, 5:6])
plot(fit) 

## evaluate h-function estimate and its inverse at (u1|u2) = (0.123 | 0.321)
hkdecop(c(0.123, 0.321), fit, cond.var = 2) 
hkdecop(c(0.123, 0.321), fit, cond.var = 2, inverse = TRUE) 

kdecopula documentation built on May 2, 2019, 1:06 a.m.