Description Usage Arguments Value Author(s) See Also Examples
View source: R/denpro.R View source: R/leafsfirst.R
Computes a level set tree or shape tree from a piecewise constant function, or calculates a tail tree from a data set.
1 2 3 |
pcf |
piecewise constant function; output of "pcf.kern", or "pcf.func", for example |
lev |
positive real number; a level of the level set whose shape tree will be calculated |
refe |
vector of d real numbers; the reference point of the shape tree |
type |
"lst" or "shape"; not needed |
levmet |
"radius" or "proba"; radius plot or probability content plot |
ordmet |
"etaisrec" or "baryrec"; a distance to a rectangle is defined to be the distance to the boundary or the distance to the barycenter; concerns shape trees |
ngrid |
a positive integer; the tree will be pruned to contain "ngrid" levels |
dendat |
n*d data matrix; gives the data set when a tail tree will be calculated |
rho |
positive real number; the resolution threshold for the tail tree |
propor |
0<propor<1; a shape tree of the level set whose level is "propor" times the maximum value of the function will be calculated |
lowest |
a character; if lowest="dens", then it is assumed that the function whose level set tree we calculate is nonnegative |
f |
a vector of estimated values of the density at the data points; this is used in the case of tail trees to estimate the volumes of the regions |
a level set tree, shape tree, or tail tree
Jussi Klemela
pcf.kern
,
treedisc
,
plotvolu
,
plotbary
,
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | dendat<-sim.data(n=100,type="mulmod")
pcf<-pcf.kern(dendat,h=1,N=c(32,32))
# level set tree
lst<-leafsfirst(pcf)
td<-treedisc(lst,pcf,ngrid=30)
plotvolu(td)
# shape tree
st<-leafsfirst(pcf,propo=0.1) # 10% level set
tdst<-treedisc(st,pcf,ngrid=30)
plotvolu(tdst)
# tail tree
rho<-0.65
tt<-leafsfirst(dendat=dendat,rho=rho)
plotbary(tt)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.