| EMPIRgrid_fast | R Documentation |
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).
EMPIRgrid_fast(uv=NULL, ctype=c("1/n", "bernstein"), para=NULL,
gridonly=FALSE, verbose=FALSE, ...)
uv |
A data frame or matrix of |
ctype |
A means to trigger which definition of empirical copula is to be used: |
para |
A matrix of |
verbose |
A logical controlling whether the progress during grid building is to be shown; |
gridonly |
A logical to return the |
... |
Additional arguments to pass to |
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.
W.H. Asquith
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")}.
EMPIRgrid, EMPIRgrid_lkup
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.