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.
kdevine(x, mult_1d = NULL, xmin = NULL, xmax = NULL, copula.type = "kde", ...)(\(n x d\)) data matrix.
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().
numeric vector of length d; see kde1d.
numeric vector of length d; see kde1d.
either "kde" (default) or "parametric" for
kernel or parametric estimation of the vine copula.
further arguments passed to kde1d or
kdevinecop.
An object of class kdevine.
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
# load data
data(wdbc, package = "kdecopula")
wdbc <- wdbc[1:30, ]
# 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)
#> [1] 0.1923682
# plot simulated data
pairs(rkdevine(nrow(wdbc), fit))