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)Hpi or hpi is called by default.kde which is a
list with fields:eval.pointscompute.cont=TRUE)h is missing, the default bandwidth is hpi(x=x, nstage=2, binned=TRUE),
and for d>1, if H is missing, the default is Hpi(x=x, nstage=2, binned=n>1000, pilot="samse"). 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 d=1, 2, 3, 4, and if 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.
For d=1, if positive=TRUE then x<-log(x+adj.positive)
where the default adj.positive is the minimum of x.
plot.kde## positive data example
x <- 2^rnorm(100)
fhat <- kde(x=x, positive=TRUE)
plot(fhat)
## See other examples in ? plot.kdeRun the code above in your browser using DataLab