data(wdbc, package = "kdecopula")
# rank-transform to copula data (margins are uniform)
u <- VineCopula::pobs(wdbc[, 5:7], ties = "average")
u <- u[1:30, ]
fit <- kdevinecop(u) # estimate density
dkdevinecop(c(0.1, 0.1, 0.1), fit) # evaluate density estimate
contour(fit) # contour matrix (Gaussian scale)
pairs(rkdevinecop(500, fit)) # plot simulated data
Run the code above in your browser using DataLab