[R-sig-phylo] simulating trees

2011-04-27 Thread Jonathan Hughes
Howdy, I'm simulating trees using geiger's birthdeath.tree function. However, it already starts with two living lineages. I'd like to start with a single lineage and include that root node. Is there some other function that I'm missing? Or should I simply add :bl; to the end of the simulated

Re: [R-sig-phylo] simulating trees

2011-04-27 Thread Luke Harmon
That seems correct to me. The probability that the tree died out before the first speciation event (which is excluded, as Liam says) is d/(b+d). Also Tanya Stader's TreeSim package can deal with this issue more directly. For example her function sim.bd.taxa.age has a flag for mrca: If mrca =

Re: [R-sig-phylo] simulating trees

2011-04-27 Thread Stadler Tanja
Hi all, tree-birthdeath.tree(b,d,taxa.stop=N) tree$root.edge-rexp(n=1,rate=(b+d)) If you are using time.stop, with stopping time T, then I think you should do this: rt-rexp(n=1,rate=(b+d)) tree-birthdeath.tree(b,d,time.stop=T-rt) # if Trt tree$root.edge-rt In both cases, you get