An R-sig-phylo list serve subscriber asked the following:
I was wondering if there is a method to test for varying rates over time.... I was thinking... in terms of testing if there is a different rate for the entire tree after a specified point in time. For instance, if a snail predator colonizes an island 3.4 Mya, is there evidence for an increased rate of evolution in the prey after that point in time?
Matt Pennell, a Ph.D student in the Harmon lab, responded that this could easily be done using the functions of phytools. He's right, and here's a quick primer (surprisingly pronounced "primmer", for some reason, in American English).
> # now let's simulate a stochastic tree
> # let's map two states on the tree
> # one for the time before 3.4mybp
> plotSimmap(tree,pts=F,lwd=3,ftype="off") # visualize
names absent from sig2: assuming same order as $mapped.edge
> # finally, let's fit our two rate model