kcde(x, H, h, gridsize, gridtype, xmin, xmax, supp=3.7, eval.points,
binned=FALSE, bgridsize, positive=FALSE, adj.positive, w, verbose=FALSE,
tail.flag="lower.tail")
Hpi.kcde(x, nstage=2, pilot="dunconstr", Hstart, binned=FALSE, bgridsize,
amise=FALSE, verbose=FALSE, optim.fun="nlm")
hpi.kcde(x, nstage=2, binned=TRUE)Hpi.kcde or hpi.kcde is called by default.kcde which is a list with fields:eval.pointstail.flag="lower.tail" then the cumulative distribution
function $\mathrm{Pr}(\bold{X}\leq\bold{x})$ is estimated, otherwise
if tail.flag="upper.tail", it is the survival function
$\mathrm{Pr}(\bold{X}>\bold{x})$. For d>1,
$\mathrm{Pr}(\bold{X}\leq\bold{x}) \neq 1 - \mathrm{Pr}(\bold{X}>\bold{x})$.
If the bandwidth H is missing from kcde, then
the default bandwidth is the binned 2-stage plug-in selector
Hpi.kcde(, nstage=2, binned=TRUE). Likewise for
missing h. These bandwidth selectors are optimal for cumulative
distribution/survival functions, see Duong (2013). Binning/exact estimation and positive 1-d data behaviour is the same as for
kde. No pre-scaling/pre-sphering is used since the bandwidth
selectors Hpi.kcde are not invariant to translation/dilation.
kde, plot.kcdelibrary(MASS)
data(iris)
Fhat <- kcde(iris[,1:2])
## See other examples in ? plot.kcdeRun the code above in your browser using DataLab