elldistrest | R Documentation |
This functions performs improved kernel density estimation of the generator of an elliptical distribution by using Liebscher's algorithm, combined with a shrinkage function.
elldistrest(
Z,
mu = 0,
Sigma_m1,
grid,
h,
Kernel = "epanechnikov",
a,
shrink,
mpfr = FALSE,
precBits = 100,
dopb = FALSE,
normalize = 1
)
Z |
A sample from a |
mu |
The (estimated) mean of |
Sigma_m1 |
The (estimated) inverse of the scale matrix of |
grid |
The grid of values on which to estimate the density generator. |
h |
The bandwidth of the kernel. |
Kernel |
The kernel used for the smoothing (default = "epanechnikov"). |
a |
The tuning parameter to improve the performance at |
shrink |
The shrinkage function to further improve the performance at |
mpfr |
See the “EllDistrEst.R” function of the R package ‘ElliptCopulas’. |
precBits |
See the “EllDistrEst.R” function of the R package ‘ElliptCopulas’. |
dopb |
See the “EllDistrEst.R” function of the R package ‘ElliptCopulas’. |
normalize |
A value in |
The context is the one of a q
-dimensional random vector \mathbf{Z}
following an elliptical distribution with
generator g_{\mathcal{R}} : (0,\infty) \rightarrow \mathbb{R}
and scale matrix \mathbf{R}
such that the density of \mathbf{Z}
is given by
h(\mathbf{z}) = \left |\mathbf{R} \right |^{-1/2} g_{\mathcal{R}} \left (\mathbf{z}^{\text{T}} \mathbf{R}^{-1} \mathbf{z} \right ),
for \mathbf{z} \in \mathbb{R}^{q}
. Suppose that a sample \mathbf{Z}^{(1)}, \dots, \mathbf{Z}^{(n)}
from \mathbf{Z}
is given, and let
\widehat{\mathbf{R}}
be an estimator for the scale matrix \mathbf{R}
. Then, when defining
\widehat{\mathbf{Y}}^{(\ell)} = \widehat{\mathbf{R}}^{-1/2} \mathbf{Z}^{(\ell)}
for \ell = 1, \dots, n
,
this function computes the estimator \widehat{g}_{\mathcal{R}}^{\text{I}}
for g_{\mathcal{R}}
given by
\widehat{g}_{\mathcal{R}}^{\text{I}}(t) = c^{\text{I}}(t) \sum_{\ell = 1}^{n} \left \{k \left (\frac{\psi(t) - \psi \left (\left | \left |\widehat{\mathbf{Y}}^{(\ell)} \right | \right |^{2} \right )}{h_{n} \alpha \left (\psi(t) \right )} \right ) + k \left (\frac{\psi(t) + \psi \left (\left | \left |\widehat{\mathbf{Y}}^{(\ell)} \right | \right |^{2} \right )}{h_{n} \alpha \left (\psi(t) \right )} \right ) \right \},
where c^{\text{I}}(t) = [\Gamma(q/2)/(\pi^{q/2} n h_{n} \alpha(\psi(t)))] t^{-q/2 + 1} \psi^{\prime}(t)
, with k
the kernel and h_{n}
the bandwidth.
The function
\psi(t) = -a + \left (a^{q/2} + t^{q/2} \right )^{2/q},
with a > 0
a tuning parameter was introduced by Liebscher (2005), and the shrinkage function
\alpha(t)
yields further estimation improvement. We suggest to take (for q > 2
)
\alpha(t) = 1 - \frac{1}{t^{\delta} + 1},
where \delta \in (3/4 - 1/q, 1)
is another tuning parameter. When q = 2
, one can just take \alpha(t) = 1
, and the value of a
does not matter.
The estimator without the shrinkage function \alpha
is implemented in the R package ‘ElliptCopulas’.
We use this implementation and bring in the shrinkage function.
In order to make g_{\mathcal{R}}
identifiable, an extra normalization procedure is implemented
in line with an extra constraint on g_{\mathcal{R}}
.
When normalize = 1, this corresponds to \mathbf{R}
being the correlation matrix of \mathbf{Z}
.
When normalize = 2, this corresponds to the identifiability condition of Derumigny & Fermanian (2022).
The estimates for g_{\mathcal{R}}
at the grid points.
Derumigny, A., Fermanian, J.-D., Ryan, V., van der Spek, R. (2024). ElliptCopulas, R package version 0.1.4.1. url: https://CRAN.R-project.org/package=ElliptCopulas.
Derumigny, A. & Fermanian, J.-D. (2022).
Identifiability and estimation of meta-elliptical copula generators.
Journal of Multivariate Analysis 190:104962.
doi: https://doi.org/10.1016/j.jmva.2022.104962.
De Keyser, S. & Gijbels, I. (2024). Hierarchical variable clustering via copula-based divergence measures between random vectors. International Journal of Approximate Reasoning 165:109090. doi: https://doi.org/10.1016/j.ijar.2023.109090.
Liebscher, E. (2005). A semiparametric density estimator based on elliptical distributions. Journal of Multivariate Analysis 92(1):205-225. doi: https://doi.org/10.1016/j.jmva.2003.09.007.
ellcopest
for improved kernel estimation of the elliptical generator of a meta-elliptical copula,
elliptselect
for selecting optimal tuning parameters for the improved kernel estimator of the elliptical generator,
phiellip
for estimating the \Phi
-dependence between k
random vectors having a meta-elliptical copula.
q = 4
# Sample size
n = 1000
# Grid on which to evaluate the elliptical generator
grid = seq(0.005,100,by = 0.005)
# Degrees of freedom
nu = 7
# Student-t generator with 7 degrees of freedom
g_q = ((nu/(nu-2))^(q/2))*(gamma((q+nu)/2)/(((pi*nu)^(q/2))*gamma(nu/2))) *
((1+(grid/(nu-2)))^(-(q+nu)/2))
# Density of squared radius
R2 = function(t,q){(gamma((q+nu)/2)/(((nu-2)^(q/2))*gamma(nu/2)*gamma(q/2))) *
(t^((q/2)-1)) * ((1+(t/(nu-2)))^(-(q+nu)/2))}
# Sample from 4-dimensional Student-t distribution with 7 degrees of freedom
# and identity covariance matrix
sample = ElliptCopulas::EllDistrSim(n,q,diag(q),density_R2 = function(t){R2(t,q)})
# Shrinkage function
shrinkage = function(t,p){1-(1/((t^p) + 1))}
# Tuning parameter selection
opt_parameters = elliptselect(n,q,seq((3/4)-(1/q)+0.01,1-0.01,len = 200),
seq(0.01,2,len = 200))
# Optimal tuning parameters
a = opt_parameters$Opta ; p = opt_parameters$Optp ; h = opt_parameters$Opth
# Estimated elliptical generator
g_est = elldistrest(Z = sample, Sigma_m1 = diag(q), grid = grid, h = h, a = a,
shrink = function(t){shrinkage(t,p)})
plot(grid,g_est,type = "l", xlim = c(0,8))
lines(grid,g_q,col = "green")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.