LogLike function

Likelihood of an observed annotated phylogenetic tree

Likelihood of an observed annotated phylogenetic tree

This function computes the log-likelihood of the chosen parameters given a particular dataset. The arguments annotations, and offspring

should be as those returned by new_aphylo(). For complete parameter estimation see aphylo_estimates .

LogLike(tree, psi, mu_d, mu_s, eta, Pi, verb_ans = TRUE, check_dims = TRUE)

Arguments

  • tree: A phylogenetic tree of class aphylo .
  • psi: Numeric vector of length 2. Misclasification probabilities. (see LogLike).
  • mu_d, mu_s: Numeric vector of length 2. Gain/loss probabilities (see LogLike).
  • eta: Numeric vector of length 2. Annotation bias probabilities (see LogLike).
  • Pi: Numeric scalar. Root node probability of having the function (see LogLike).
  • verb_ans: Logical scalar. When FALSE (default) the function returns a list with a single scalar (the log-likelihood).
  • check_dims: Logical scalar. When TRUE (default) the function checks the dimmension of the passed parameters.

Returns

A list of class phylo_LogLik with the following elements: - S: An integer matrix of size 2pp2^p * p as returned by states.

  • Pr: A numeric matrix of size G2pG * 2^p with node/state probabilities.

  • ll: A numeric scalar with the log-likelihood value given the chosen parameters.

Details

The parameters to estimate are described as follows:

  1. psi: A vector of length 2 with psi[0]psi[0] and psi[1]psi[1], which are the misclassification probabilities fo s[p]=0s[p]=0 and s[p]=1s[p]=1

    respectively.

  2. mu_d, mu_s: A vector of length 2 with mu[0]mu[0] and mu[1]mu[1] which are the gain and loss probabilities respectively. The subscript d denotes duplication nodes and s speciation node.

  3. eta: A vector of length 2 with eta[0]eta[0] and eta[1]eta[1] which are the annotation bias probabilities.

  4. Pi: A numeric scalar which for which equals the probability of the root node having the function.

  • Maintainer: George Vega Yon
  • License: MIT + file LICENSE
  • Last published: 2024-12-03