Description Usage Arguments Value Author(s) See Also Examples
View source: R/denpro.R View source: R/findbnodes.R
Finds pointers to the nodes of a level set tree. The nodes are such that their excess mass is among "modenum" largest excess masses, and they start a new branch.
1 | findbnodes(lst, modenum=1, num=NULL)
|
lst |
level set tree; a list of vectors. The list contains at least vectors "level", "volume", and "parent". For example, function "leafsfirst" computes a level set tree. |
modenum |
positive integer; the number of nodes whose pointers are computed |
num |
a technical parameter |
a vector of integers; pointers to the nodes of the level set tree
Jussi Klemela
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | # generate data
seed<-1
n<-50
d<-2
l<-3; D<-4; c<-D/sqrt(2)
M<-matrix(0,l,d); M[2,]<-c; M[3,]<--c
sig<-matrix(1,l,d)
p<-rep(1/l,l)
dendat<-sim.data(type="mixt",n=n,M=M,sig=sig,p=p,seed=seed)
h<-(4/(d+2))^(1/(d+4))*n^(-1/(d+4))*apply(dendat,2,sd)
N<-rep(20,d)
pcf<-pcf.kern(dendat,h,N)
lst<-leafsfirst(pcf)
nodes<-findbnodes(lst,modenum=3)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.