Learn R Programming

volesti (version 1.0.0)

copula1: Construct a copula using uniform sampling from the unit simplex

Description

Given two families of parallel hyperplanes intersecting the canonical simplex, this function uniformly samples from the canonical simplex and construct an approximation of the bivariate probability distribution, called copula.

Usage

copula1(h1, h2, numSlices, N)

Arguments

h1

A \(d\)-dimensional vector that describes the direction of the first family of parallel hyperplanes.

h2

A \(d\)-dimensional vector that describes the direction of the second family of parallel hyperplanes.

numSlices

The number of the slices for the copula. Default value is 100.

N

The number of points to sample. Default value is \(4\cdot 10^6\).

Value

A \(numSlices\times numSlices\) numerical matrix that corresponds to a copula.

References

L. Cales, A. Chalkis, I.Z. Emiris, V. Fisikopoulos, “Practical volume computation of structured convex bodies, and an application to modeling portfolio dependencies and financial crises,” Proc. of Symposium on Computational Geometry, Budapest, Hungary, 2018.

Examples

Run this code
# NOT RUN {
# compute a copula for two random families of parallel hyperplanes
h1 = runif(n = 10, min = 1, max = 1000)
h1 = h1 / 1000
h2=runif(n = 10, min = 1, max = 1000)
h2 = h2 / 1000
cop = copula1(h1=h1, h2=h2, numSlices = 10, N = 100000)
# }

Run the code above in your browser using DataLab