EMPIRgrid_fast: Fast Grid of the Bivariate Empirical Copula

EMPIRgrid_fastR Documentation

Fast Grid of the Bivariate Empirical Copula

Description

Generate a fast gridded representation of the bivariate empirical copula (Hernández-Maldonado et al., 2024). Mathematics for the "1/n" and "bernstein" copula are shown under EMPIRcop. Herein, the \ddot{\mathbf{C}}_n (double-dots) are used to denote gridding of the copula. This function is a much more recent addition (spring 2026) to the copBasic than its historical ancestor of EMPIRgrid because of publication of the algorithm by Hernández-Maldonado et al. (2024). The copBasic author personally thanks V.M. Hernández-Maldonado for a May 2026 discussion on the algorithm and some clarifications to the pseudo-code in Hernández-Maldonado et al. (2024).

Usage

EMPIRgrid_fast(uv=NULL, ctype=c("1/n", "bernstein"), para=NULL,
               gridonly=FALSE, verbose=FALSE, ...)

Arguments

uv

A data frame or matrix of u and v vectors of nonexceedance probabilities (see also para);

ctype

A means to trigger which definition of empirical copula is to be used: \mathbf{C}_n(u,v) ("1/n") or \mathbf{C}^\mathcal{B}_n(u,v) ("bernstein");

para

A matrix of u and v vectors as an alternative to uv for syntax compatibility for other situations in copBasic;

verbose

A logical controlling whether the progress during grid building is to be shown;

gridonly

A logical to return the empcop component (\ddot{\mathbf{C}}_{n}(u,v) or \ddot{\mathbf{C}}^\mathcal{B}_n(u,v)); and

...

Additional arguments to pass to EMPIRcop.

Value

A matrix is returned (\ddot{\mathbf{C}}_{n}(u,v) or \ddot{\mathbf{C}}^\mathcal{B}_n(u,v)), if gridonly is true. Otherwise a list of the u, v, and \ddot{\mathbf{C}}_{n}(u,v) or \ddot{\mathbf{C}}^\mathcal{B}_n(u,v) is returned. The list will also contain the deluv (simply 1/n for sample size n) used and the ctype. The list is returned as classes of "empirical.copula.grid" and "list". This is classification might be used in copBasic to check for a grid in other functions. Note, there is no deluv argument to this function like there is for the historical function EMPIRgrid.

Author(s)

W.H. Asquith

References

Hernández-Maldonado, V.M., Erdely, A., Díaz-Viera, M., and Rios, L., 2024, Fast procedure to compute empirical and Bernstein copulas: Applied Mathematics and Computation, v. 477, article 128827, 14 p., \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1016/j.amc.2024.128827")}.

See Also

EMPIRgrid, EMPIRgrid_lkup

Examples

  para <- list(cop=GHcop, para=3, breve=0.1)
  uv <- simCOP(10, cop=breveCOP, para=para)
  gf <- EMPIRgrid_fast(para=uv, gridonly=TRUE)
  gg <- EMPIRgrid(para=uv, gridonly=TRUE, deluv=0.1, ctype="1/n")
  print(sum(gf - gg)) # should be zero

  n <- 5; uv <- matrix(runif(n *2), ncol=2)
  empCOP <- EMPIRgrid_fast(uv, ctype="1/n",       gridonly=TRUE)
            image(empCOP, main="1/n"      )
  empCOP <- EMPIRgrid_fast(uv, ctype="bernstein", gridonly=TRUE)
            image(empCOP, main="Bernstein")

## Not run: 
  # This permutation asymmetric copula is shown as a means to cross check
  # the orientation of the matrix computations within the function.
  n <- 500; para <- list(cop=GHcop, para=c(12,15), breve=0.5)
  uv <- copBasic::simCOP(n, cop=breveCOP, para=para, graphics=FALSE)
  empCOP <- EMPIRgrid_fast(uv, gridonly=TRUE)
  image(empCOP); points(uv) #
## End(Not run)

copBasic documentation built on July 23, 2026, 1:07 a.m.