Kernel cumulative distribution/survival function estimate for 1- to 3-dimensional data.
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, Hstart, binned=FALSE, bgridsize, amise=FALSE,
verbose=FALSE, optim.fun="nlm")
Hpi.diag.kcde(x, nstage=2, pilot, Hstart, binned=FALSE, bgridsize, amise=FALSE,
verbose=FALSE, optim.fun="nlm")
hpi.kcde(x, nstage=2, binned=TRUE, amise=FALSE)# S3 method for kcde
predict(object, ..., x)
matrix of data values
bandwidth matrix/scalar bandwidth. If these are missing, then
Hpi.kcde
or hpi.kcde
is called by default.
vector of number of grid points
not yet implemented
vector of minimum/maximum values for grid
effective support for standard normal
vector or matrix of points at which estimate is evaluated
flag for binned estimation. Default is FALSE.
vector of binning grid sizes
flag if 1-d data are positive. Default is FALSE.
adjustment applied to positive 1-d data
not yet implemented
flag to print out progress information. Default is FALSE.
"lower.tail" = cumulative distribution, "upper.tail" = survival function
number of stages in the plug-in bandwidth selector (1 or 2)
"dscalar" = single pilot bandwidth (default for
Hpi.diag.kcde
"dunconstr" = single unconstrained pilot bandwidth (default for
Hpi.kcde
initial bandwidth matrix, used in numerical optimisation
flag to return the minimal scaled PI value
optimiser function: one of nlm
or
optim
object of class kcde
other parameters
A kernel cumulative distribution estimate is an object of class
kcde
which is a list with fields:
data points - same as input
vector or list of points at which the estimate is evaluated
cumulative distribution/survival function estimate at
eval.points
scalar bandwidth (1-d only)
bandwidth matrix
"linear"
flag for estimation on a grid
flag for binned estimation
variable names
weights
"lower.tail"=cumulative distribution, "upper.tail"=survival function
If tail.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 in kcde
, then
the default bandwidth is the plug-in selector
Hpi.kcde
. Likewise for missing h
.
No pre-scaling/pre-sphering is used since the Hpi.kcde
is not invariant to translation/dilation.
The effective support, binning, grid size, grid range, positive
parameters are the same as kde
.
Duong, T. (2016) Non-parametric smoothed estimation of multivariate cumulative distribution and survival functions, and receiver operating characteristic curves. Journal of the Korean Statistical Society. 45, 33-50.
# NOT RUN {
library(MASS)
data(iris)
Fhat <- kcde(iris[,1:2])
predict(Fhat, x=iris[,1:2])
## See other examples in ? plot.kcde
# }
Run the code above in your browser using DataLab