Attach a subtree to a given DDT at a randomly selected location
attach_subtree(
subtree,
tree_kept,
detach_div_time,
pa_detach_node_label,
c,
c_order = 1,
theta = 0,
alpha = 0
)subtree to attach to tree_kept
the tree to be attached to
divergence time of subtree when it was extracted from the original tree
label of the parent node of the detached node
hyparameter of divergence function a(t)
equals 1 (default) or 2 to choose divergence function
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:
random_detach_subtree(),
reattach_point()