Learn R Programming

ElliptCopulas (version 0.1.4.1)

EllCopLikelihood: Computation of the likelihood of an elliptical copula

Description

Computes the likelihood $$\frac{g(Q_g(U) \Sigma^{-1} Q_g(U))}{f_g(Q_g(U_1)) \cdots f_g(Q_g(U_d))} $$ for a vector \((U_1, \dots, U_d)\) on the unit cube and for a \(d\)-dimensional generator \(g\) whose univariate density and quantile functions are respectively \(f_g\) and \(Q_g\). This is to the likelihood of the copula associated with the elliptical distribution having density \(|det(\Sigma)|^{-1/2} g(x \Sigma^{-1} x)\).

Usage

EllCopLikelihood(grid, g_d, pointsToCompute, Sigma_m1, log = TRUE)

Value

a vector (of length 1 if pointsToCompute is a vector) of likelihoods associated with each observation.

Arguments

grid

the discretization grid on which the generator is given.

g_d

the values of the \(d\)-dimensional density generator on the grid.

pointsToCompute

the points \(U\) at which the likelihood should be computed. If pointsToCompute is a vector, then its length is used as the dimension \(d\) of the space. If it is a matrix, then the dimension of the space is the number of columns.

Sigma_m1

the inverse correlation matrix of the elliptical distribution.

log

if TRUE, this returns the log-likelihood instead of the likelihood.

References

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

See Also

EllCopEst for the estimation of elliptical copula, EllCopEst for the estimation of elliptical copula.

Examples

Run this code
grid = seq(0,50,by = 0.01)
gdnorm = DensityGenerator.normalize(grid = grid, grid_g = exp(-grid/2), d = 3)
gdnorm2 = DensityGenerator.normalize(grid = grid, grid_g = 1/(1+grid^2), d = 3)
X = EllCopSim(n = 30, d = 3, grid = grid, g_d = gdnorm)
logLik = EllCopLikelihood(grid , g_d = gdnorm , X,
                          Sigma_m1 = diag(3), log = TRUE)
logLik2 = EllCopLikelihood(grid , g_d = gdnorm2 , X,
                           Sigma_m1 = diag(3), log = TRUE)
print(c(sum(logLik), sum(logLik2)))

Run the code above in your browser using DataLab