Learn R Programming

volesti (version 1.0.3)

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

Description

Given a family of parallel hyperplanes and a family of concentric ellispoids centered at the origin intersecting the canonical simplex, this function uniformly samples from the canonical simplex and construct an approximation of the bivariate probability distribution, called copula.

Usage

copula2(h, E, numSlices, N)

Arguments

h

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

E

The \(d\times d\) symmetric positive semidefine matrix that describes the family of concentric ellipsoids centered at the origin.

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 a family of parallel hyperplanes and a family of conentric ellipsoids
h = runif(n = 10, min = 1, max = 1000)
h = h / 1000
E = replicate(10, rnorm(20))
E = cov(E)
cop = copula2(h=h, E=E, numSlices=10, N=100000)
# }

Run the code above in your browser using DataLab