diversitree icon indicating copy to clipboard operation
diversitree copied to clipboard

QuaSSE gives confusing error message when diffusion ommitted

Open richfitz opened this issue 10 years ago • 0 comments

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)

richfitz avatar Mar 17 '14 08:03 richfitz