Re: [R-sig-phylo] birthdeath {ape} fails every time.

2012-04-20 Thread Matt Pennell
Hi all, Just a note on this topic, which Rich may be able to help clarify if he sees this. It can be shown that Rich's equation which uses log(abs(...)) is exactly equivalent to the regular version of the Nee equation. However, for an ultrametric tree, the ML of lambda will always be greater than

Re: [R-sig-phylo] birthdeath {ape} fails every time.

2012-04-20 Thread Rich FitzJohn
Hi all, This (ML lambda mu) is a common belief that I think is mostly caused by the fact that most implementations of Nee's equations constrain this. library(diversitree) set.seed(1) trees - replicate(40, rcoal(100), simplify=FALSE) get.ml.bd - function(phy, p=c(.1, 0))

Re: [R-sig-phylo] birthdeath {ape} fails every time.

2012-04-20 Thread Simon Greenhill
Hi all, Thanks for the quick replies, workarounds and bugfixes! Plenty for me to go on with! Simon ___ R-sig-phylo mailing list R-sig-phylo@r-project.org https://stat.ethz.ch/mailman/listinfo/r-sig-phylo

[R-sig-phylo] birthdeath {ape} fails every time.

2012-04-19 Thread Simon Greenhill
Morning all, Whenever I try to use ape's (v 3.0-2) birthdeath function e.g. birthdeath(rcoal(sample(10:100, 1))) I get the following error: Error in while (foo(up) 0) up - up + inc : missing value where TRUE/FALSE needed The warnings all appear to be this sort of thing: 1: In log(1 - a)

Re: [R-sig-phylo] birthdeath {ape} fails every time.

2012-04-19 Thread Matt Pennell
Simon, For reasons that I do not fully understand, the problem arises with the use of a coalescent tree (which has a very branch length distribution than a tree generated under a birthdeath process). maybe someone else has some insight into why this causes birthdeath to fail. if you run

Re: [R-sig-phylo] birthdeath {ape} fails every time.

2012-04-19 Thread Dan Rabosky
If you want simple fitting of a constant-rate birth-death process to a phylogeny, another option is in diversitree (see make.bd). Last time I checked, bd in laser (and birthdeath in ape) used transformations that kept mu lambda, but this is not the case for diversitree. The package is

Re: [R-sig-phylo] birthdeath {ape} fails every time.

2012-04-19 Thread Emmanuel Paradis
Hi Simon, This is fixed and you can find the new version on ape's SVN. Another thing I fixed: it could happen that the calculation of the Hessian-based SEs fails: the error is now caught and the MLEs are returned with SEs set to NA (the profile-likelihood CIs are still computed of course).