-## birthdeath.R (2009-05-10)
+## birthdeath.R (2010-10-17)
## Estimation of Speciation and Extinction Rates
## with Birth-Death Models
## birthdeath: standard model
## bd.ext: extended version
-## Copyright 2002-2009 Emmanuel Paradis
+## Copyright 2002-2010 Emmanuel Paradis
## This file is part of the R-package `ape'.
## See the file ../COPYING for licensing issues.
N <- length(phy$tip.label)
x <- c(NA, branching.times(phy))
dev <- function(a, r) {
+ if (r <= 0) return(1e50)
-2 * (lfactorial(N - 1)
+ (N - 2) * log(r)
+ r * sum(x[3:N])