prunemodes: Prunes modes away from a level set tree or a shape tree

Description Usage Arguments Value Author(s) See Also Examples

View source: R/denpro.R View source: R/prunemodes.R

Description

Prunes smallest modes in terms of the excess mass away, from a level set tree or froma a shape tree. The tree is interpreted as a 1D function (in the sense of a volume function, radius function, or a tail probability function). The pruning may be useful to get cleaner plots, especially a location plot of a shape tree may suffer from spurious modes.

Usage

1
prunemodes(lst, modenum = 1, num = NULL, exmalim = NULL, maxnum = NULL)

Arguments

lst

A level set tree or a shape tree

modenum

positive integer; the desired number of modes

num

internal

exmalim

internal

maxnum

internal

Value

A level set tree or a shape tree, with an additional field "exma.of.modes".

Author(s)

Jussi Klemela

See Also

leafsfirst, treedisc,

Examples

1
2
3
4
5
6
7
8
9
dendat<-sim.data(n=100,type="cross")
pcf<-pcf.kern(dendat,h=1,N=c(32,32))
st<-leafsfirst(pcf,propor=0.01)   

td<-treedisc(st,pcf,ngrid=60)
plotbary(td)

td2<-prunemodes(td,modenum=4)
plotbary(td2)

denpro documentation built on May 2, 2019, 8:55 a.m.