Attach a subtree to a given DDT at a randomly selected location
reattach_point(tree_kept, c, c_order = 1, theta = 0, alpha = 0)a list of the following objects:
div_timea numeric value of newly sampled divergence time. Between 0 and 1.
root_nodea character. Label of the root node of tree_kept.
root_childa character. Label of the child node of the root of tree_kept.
div_dist_to_root_childa N-vector with integer entries from 1, ..., K. The initial values for individual class assignments.
the tree to be attached to
hyparameter of divergence function a(t)
equals 1 (default) or 2 to choose divergence function \(a(t) = c/(1-t) or c/(1-t)^2\).
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.
Other sample trees:
attach_subtree(),
random_detach_subtree()