Description Usage Arguments Value Author(s) See Also Examples
View source: R/denpro.R View source: R/prunemodes.R
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.
1 | prunemodes(lst, modenum = 1, num = NULL, exmalim = NULL, maxnum = NULL)
|
lst |
A level set tree or a shape tree |
modenum |
positive integer; the desired number of modes |
num |
internal |
exmalim |
internal |
maxnum |
internal |
A level set tree or a shape tree, with an additional field "exma.of.modes".
Jussi Klemela
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)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.