cvomega | R Documentation |
This functions selects the omega tuning parameter for ridge penalization of the empirical Gaussian copula correlation matrix via cross-validation. The objective function is the Gaussian log-likelihood, and a grid search is performed using K folds.
cvomega(sample, omegas, K)
sample |
A sample from a |
omegas |
A grid of candidate penalty parameters in |
K |
The number of folds to be used. |
The loss function is the Gaussian log-likelihood, i.e., given an estimated (penalized)
Gaussian copula correlation matrix (normal scores rank correlation matrix) \widehat{\mathbf{R}}_{n}^{(-j)}
computed on a training set leaving out fold j, and
\widehat{\mathbf{R}}_{n}^{(j)}
the empirical (non-penalized)
Gaussian copula correlation matrix computed on test fold j, we search for the tuning parameter that minimizes
\sum_{j = 1}^{K} \left [\ln \left ( \left | \widehat{\mathbf{R}}_{n}^{(-j)} \right | \right ) + \text{tr} \left \{\widehat{\mathbf{R}}_{n}^{(j)} \left (\widehat{\mathbf{R}}_{n}^{(-j)} \right )^{-1} \right \} \right ].
The underlying assumption is that the copula of \mathbf{X}
is Gaussian.
The optimal ridge penalty parameter minimizing the cross-validation error.
De Keyser, S. & Gijbels, I. (2024). High-dimensional copula-based Wasserstein dependence. doi: https://doi.org/10.48550/arXiv.2404.07141.
Warton, D.I. (2008).
Penalized normal likelihood and ridge regularization of correlation and covariance matrices.
Journal of the American Statistical Association 103(481):340-349.
doi: https://doi.org/10.1198/016214508000000021.
estR
for computing the (Ridge penalized) empirical Gaussian copula correlation matrix.
q = 10
n = 50
# AR(1) correlation matrix with correlation 0.5
R = 0.5^(abs(matrix(1:q-1,nrow = q, ncol = q, byrow = TRUE) - (1:q-1)))
# Sample from multivariate normal distribution
sample = mvtnorm::rmvnorm(n,rep(0,q),R,method = "chol")
# 5-fold cross-validation with Gaussian likelihood as loss for selecting omega
omega = cvomega(sample = sample,omegas = seq(0.01,0.999,len = 50),K = 5)
R_est = estR(sample,omega = omega)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.