| Primary Contact(s) | Created | Required Software |
| Rich Glor | 9 March 2009 |
|
| Example Datafile | Prerequisites | |
| See Introduction | R for Phylogenetics parts I, II, III, IV, and V |
Introduction|I. Getting Started|II. Tree Basics|III. Loading Character Data|IV. Testing Phylogenetic Signal|V. Ancestral Reconstruction|VI. Testing Patterns
Just as it's possible to use R to test phylogenetic signal by manipulating branch lengths, it is also possible to investigate the temporal pattern of sequence evolution with branch length transformations in R. The method known as Delta, which was introduced by Pagel is the most widely-used approach. We can use Pagel's delta to ask whether the rate of evolution for a given trait has sped-up or slowed-down over time. We might expect the rate of trait evolution to slow down over time if, for example, ecological resources are filled over time, constraining subsequent evolutionary diversification.
1. First let's get an idea of what Delta does to our our trees.
deltaTree(anolisComparativeTree, 0.0005) -> anolisDelta0.0005
deltaTree(anolisComparativeTree, 0.5) -> anolisDelta0.5
deltaTree(anolisComparativeTree, 50) -> anolisDelta50
Because our inferred value of delta is below 1, these analyses suggest a speed-up in the rate of trait evolution over the course of the phylogeny.
and plot these trees:
par(mfcol=c(1,4)) plot(anolisComparativeTree) plot(anolisDelta0.0005) plot(anolisDelta0.5) plot(anolisDelta50)
2. Now let's see what value of Delta best fits our data.
fitDiscrete(anolisComparativeTree, micro, treeTransform="delta")
Your output should look something like this:
Finding the maximum likelihood solution
[0 50 100]
[....................]
$Trait1
$Trait1$lnl
[1] -73.13822
$Trait1$q
[,1]
[1,] -0.2814543
$Trait1$treeParam
[1] 0.01502596
$Trait1$message
[1] "R thinks that this is the right answer."

