logllk_ddt {ddtlcm}R Documentation

Calculate loglikelihood of a DDT, including the tree structure and node parameters

Description

Calculate loglikelihood of a DDT, including the tree structure and node parameters

Usage

logllk_ddt(
  c,
  c_order,
  Sigma_by_group,
  tree_phylo4d,
  item_membership_list,
  tree_structure_old = NULL,
  dist_mat_old = NULL
)

Arguments

c

a positive number for the divergence hyperparameter. A larger value implies earlier divergence on the tree

c_order

equals 1 if using divergence function a(t) = c / (1-t), or 2 if a(t) = c / (1-t)^2. Default is 1

Sigma_by_group

a vector of diffusion variances of G groups from the previous iteration

tree_phylo4d

a "phylo4d" object

item_membership_list

a list of G elements, where the g-th element contains the column indices of data corresponding to items in major group g

tree_structure_old

a list of at least named elements: loglikelihoods of the input tree topology and divergence times. These can be directly obtained from the return of this function. Default is NULL. If given a list, then computation of the loglikelihoods will be skipped to save time. This is useful in the Metropolis-Hasting algorithm when the previous proposal is not accepted.

dist_mat_old

a tree-structured covariance matrix from a given tree. Default is NULL.

Value

a numeric of loglikelihood

See Also

Other likelihood functions: logllk_ddt_lcm(), logllk_div_time_one(), logllk_div_time_two(), logllk_lcm(), logllk_location(), logllk_tree_topology()


[Package ddtlcm version 0.2.1 Index]