transformationestimator: transformationestimator

View source: R/transformationestimator.R

transformationestimatorR Documentation

transformationestimator

Description

This function computes the non-parametric Gaussian transformation kernel copula density estimator.

Usage

transformationestimator(input, h, pseudos)

Arguments

input

The copula argument at which the density estimate is to be computed.

h

The bandwidth to be used in the Gaussian kernel.

pseudos

The (estimated) copula observations from a q-dimensional random vector \mathbf{X} (n \times q matrix with observations in rows, variables in columns).

Details

Given a q-dimensional random vector \mathbf{X} = (\mathbf{X}_{1}, \dots, \mathbf{X}_{k}) with \mathbf{X}_{i} = (X_{i1}, \dots, X_{id_{i}}), and samples X_{ij}^{(1)}, \dots, X_{ij}^{(n)} from X_{ij} for i = 1, \dots, k and j = 1, \dots, d_{i}, the Gaussian transformation kernel estimator for the copula density of \mathbf{X} equals, at \mathbf{u} = (u_{11}, \dots, u_{kd_{k}}) \in \mathbb{R}^{q},

\widehat{c}_{\text{T}}(\mathbf{u}) = \frac{1}{n h_{n}^{q} \prod_{i = 1}^{k} \prod_{j = 1}^{d_{i}} \phi \left (\Phi^{-1} \left (u_{ij} \right ) \right )} \sum_{\ell = 1}^{n} \prod_{i = 1}^{k} \prod_{j = 1}^{d_{i}} \phi \left (\frac{\Phi^{-1}(u_{ij}) - \Phi^{-1} \left (\widehat{U}_{ij}^{(\ell)} \right )}{h_{n}} \right ),

where h_{n} > 0 is a bandwidth parameter, \widehat{U}_{ij}^{(\ell)} = \widehat{F}_{ij} (X_{ij}^{(\ell)}) with

\widehat{F}_{ij}(x_{ij}) = \frac{1}{n+1} \sum_{\ell = 1}^{n} 1 \left (X_{ij}^{(\ell)} \leq x_{ij} \right )

the (rescaled) empirical cdf of X_{ij}, and \Phi the standard normal distribution function with corresponding quantile function \Phi^{-1} and density function \phi.

Value

The Gaussian transformation kernel copula density estimator evaluated at the input.

References

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.

See Also

betakernelestimator for the computation of the beta kernel copula density estimator, hamse for local bandwidth selection for the beta kernel or Gaussian transformation kernel copula density estimator, phinp for fully non-parametric estimation of the \Phi-dependence between k random vectors.

Examples

q = 3
n = 100

# Sample from multivariate normal distribution with identity covariance matrix
sample = mvtnorm::rmvnorm(n,rep(0,q),diag(3),method = "chol")

# Copula pseudo-observations
pseudos = matrix(0,n,q)
for(j in 1:q){pseudos[,j] = (n/(n+1)) * ecdf(sample[,j])(sample[,j])}

# Argument at which to estimate the density
input = rep(0.5,q)

# Local bandwidth selection
h = hamse(input,pseudos = pseudos,n = n,estimator = "trans",bw_method = 1)

# Gaussian transformation kernel estimator
est_dens = transformationestimator(input,h,pseudos)

# True density
true = copula::dCopula(rep(0.5,q), copula::normalCopula(0, dim = q))


VecDep documentation built on April 4, 2025, 5:14 a.m.