add_one_sample {ddtlcm}R Documentation

Functions to simulate trees and node parameters from a DDT process. Add a branch to an existing tree according to the branching process of DDT

Description

Functions to simulate trees and node parameters from a DDT process. Add a branch to an existing tree according to the branching process of DDT

Usage

add_one_sample(tree_old, c, c_order, theta, alpha)

Arguments

tree_old

a "phylo" object. The tree (K leaves) to which a new branch will be added.

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) Allowable range: 0 <= beta <= 1, and alpha >= -2 beta 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.

Value

a "phylo" object. A tree with K+1 leaves. if t2 > t1, then select which path to take, with probability proportional to the number of data points that already traversed the path


[Package ddtlcm version 0.2.1 Index]