Hi Liam,

Thanks for the speedy reply. Looks like a neat function.

I've tried it out, and I get perfect results on ultrametric trees, but
non-ultrametric give me a funny result, a big uptick in the ltt plot right
at the present. I wonder if it's something to do with the dates on the tree
I'm using, which go from +ve to -ve.

Code to reproduce the result is below.

Thanks

Rob

   library(TreeSim)

library(phytools)

library(geiger)


#simulate tree of 100 taxa with initial diversification followed by a period
of B=D

t1 <- sim.rateshift.taxa(100, 1, c(0.2, 0.2), c(0.2, 0.05), c(1,1), c(0, 20
))[[1]]

t1


#confirm number of extant taxa is 100

n.extant <- length(prune.extinct.taxa(t1)$tip.label)

n.extant


#do ltt plot without extinct taxa (works fine)

p1 <- ltt(t1, log.lineages=FALSE, drop.extinct=TRUE)


#do ltt plot with extinct taxa (looks odd)

p2 <- ltt(t1, log.lineages=FALSE, drop.extinct=FALSE)


#max times don't seem to correspond between the two plots.

max(p1$times)==max(p2$times)




On 11 August 2011 10:55, Liam J. Revell <liam.rev...@umb.edu> wrote:

> This is implemented in my "phytools" package.  This is not yet on CRAN, but
> can be downloaded from http://anolis.oeb.harvard.edu/**
> ~liam/R-phylogenetics/<http://anolis.oeb.harvard.edu/~liam/R-phylogenetics/>.
>  The function is ltt().  It is slow, but seems to work.  Please let me know
> if you have success with this.
>
> - Liam
>
> --
> Liam J. Revell
> University of Massachusetts Boston
> web: 
> http://faculty.umb.edu/liam.**revell/<http://faculty.umb.edu/liam.revell/>
> email: liam.rev...@umb.edu
> blog: http://phytools.blogspot.com
>
>
> On 8/10/2011 8:51 PM, Rob Lanfear wrote:
>
>> Hi All,
>>
>> I have a set of simulated birth-death trees, which include extinct and
>> extant lineages. I'd like to see if my simulations are doing what I think
>> they should be, by plotting out the number of lineages through time.
>>
>> Does anyone know of a method of doing this that incorporates extinct
>> lineages, i.e. one where the number of lineages can decrease as well as
>> increase through time.
>>
>> I can see how it could be done (I think...) by making an ordered data
>> frame
>> of node times (+1 lineage) and extinction events (-1 lineage), but it
>> seems
>> like somebody might already have done it.
>>
>> Cheers,
>>
>> Rob
>>
>>


-- 
Rob Lanfear
Postdoc,
Centre for Macroevolution and Macroecology,
Research School of Biology,
Australian National University

Tel: +61 2 6125 7270
www.robertlanfear.com

        [[alternative HTML version deleted]]

_______________________________________________
R-sig-phylo mailing list
R-sig-phylo@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-phylo

Reply via email to