Learn R Programming

rvinecopulib

rvinecopulib provides high-performance tools for bivariate and vine copula models. It covers model construction, estimation and selection, simulation, prediction, visualization, discrete and mixed data, and full multivariate distributions with fitted margins. The package is the R interface to the vinecopulib C++ library.

Main capabilities

Installation

Install the stable release from CRAN:

install.packages("rvinecopulib")

Install the development version from GitHub:

remotes::install_github("vinecopulib/rvinecopulib")

Examples

rvinecopulib exposes the same modeling framework at three levels:

Starting pointMain functionModel
Two uniform variablesbicop()One bivariate copula
Uniform pseudo-observationsvinecop()Dependence only
Observations on their original scalevine()Margins and dependence

A bivariate copula

bicop() fits and selects a copula model for two uniform variables. Fixed models can be created with bicop_dist().

u <- rbicop(200, family = "clayton", rotation = 90, parameters = 2)
bivariate_fit <- bicop(u, family_set = "par")
summary(bivariate_fit)

dbicop(u[1:5, ], bivariate_fit)
tail_dep(bivariate_fit)

See the bivariate-copula article for implemented families, rotations, h-functions, dependence measures, and selection controls.

A vine copula on the copula scale

pseudo_obs() converts continuous observations to approximately uniform scores. vinecop() then selects the vine structure, pair-copula families, and parameters.

u <- pseudo_obs(as.matrix(USArrests))
copula_fit <- vinecop(u, family_set = "onepar")
summary(copula_fit)

simulated_u <- rvinecop(100, copula_fit)
dvinecop(simulated_u[1:5, ], copula_fit)

See the vine-copula article for structure construction, selection, truncation, and model inspection.

A full distribution on the original scale

vine() fits one marginal distribution per variable and a vine copula to their probability integral transforms. The default margins are nonparametric; parametric and custom marginal families are also supported.

n <- 150
latent <- rnorm(n)
x <- data.frame(
  amount = exp(latent + rnorm(n, sd = 0.5)),
  duration = exp(0.5 * latent + rnorm(n, sd = 0.7)),
  count = rpois(n, exp(0.2 + 0.3 * latent))
)

fit <- vine(
  x,
  var_types = c("c", "c", "d"),
  copula_controls = list(family_set = "onepar")
)
summary(fit)
rvine(5, fit)

See the marginal-modeling article for parametric selection, custom families, ordered variables, zero inflation, and observation weights. The getting-started article develops the complete workflow.

The constructors bicop_dist(), vinecop_dist(), and vine_dist() create models from components specified directly.

The complete API reference and all articles are available on the package website. Questions and bug reports are welcome in the GitHub issue tracker.

Copy Link

Version

Install

install.packages('rvinecopulib')

Monthly Downloads

1,378

Version

1.0.0.1.0

License

GPL-3 | file LICENSE

Maintainer

Thomas Nagler

Last Published

September 20th, 2026

Functions in rvinecopulib (1.0.0.1.0)

vine_predict_and_fitted

Predictions and fitted values for a vine copula model
rvine_structure

R-vine structure
rvinecopulib

High Performance Algorithms for Vine Copula Modeling
rosenblatt

Rosenblatt and inverse Rosenblatt transforms
pseudo_obs

Pseudo-Observations
vinecop_predict_and_fitted

Predictions and fitted values for a vine copula model
rvine_structure_sim

Simulate R-vine structures
stats_margin

Create a fixed margin from a stats distribution
plot.vinecop_dist

Plotting vinecop_dist and vinecop objects.
bicop_predict_and_fitted

Predictions and fitted values for a bivariate copula model
univariateML_family

Define a univariateML margin family
zero_inflated

Declare zero-inflated data
truncate_model

Truncate a vine copula model
vinecop

Fitting vine copula models
vinecop_dist

Vine copula models
vine_distributions

Vine based distributions
vinecop_distributions

Vine copula distributions
vine

Vine copula models
bicop_dependence

Dependence measures of a bivariate copula
as_rvine_structure

Coerce various kind of objects to R-vine structures and matrices
bicop_distributions

Bivariate copula distributions
as_margin

Normalize an object to the fitted-margin protocol
as.bicop

Convert list to bicop object
kde1d_family

Define a kde1d margin family
bicop_dist

Bivariate copula models
bicop

Fit and select bivariate copula models
getters

Extracts components of bicop_dist and vinecop_dist objects
emp_cdf

Corrected Empirical CDF
margin_family

Define a custom margin family
margin_family_protocol

Margin-family fitting protocol
par_to_ktau

Conversion between Kendall's tau and parameters
mBICV

Modified vine copula Bayesian information criterion (mBICv)
plot.bicop_dist

Plotting tools for bicop_dist and bicop objects
margin_protocol

Fitted marginal distribution protocol
margin_dist

Create a fitted or fixed custom margin
plot.rvine_structure

Plotting R-vine structures
pairs_copula_data

Exploratory pairs plot for copula data
parameter_uncertainty

Parameter uncertainty