Package ElliptCopulas

This package implements several functions for the estimation of meta-elliptical copulas and for the estimation of elliptical and trans-elliptical distributions:

How to install

The release version on CRAN:

install.packages("ElliptCopulas")

The development version from GitHub:

# install.packages("remotes")
remotes::install_github("AlexisDerumigny/ElliptCopulas")

Main functions of the package

1. Inference of Elliptical Distributions

# Sample from an Elliptical distribution for which the
# squared radius follows an exponential distribution
mu = c(2,6,-5)
cov1 = rbind(c(1  , 0.3, 0.3),
             c(0.3, 1  , 0.3),
             c(0.3, 0.3, 1  ))
# cov1 = diag(3)
grid = seq(0,10, by = 0.1)
generator = exp(- grid/2) / (2*pi)^(3/2)
density_R2 = Convert_gd_To_fR2(grid = grid, g_d = generator, d = 3)
X = EllDistrSim(n = 1000, d = 3, A = chol(cov1), mu = mu,
                density_R2 = density_R2)
plot(X[, 1], X[, 2])

estDensityGenerator = EllDistrEst(X = X, mu = mu, Sigma_m1 = solve(cov1),
                                  grid = grid, a = 10, h = 0.02, dopb = FALSE)

plot(grid, estDensityGenerator, type = "l", ylab = "Estimated & true density generators")
lines(grid, generator, col = "red")

2. Estimation of correlation matrix

However, in the elliptical case, it can be used to recover the (usual) Pearson’s correlation matrix for elliptical distribution, as both are then linked by the relationship \(\tau = 2 Arcsin(\rho) / \pi\).

matrixCor = matrix(c(1  , 0.5, 0.3 ,0.3,
                     0.5,   1, 0.3, 0.3,
                     0.3, 0.3,   1, 0.5,
                     0.3, 0.3, 0.5,   1), ncol = 4 , nrow = 4)
dataMatrix = mvtnorm::rmvnorm(n = 100, mean = rep(0, times = 4), sigma = matrixCor)
blockStructure = list(1:2, 3:4)
estKTMatrix = KTMatrixEst(dataMatrix = dataMatrix, blockStructure = blockStructure,
                           averaging = "all")
InterBlockCor = sin(estKTMatrix[1,2] * pi / 2)

# Estimation of the correlation between variables of the first group
# and of the second group
print(InterBlockCor) 
#> [1] 0.2698366
# to be compared with the true value: 0.3.

3. Inference of (Meta-)Elliptical Copulas

4. Inference of Trans-Elliptical Distributions

5. Numerical analysis

References

Derumigny, A., & Fermanian, J. D. (2022). Identifiability and estimation of meta-elliptical copula generators. Journal of Multivariate Analysis, article 104962. doi:10.1016/j.jmva.2022.104962, arXiv:2106.12367.

Liebscher, E. (2005). A semiparametric density estimator based on elliptical distributions. Journal of Multivariate Analysis, 92, 205–225. doi:10.1016/j.jmva.2003.09.007.

Ryan, V., & Derumigny, A. (2024). On the choice of the two tuning parameters for nonparametric estimation of an elliptical distribution generator. arxiv:2408.17087.

van der Spek, R., & Derumigny, A. (2022). Fast estimation of Kendall’s Tau and conditional Kendall’s Tau matrices under structural assumptions. arXiv:2204.03285.