View source: R/simulate_DDT_functions.R
simulate_DDT_tree | R Documentation |
Simulate a tree from a DDT process. Only the tree topology and branch lengths are simulated, without node parameters.
simulate_DDT_tree(K, c, c_order = 1, alpha = 0, theta = 0)
K |
number of leaves (classes) on the tree |
c |
hyparameter of divergence function a(t) |
c_order |
equals 1 (default) or 2 to choose divergence function a(t) = c/(1-t) or c/(1-t)^2. |
alpha , theta |
hyparameter of branching probability a(t) Gamma(m-alpha) / Gamma(m+1+theta) For DDT, alpha = theta = 0. For general multifurcating tree from a Pitman-Yor process, specify positive values to alpha and theta. It is, however, recommended using alpha = theta = 0 in inference because multifurcating trees have not been tested rigorously. |
A class "phylo" tree with K leaves. The leaf nodes are labeled "v1", ..., "vK", root node "u1", and internal nodes "u2", ..., "uK". Note that this tree does not contain any node parameters.
Knowles, D. A., & Ghahramani, Z. (2014). Pitman yor diffusion trees for bayesian hierarchical clustering. IEEE transactions on pattern analysis and machine intelligence, 37(2), 271-289.
Other simulate DDT-LCM data:
simulate_lcm_given_tree()
,
simulate_lcm_response()
,
simulate_parameter_on_tree()
K <- 6
c <- 5
c_order <- 1
tree1 <- simulate_DDT_tree(K, c, c_order)
tree2 <- simulate_DDT_tree(K, c, c_order, alpha = 0.4, theta = 0.1)
tree3 <- simulate_DDT_tree(K, c, c_order, alpha = 0.8, theta = 0.1)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.