Thursday, August 11, 2011

Error fixed (I hope!)

I believe I have fixed the error with ltt(), identified here. Basically, the problem seems to have been that, after computing the height above the root of all the nodes and tips in the tree, I was incorrectly counting the number of "events" (that is, increments and decrements of the number of lineages in the tree) which should be the number of nodes + the number of extinct species (that is, assuming that two species never go extinct at exactly the same time, to the extent of numerical precision)+ two (the start and the end). I have now fixed this, which I hope has resolved Rob's problem. Hopefully, the fix has not created other problems, to be discovered.

Note that this function also computes the γ statistic of Pybus & Harvey (2000), but I'm not sure of the validity of this for species with extinct taxa.

Direct link to updated version is here. I will also add this to the next version of "phytools" (which I hope to post on my website today or tomorrow).

No comments:

Post a Comment

Note: due to the very large amount of spam, all comments are now automatically submitted for moderation.