Sample a new tree topology using Metropolis-Hastings through randomly detaching and re-attaching subtrees
sample_tree_topology(
tree_phylo4d_old,
Sigma_by_group,
item_membership_list,
c,
c_order = 1,
tree_structure_old = NULL,
dist_mat_old = NULL
)a numeric vector of G elements, each being the newly sampled variance of the latent location of this group
a phylo4d object of tree from the previous iteration
a vector of diffusion variances of G groups from the previous iteration
a vector of G elements, each indicating the number of items in this group
hyparameter of divergence function a(t)
equals 1 (default) or 2 to choose divergence function
a data.frame of tree structure from the previous iteration. Each row contains information of an internal node, including divergence times, number of data points traveling through the left and right branches
a list of leaf covariance matrix from the previous iteration. The list has length G, the number of item groups