LogLike {aphylo} | R Documentation |
Likelihood of an observed annotated phylogenetic tree
Description
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.
Usage
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 |
mu_d , mu_s |
Numeric vector of length 2. Gain/loss probabilities (see |
eta |
Numeric vector of length 2. Annotation bias probabilities (see |
Pi |
Numeric scalar. Root node probability of having the function (see |
verb_ans |
Logical scalar. When |
check_dims |
Logical scalar. When |
Details
The parameters to estimate are described as follows:
psi
: A vector of length 2 with\psi_0
and\psi_1
, which are the misclassification probabilities fos_p=0
ands_p=1
respectively.mu_d
,mu_s
: A vector of length 2 with\mu_0
and\mu_1
which are the gain and loss probabilities respectively. The subscript d denotes duplication nodes and s speciation node.eta
: A vector of length 2 with\eta_0
and\eta_1
which are the annotation bias probabilities.Pi
: A numeric scalar which for which equals the probability of the root node having the function.
Value
A list of class phylo_LogLik
with the following elements:
S |
An integer matrix of size |
Pr |
A numeric matrix of size |
ll |
A numeric scalar with the log-likelihood value given the chosen parameters. |