Learn R Programming

denpro (version 0.9.2)

modecent: Returns locations of modes of a density estimate

Description

With "modecent" we may find the location of the modes of a function. Argument to function "modecent" is the level set tree of the function. A mode is defined here to be the barycenter of a set at which the estimate has a local maximum.

Usage

modecent(lst)

Arguments

lst
level set tree object; list containing lst$parent and lst$center; output of "leafsfirst", "profgene", "profhist", or "profkern"

Value

The rows of output are d-vectors specifying the locations of the modes.

See Also

leafsfirst, profkern, plotbary

Examples

Run this code
set.seed(1)
dendat<-matrix(rnorm(20),10)   #10*2 data-matrix
pcf<-pcf.kern(dendat,h=2,N=c(16,16))
lst<-leafsfirst(pcf)
modecent(lst)

Run the code above in your browser using DataLab