diversitree
diversitree copied to clipboard
QuaSSE gives confusing error message when diffusion ommitted
Should just check number of parameters and avoid this error.
library(diversitree)
lambda <- function(x) sigmoid.x(x, 0.1, 0.2, 0, 2.5)
mu <- function(x) constant.x(x, 0.03)
char <- make.brownian.with.drift(0, 0.025)
set.seed(1)
phy <- tree.quasse(c(lambda, mu, char), max.taxa=15, x0=0,
single.lineage=FALSE, verbose=TRUE)
lik <- make.quasse(phy, phy$tip.state, 0.5, constant.x, constant.x)
p <- starting.point.quasse(phy, phy$tip.state)
lik(p)