Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

ksupp

Kernel support estimate


Description

Kernel support estimate for 2-dimensional data.

Usage

ksupp(fhat, cont=95, abs.cont, convex.hull=FALSE)

Arguments

fhat

object of class kde

cont

percentage for contour level curve. Default is 95.

abs.cont

absolute density estimate height for contour level curve

convex.hull

flag to compute convex hull of contour level curve. Default is FALSE.

Details

The kernel support estimate is the level set of the density estimate that exceeds the cont percent contour level. If this level set is a simply connected region, then this can suffice to be a conservative estimate of the density support. Otherwise, the convex hull of the level set is advised.

Value

A kernel support estimate is a 2-column matrix which delimits the (convex hull of the) level set of the density estimate fhat.

See Also

Examples

library(oz)
data(grevillea)
fhat <- kde(x=grevillea)
fhat.supp <- ksupp(fhat, convex.hull=TRUE)
plot(fhat, display="filled.contour", cont=seq(10,90,by=10), drawlabels=FALSE)
plot(fhat, cont=95, add=TRUE)
polygon(fhat.supp, lty=2)

ks

Kernel Smoothing

v1.12.0
GPL-2 | GPL-3
Authors
Tarn Duong [aut, cre], Matt Wand [ctb], Jose Chacon [ctb], Artur Gramacki [ctb]
Initial release
2021-02-06

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.