kedd-classes: Classes '"dkde"', '"kfun"' and '"kconv"'

kedd-classesR Documentation

Classes "dkde", "kfun" and "kconv"

Description

S4 classes returned by dkde (kernel density derivative estimate), kernel.fun (kernel derivative K^{(r)}) and kernel.conv (convolution K^{(r)} * K^{(r)}).

Slots

Common to the three classes:

x:

"numeric", evaluation points.

y:

"numeric", values at x.

kernel:

"character", kernel name.

deriv.order:

"integer", derivative order r.

call:

"call", the matched call.

Class "dkde" has in addition:

h:

"numeric", bandwidth used.

n:

"integer", sample size.

data:

"numeric", the (cleaned) observations.

Methods

show(object)

prints a short summary.

plot(x, type = "l", zero.line, main.title, x.title, y.title, colors, title.size, title.face, axis.size, theme, ...)

draws the curve with ggplot2, prints it and returns the ggplot object invisibly. type is "l", "p" or "o"; zero.line (default TRUE when r > 0) adds a dashed horizontal line at 0. For "dkde" objects, rug and band (default TRUE) add the observations and a \pm one standard-error band.

x$name

Compatibility with kedd 1.x, where these functions returned lists: $kx is the slot y of "kfun" and "kconv" objects, and $eval.points, $est.fx are the slots x, y of "dkde" objects; the slot names can also be used. Unknown names give NULL.

Author(s)

Arsalane Chouaib Guidoum acguidoum@univ-tam.dz, Amel Henider amel.henider@univ-tam.dz and Iago Giné-Vázquez iago.gin-vaz@protonmail.com

See Also

dkde, kernel.fun, kernel.conv, bandwidth.

Examples

kf <- kernel.fun(kernel = "logistic", deriv.order = 1L)
kf
p <- plot(kf, type = "o")

kc <- kernel.conv(kernel = "biweight")
plot(kc)

d <- dkde(data = rnorm(100), h = 0.4)
plot(d, band = FALSE)

kedd documentation built on Nov. 12, 2026, 5:10 p.m.