kdevine: Kernel density estimatior based on simplified vine copulas

View source: R/kdevine.R

kdevineR Documentation

Kernel density estimatior based on simplified vine copulas

Description

Implements the vine-copula based estimator of Nagler and Czado (2016). The marginal densities are estimated by kde1d, the vine copula density by kdevinecop. Discrete variables are convoluted with the uniform distribution (see, Nagler, 2017). If a variable should be treated as discrete, declare it as ordered(). Factors are expanded into binary dummy codes.

Usage

kdevine(x, mult_1d = NULL, xmin = NULL, xmax = NULL, copula.type = "kde", ...)

Arguments

x

(n x d) data matrix.

mult_1d

numeric; all bandwidhts for marginal kernel density estimation are multiplied with mult_1d. Defaults to log(1 + d) where d is the number of variables after applying cctools::expand_as_numeric().

xmin

numeric vector of length d; see kde1d.

xmax

numeric vector of length d; see kde1d.

copula.type

either "kde" (default) or "parametric" for kernel or parametric estimation of the vine copula.

...

further arguments passed to kde1d or kdevinecop.

Value

An object of class kdevine.

References

Nagler, T., Czado, C. (2016) Evading the curse of dimensionality in nonparametric density estimation with simplified vine copulas. Journal of Multivariate Analysis 151, 69-89 (doi:10.1016/j.jmva.2016.07.003)

Nagler, T. (2017). A generic approach to nonparametric function estimation with mixed data. arXiv:1704.07457

See Also

dkdevine kde1d kdevinecop

Examples

# load data
data(wdbc, package = "kdecopula")

# estimate density (use xmin to indicate positive support)
fit <- kdevine(wdbc[, 5:7], xmin = rep(0, 3))

# evaluate density estimate
dkdevine(c(1000, 0.1, 0.1), fit)

# plot simulated data
pairs(rkdevine(nrow(wdbc), fit))


kdevine documentation built on June 22, 2024, 10:52 a.m.