# 7.S: Models of Discrete Character Evolution (Summary)

In this chapter I have described the Mk model, which can be used to describe the evolution of discrete characters that have a set number of fixed states. We can also elaborate on the Mk model to allow more complex models of discrete character evolution (the extended-Mk model). These models can all be used to simulate the evolution of discrete characters on trees.

In summary, the Mk and extended Mk model are general models that one can use for the evolution of discrete characters. In the next chapter, I will show how to fit these models to data and use them to test evolutionary hypotheses.

## Section 7.7: Footnotes

1: Imagine that you calculate a rate of character change by counting the number of changes of state of a character over some time interval, t. You can calculate the rate of change as nchanges/t. The instantaneous rate is the value that this rate approaches as t gets smaller and smaller so that the time interval is nearly zero.

back to main text

2: I will not cover the details of matrix exponentiation here – interested readers should see Yang (2006) for details – but the calculations are not trivial.

back to main text

3: One still obtains the relevant row from P(t) and draws a uniform random deviate u. Imagine that we have a ten-state character with states 0 - 9. We start at state 0 at the beginning of the simulation. Again using q = 0.5 and t = 3, we find that:

(eq. 7.17)

$$\begin{array}{l} p_{ii}(t) = \frac{1}{k} + \frac{k-1}{k} e^{-kqt} = \frac{1}{10}+\frac{9}{10}e^{-2 \cdot 0.5 \cdot 3} = 0.145\\ p_{ij}(t) = \frac{1}{k} - \frac{1}{k} e^{-kqt} \frac{1}{10} - \frac{1}{10}e^{-2 \cdot 0.5 \cdot 3} = 0.095\\ \end{array}$$

We focus on the first row of P(t), which has elements:

$$\begin{bmatrix} 0.145 & 0.095 & 0.095 & 0.095 & 0.095 & 0.095 & 0.095 & 0.095 & 0.095 & 0.095 \\ \end{bmatrix}$$

We calculate the cumulative sum of these elements, adding them together so that each number represents the sum of itself and all preceding elements in the vector:

$$\begin{bmatrix} 0.145 & 0.240 & 0.335 & 0.430 & 0.525 & 0.620 & 0.715 & 0.810 & 0.905 & 1.000 \\ \end{bmatrix}$$

Now we compare u to the numbers in this cumulative sum vector. We select the smallest element that is still strictly larger than u, and assign this character state for the end of the branch. For example, if u = 0.475, the 5th element, 0.525, is the smallest number that is still greater than u. This corresponds to character state 4, which we assign to the end of the branch. This last procedure is a numerical trick. Imagine that we have a line segment with length 1. The cumulative sum vector breaks the unit line into segments, each of which is exactly as long as the probability of each event in the set. One then just draws a random number between 0 and 1 using a uniform distribution. The segment that contains this random number is our event.

back to main text

## References

Brandley, M. C., J. P. Huelsenbeck, and J. J. Wiens. 2008. Rates and patterns in the evolution of snake-like body form in squamate reptiles: Evidence for repeated re-evolution of lost digits and long-term persistence of intermediate body forms. Evolution. Wiley Online Library.

Felsenstein, J. 2004. Inferring phylogenies. Sinauer Associates, Inc., Sunderland, MA.

Hedges, S. B., J. Dudley, and S. Kumar. 2006. TimeTree: A public knowledge-base of divergence times among organisms. Bioinformatics 22:2971–2972.

Lewis, P. O. 2001. A likelihood approach to estimating phylogeny from discrete morphological character data. Syst. Biol. 50:913–925.

Moch, J. G., and P. Senter. 2011. Vestigial structures in the appendicular skeletons of eight African skink species (squamata, scincidae). J. Zool. 285:274–280. Blackwell Publishing Ltd.

Pagel, M. 1994. Detecting correlated evolution on phylogenies: A general method for the comparative analysis of discrete characters. Proc. R. Soc. Lond. B Biol. Sci. 255:37–45. The Royal Society.

Paradis, E., J. Claude, and K. Strimmer. 2004. APE: Analyses of phylogenetics and evolution in R language. Bioinformatics 20:289–290. academic.oup.com.

Pianka, E. R., L. J. Vitt, N. Pelegrin, D. B. Fitzgerald, and K. O. Winemiller. 2017. Toward a periodic table of niches, or exploring the lizard niche hypervolume. Am. Nat. 190:601–616. journals.uchicago.edu.

Posada, D. 2008. jModelTest: Phylogenetic model averaging. Mol. Biol. Evol. 25:1253–1256. academic.oup.com.

Streicher, J. W., and J. J. Wiens. 2017. Phylogenomic analyses of more than 4000 nuclear loci resolve the origin of snakes among lizard families. Biol. Lett. 13. rsbl.royalsocietypublishing.org.

Vitt, L. J., E. R. Pianka, W. E. Cooper Jr, and K. Schwenk. 2003. History and the global ecology of squamate reptiles. Am. Nat. 162:44–60. journals.uchicago.edu.

Yang, Z. 2006. Computational molecular evolution. Oxford University Press.