Learn R Programming

rvinecopulib (version 0.3.2.1.1)

bicop_predict_and_fitted: Predictions and fitted values for a bivariate copula model

Description

Predictions of the density, distribution function, h-functions (with their inverses) for a bivariate copula model.

Usage

# S3 method for bicop
predict(object, newdata, what = "pdf", ...)

# S3 method for bicop fitted(object, what = "pdf", ...)

Arguments

object

a bicop object.

newdata

points where the fit shall be evaluated.

what

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

...

unused.

Value

fitted() and logLik() have return values similar to dbicop(), pbicop(), and hbicop().

Details

fitted() can only be called if the model was fit with the keep_data = TRUE option.

Examples

Run this code
# NOT RUN {
# Simulate and fit a bivariate copula model
u <- rbicop(500, "gauss", 0, 0.5)
fit <- bicop(u, "par", keep_data = TRUE)

# Predictions
all.equal(predict(fit, u, "hfunc1"), fitted(fit, "hfunc1"))
# }

Run the code above in your browser using DataLab