crabs.loglikelihood {CRABS} | R Documentation |
Compute likelihood
Description
Compute likelihood
Usage
crabs.loglikelihood(phy, model, rho = 1)
Arguments
phy |
an object of class "phylo" |
model |
an object of class "CRABS" |
rho |
the taxon sampling fraction |
Value
the log-likelihood of the tree given the model
Examples
library(ape)
lambda <- function(t) exp(0.3*t) - 0.5*t
mu <- function(t) exp(0.3*t) - 0.2*t - 0.8
model <- create.model(lambda, mu, times = seq(0, 3, by = 0.005))
set.seed(123)
phy <- rcoal(25)
crabs.loglikelihood(phy, model)
[Package CRABS version 1.2.0 Index]