final_pbox {pbox}R Documentation

Build a Multivariate Distribution from Copula

Description

Combines the results from 'fit_copula_pbox' and 'fit_dist_pbox' to build a multivariate distribution from copula, selecting the best copula based on AIC and utilizing the best-fitted marginal distributions. Note that

Method to construct a 'mvdc' object by combining best-fit copula and marginal distribution results. The method uses the best copula model as determined by the lowest AIC and combines it with marginal distributions fitted to each variable.

Usage

final_pbox(results_df, allDitrs, data, verbose = TRUE)

## S4 method for signature 'ANY'
final_pbox(results_df, allDitrs, data, verbose = TRUE)

Arguments

results_df

A data.table with AIC and parameter estimates of evaluated copulas and families from 'fit_copula_pbox'.

allDitrs

A list containing fitted distributions for each variable from 'fit_dist_pbox'.

data

A data frame or data table; this will be coerced to a 'data.table' internally.

verbose

control verbosity of the output. Default to TRUE.

Value

An object of class 'mvdc' representing the combined multivariate distribution.

Examples

  data("SEAex")
  copulaFits <- fit_copula_pbox(data = SEAex, .copula_families)
  distFits <- fit_dist_pbox(data = SEAex)
  final_mvd <- final_pbox(copulaFits, distFits$allDitrs, SEAex)
  print(final_mvd)

[Package pbox version 0.1.8 Index]