# BiCopParamDistLp: Compute the distance between 2 parametric copulas In MMDCopula: Robust Estimation of Copulas by Maximum Mean Discrepancy

## Description

This function uses the numerical integration procedure `cubature::hcubature()` to numerical integrate the distance between the distribution or between the densities of two bivariate copulas.

## Usage

 ``` 1 2 3 4 5 6 7 8 9 10 11``` ```BiCopParamDistLp( family, par, par_p, par2 = par, par2_p = par_p, family_p = family, p, type, maxEval = 0 ) ```

## Arguments

 `family` family of the first copula. `par` first parameter of the first copula. `par_p` first parameter of the second copula. `par2` second parameter of the first copula (only useful for two-parameter families of copulas). `par2_p` second parameter of the first copula (only useful for two-parameter families of copulas). `family_p` family of the second copula. `p` determines the L_p distance that is used. `type` type of the functions considered. Can be `cdf` for the distance between the two cumulative distribution functions or `pdf` for the distance between the two probability density functions. `maxEval` maximum number of evaluation of the function be integrated. If 0, then no maximum limit is given.

## Value

a list of four items

• `distance` the value of the distance

• `integral` the value of the integral, which is the p-th power of the distance.

• `error` the estimated relative error of the integral

• `returnCode` the integer return code of the C routine called by `cubature::hcubature()`. This should be 0 if there is no error.

## Examples

 ``` 1 2 3 4 5 6 7 8 9 10 11 12 13 14``` ```# Distance between the densities of a Gaussian copula with correlation 0.5 # and a Gaussian copula with correlation 0.2 BiCopParamDistLp(family = 1, par = 0.5, par_p = 0.2, p = 2, type = "cdf", maxEval = 10) # Distance between the cdf of a Student copula # with correlation 0.5 and 4 degrees of freedom # and a Student copula with the same correlation but 20 degrees of freedom BiCopParamDistLp(family = 2, par = 0.5, par_p = 0.5, par2 = 5, par2_p = 20, p = 2, type = "pdf", maxEval = 10) # Distance between the densities of a Gaussian copula with correlation 0.5 # and of a Student copula with correlation 0.5 and 15 degrees of freedom BiCopParamDistLp(family = 1, par = 0.5, par_p = 0.5, par2_p = 15, family_p = 2, p = 2, type = "pdf", maxEval = 10) ```

MMDCopula documentation built on Aug. 10, 2021, 9:07 a.m.