predict.kdecopula {kdecopula}R Documentation

Prediction method for kdecop() fits

Description

Predicts the pdf, cdf, or (inverse) h-functions by calling dkdecop(), pkdecop(), or hkdecop().

Usage

## S3 method for class 'kdecopula'
predict(object, newdata, what = "pdf", stable = FALSE,
  ...)

Arguments

object

an object of class kdecopula.

newdata

evaluation point(s), a length two vector or a matrix with two columns.

what

what to predict, one of c("pdf", "cdf", "hfunc1", "hfunc2", "hinv1", "hinv2").

stable

only used for what = "pdf", see dkdecop().

...

unused.

Value

A numeric vector of predictions.

Examples

data(wdbc)
udat <- apply(wdbc[, -1], 2, function(x) rank(x) / (length(x) + 1))
fit <- kdecop(udat[, 5:6])

all.equal(predict(fit, c(0.1, 0.2)), dkdecop(c(0.1, 0.2), fit))
all.equal(predict(fit, udat, "hfunc1"), hkdecop(udat, fit, cond.var = 1))

[Package kdecopula version 0.9.2 Index]