data(geospiza)
attach(geospiza)
drop.tip(geospiza.tree, "olivacea")->g.tree
disp.data<-dtt(g.tree, geospiza.data)
s<-ic.sigma(g.tree, geospiza.data)
sims<-sim.char(g.tree, s, 100)
disp.sims<-dtt(g.tree, sims)
mean.sims<-rowSums(disp.sims)/ncol(disp.sims)
ltt<-sort(branching.times(g.tree), decr=TRUE)
ltt<-c(0, (max(ltt)-ltt)/max(ltt));
plot(ltt, disp.data)
lines(ltt, disp.data)
lines(ltt, mean.sims)
area.between.curves(ltt, mean.sims, disp.data, xrange=c(0, 2/3))
Run the code above in your browser using DataLab