kde(x, H, h, gridsize, gridtype, xmin, xmax, supp=3.7, eval.points,
binned=FALSE, bgridsize, positive=FALSE, adj.positive, w,
compute.cont=FALSE, approx.cont=TRUE)kda.kde(x, x.group, Hs, hs, prior.prob=NULL, gridsize, xmin, xmax,
supp=3.7, eval.points=NULL, binned=FALSE, bgridsize, w,
compute.cont=FALSE, approx.cont=TRUE)
x <- log(x +
adj.positive)
when positive=TRUE
. Default is the minimum of x
.kde
is a kernel density estimate which is an object of class kde
:eval.points
kda.kde
is a density estimate
for discriminant analysis which is an object of class kda.kde
:eval.points
eval.points
is not specified, then the
density estimate is computed over a grid
defined by gridsize
(if binned=FALSE
) or
by bgridsize
(if binned=TRUE
).
If eval.points
is specified, then the
density estimate is computed exactly at eval.points
.
For d > 4, the kernel density estimate is computed exactly
and eval.points
must be specified. supp
is the effective support for a normal kernel, i.e.
all values outside [-supp,supp]^d
are set to zero.
The default xmin
is min(x)-Hmax*supp
and xmax
is max(x)+Hmax*supp
where Hmax
is the maximum of the
diagonal elements of H
.The default weights w
is a vector of all ones.
For kda.kde
, if you have prior probabilities then set prior.prob
to these.
Otherwise the default is prior.prob=NULL
i.e. use the sample
proportions as estimates of the prior probabilities.
plot.kde
, plot.kda.kde
### See examples in ? plot.kde, ? plot.kda.kde
Run the code above in your browser using DataLab