aphylo-model | R Documentation |
aphylo
This function the the workhorse behind the likelihood function. It creates
arbitrary models by modifying the call to LogLike()
function according to
what the user specifies as model.
eta(..., env)
psi(..., env)
Pi(..., env)
mu_d(..., env)
mu_s(..., env)
aphylo_formula(fm, params, priors, env = parent.frame())
... |
Either 0, 1 or both. Depending on the parameter, the index of the model parameter that will be set as fixed. |
env |
Environment (not to be called by the user). |
fm |
A formula. Model of the type |
params |
Numeric vector with model parameters. |
priors |
(optional) A function. Prior for the model. |
A list with the following elements:
fun
A function. The log-likelihood function.
fixed
Logical vector.
set.seed(12)
x <- raphylo(10)
# Baseline model
aphylo_formula(x ~ mu_d)
# Mislabeling probabilities
aphylo_formula(x ~ mu_d + psi)
# Different probabilities for speciation and duplication node
# (only works if you have both types)
aphylo_formula(x ~ mu_d + mu_s + psi)
# Mislabeling probabilities and etas(fixed)
aphylo_formula(x ~ mu_d + psi + eta(0, 1))
# Mislabeling probabilities and Pi
aphylo_formula(x ~ mu_d + psi + Pi)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.