BiCopKDE | R Documentation |
A kernel density estimate of the copula density is visualized. The function
provides the same options as plot.BiCop()
. Further arguments can
be passed to kdecopula::kdecop()
to modify the estimate. The
kdecopula::kdecopula-package()
must be installed to use
this function.
BiCopKDE(u1, u2, type = "contour", margins, size, kde.pars = list(), ...)
u1 , u2 |
numeric vectors of equal length with values in |
type |
plot type; either |
margins |
only relevant for types |
size |
integer; the plot is based on values on a |
kde.pars |
list of arguments passed to
|
... |
optional arguments passed to |
For further details on estimation see kdecopula::kdecop()
.
Thomas Nagler
# simulate data from Joe copula
cop <- BiCop(3, tau = 0.3)
u <- BiCopSim(1000, cop)
contour(cop) # true contours
# kernel contours with standard normal margins
BiCopKDE(u[, 1], u[, 2])
BiCopKDE(u[, 1], u[, 2], kde.pars = list(mult = 0.5)) # undersmooth
BiCopKDE(u[, 1], u[, 2], kde.pars = list(mult = 2)) # oversmooth
# kernel density with uniform margins
BiCopKDE(u[, 1], u[, 2], type = "surface", zlim = c(0, 4))
plot(cop, zlim = c(0, 4)) # true density
# kernel contours are also used in pairs.copuladata
data(daxreturns)
data <- as.copuladata(daxreturns)
pairs(data[c(4, 5, 14, 15)])
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.