Learn R Programming

msBP (version 1.4-1)

msBP.tree: Creating an msBPTree

Description

Create an object of the class msBPTree

Usage

msBP.tree(max.s = 10)

Value

An object of the class msBPTree with zero at all nodes and a=b=NULL.

Arguments

max.s

Maximum depth of the binary tree

Details

An object of the class msbpTree is a list of 5 elements that represent a draw from a msBP(a,b) prior as introduced by Canale and Dunson (2016). The first two elements are the trees of the stopping and descending-to-the-right probabilities, respectively. Both are object of the class binaryTree. The third and fourth argument are the hyperparameters of the msBP prior, namely a and b. The last value is an integer with the maximum depth of both the trees.

References

Canale, A. and Dunson, D. B. (2016), "Multiscale Bernstein polynomials for densities", Statistica Sinica, 26(3), 1175-1195.

Canale, A. (2017), "msBP: An R Package to Perform Bayesian Nonparametric Inference Using Multiscale Bernstein Polynomials Mixtures". Journal of Statistical Software, 78(6), 1-19.

See Also

msBP.rtree

Examples

Run this code
tree <- msBP.tree(2)

Run the code above in your browser using DataLab