24
Chapter 10 Keeping Yourself Updated: Bayesian Approaches in Phylogenetic Comparative Methods with a Focus on Markov Chain Models of Discrete Character Evolution Thomas E. Currie and Andrew Meade Abstract Bayesian inference involves altering our beliefs about the probability of events occurring as we gain more information. It is a sensible and intuitive approach that forms the basis of the kinds of decisions we make in everyday life. In this chapter, we examine how phylogenetic comparative methods are performed within a Bayesian framework, introducing some of the main concepts involved in Bayesian statistics, such as prior and posterior distributions. Many traits of bio- logical and evolutionary interest can be modelled as being categorical, or dis- cretely distributed, and here, we discuss approaches to investigating the evolution of such characters over phylogenetic trees. We focus on Markov chain models of discrete character evolution and how these models can be assessed using maxi- mum-likelihood and Markov Chain Monte Carlo techniques of parameter esti- mation. We demonstrate how this can be used to test functional hypotheses by examining the correlated evolution of different traits, illustrated with examples of sexual selection in primates and cichlid fish. We show how the order of trait evolution can be determined (potentially providing a stronger test of causal hypotheses) and how competing hypotheses can be assessed using Bayes factors. Attractive features of these Bayesian methods are their ability to incorporate uncertainty about the phylogenetic relationships between species and their repre- sentation of results as probability distributions rather than point estimates. We argue that Bayesian methods provide a more realistic way of assessing evidence and ultimately a more intellectually satisfying approach to investigating the diversity of life. T. E. Currie (&) Centre for Ecology and Conservation, Biosciences, College of Life and Environmental Sciences, University of Exeter, Penryn Campus, Penryn, Cornwall TR10 9FE, UK e-mail: [email protected] A. Meade School of Biological Sciences, University of Reading, Whiteknights Campus, Philip Lyle Building, Reading, Berkshire RG6, UK L. Z. Garamszegi (ed.), Modern Phylogenetic Comparative Methods and Their Application in Evolutionary Biology, DOI: 10.1007/978-3-662-43550-2_10, Ó Springer-Verlag Berlin Heidelberg 2014 263

Modern Phylogenetic Comparative Methods and Their Application in Evolutionary Biology || Keeping Yourself Updated: Bayesian Approaches in Phylogenetic Comparative Methods with a Focus

Embed Size (px)

Citation preview

Page 1: Modern Phylogenetic Comparative Methods and Their Application in Evolutionary Biology || Keeping Yourself Updated: Bayesian Approaches in Phylogenetic Comparative Methods with a Focus

Chapter 10Keeping Yourself Updated: BayesianApproaches in Phylogenetic ComparativeMethods with a Focus on Markov ChainModels of Discrete Character Evolution

Thomas E. Currie and Andrew Meade

Abstract Bayesian inference involves altering our beliefs about the probability ofevents occurring as we gain more information. It is a sensible and intuitiveapproach that forms the basis of the kinds of decisions we make in everyday life.In this chapter, we examine how phylogenetic comparative methods are performedwithin a Bayesian framework, introducing some of the main concepts involved inBayesian statistics, such as prior and posterior distributions. Many traits of bio-logical and evolutionary interest can be modelled as being categorical, or dis-cretely distributed, and here, we discuss approaches to investigating the evolutionof such characters over phylogenetic trees. We focus on Markov chain models ofdiscrete character evolution and how these models can be assessed using maxi-mum-likelihood and Markov Chain Monte Carlo techniques of parameter esti-mation. We demonstrate how this can be used to test functional hypotheses byexamining the correlated evolution of different traits, illustrated with examples ofsexual selection in primates and cichlid fish. We show how the order of traitevolution can be determined (potentially providing a stronger test of causalhypotheses) and how competing hypotheses can be assessed using Bayes factors.Attractive features of these Bayesian methods are their ability to incorporateuncertainty about the phylogenetic relationships between species and their repre-sentation of results as probability distributions rather than point estimates. Weargue that Bayesian methods provide a more realistic way of assessing evidenceand ultimately a more intellectually satisfying approach to investigating thediversity of life.

T. E. Currie (&)Centre for Ecology and Conservation, Biosciences, College of Life and EnvironmentalSciences, University of Exeter, Penryn Campus, Penryn, Cornwall TR10 9FE, UKe-mail: [email protected]

A. MeadeSchool of Biological Sciences, University of Reading, Whiteknights Campus,Philip Lyle Building, Reading, Berkshire RG6, UK

L. Z. Garamszegi (ed.), Modern Phylogenetic Comparative Methods and TheirApplication in Evolutionary Biology, DOI: 10.1007/978-3-662-43550-2_10,� Springer-Verlag Berlin Heidelberg 2014

263

Page 2: Modern Phylogenetic Comparative Methods and Their Application in Evolutionary Biology || Keeping Yourself Updated: Bayesian Approaches in Phylogenetic Comparative Methods with a Focus

10.1 Introduction

What are the chances of England winning the next football World Cup?1 An initialestimate, for those lucky enough to be unfamiliar with the performances of thenational team, might come from knowing that 32 teams take part in the finals ofthe tournament. Presuming that England qualify for this stage and prior to knowinganything else about England or football, we might assume that all teams have anequal chance of winning, meaning that the probability of England being victoriousis 1/32. However, differences in abilities between teams make it unsafe to assumethat all teams have an equal chance of winning. A look at how well England havedone in previous tournaments may also serve as a useful guide. England are onlyone of eight teams to have won the competition2 since it started in 1930. There-fore, we might adjust our estimate of the odds of success to 1:7. We might furtherlook at their record in tournaments over the last 15 years (i.e. since 1998) and seethat they have failed to make it beyond the quarter-finals and sometimes only as faras the round of 16. Given this information, we might alter our estimation of thechances of success down slightly. Once the World Cup finals kick off, we mightalso update these beliefs about England winning we had prior to the tournamentbased on how well (or more likely how badly) they play. If by some miracle theymade it through to the final, then even the most pessimistic fan would have toadjust their estimate to somewhere closer to an even chance of success.

Altering our beliefs about the probability of events occurring as we gain moreinformation is extremely sensible and obviously forms the basis of the kinds ofdecisions we make in everyday life. It is this kind of reasoning that forms the basis ofBayesian inference. In this chapter, we will examine how this is applied to phylo-genetic comparative methods, with a particular focus on traits that are categorical ordiscretely distributed. After first introducing some of the concepts involved inBayesian statistics, we will discuss earlier approaches to investigating the evolutionof discrete characters over evolutionary trees and how Bayesian approaches canovercome some of the limitations of these approaches. In the Online PracticalMaterial (hereafter OPM) available at http://www.mpcm-evolution.org, we willprovide specific examples of how Bayesian phylogenetic comparative methods areused to investigate interesting evolutionary questions.

10.2 Bayesian Inference

The Bayesian approach to probability can be summarized as follows: We have aninitial, or prior, belief about the probability of something being true which weadjust based on new information to arrive at our updated, or posterior, belief

1 This way of introducing this topic owes a debt to Ronquist et al. (2009), although here we focus onthe inadequacies of our national football team rather than the success of the Swedish ice hockey team.2 1966.

264 T. E. Currie and A. Meade

Page 3: Modern Phylogenetic Comparative Methods and Their Application in Evolutionary Biology || Keeping Yourself Updated: Bayesian Approaches in Phylogenetic Comparative Methods with a Focus

(Ronquist et al. 2009). This approach to thinking about probabilities was for-malized by Thomas Bayes in the eighteenth century in what is known as Bayestheorem, which states

Pr BjAð Þ ¼ Pr AjBð ÞPr Bð ÞPr Að Þ ð10:1Þ

This formula is read as the posterior probability of B given A Pr BjAð Þð Þ equals theprobability of A given B ( Pr AjBð Þð Þ, multiplied by the probability of B (Pr(B)) anddivided by the probability of A (Pr(A)) (Link and Barker 2009).

To go back to our football example, by some miracle let us imagine thatEngland have made it through to the World Cup final, and yet more miraculously,they have managed to score first. We can ask, what is the probability that Englandwill go on to win the final? We can calculate this using Bayes theorem which willtell us the probability that England will win given the new information that wehave about England scoring first.

P England winjScore firstð Þ ¼ P Score firstjEngland winð ÞP England winð ÞP Score firstð Þ

ð10:2Þ

In order to work this out, we need to know the prior probability of England scoringfirst (i.e. in general, how common is it for England to be the team that scoresfirst?), and also for those games where England do win, the probability that theyscored first. Looking back over the past records, we find that England score first inaround two-thirds of their games (i.e. a probability of 0.67), and in the games thatthey win, they score first 80 % of the time (i.e. a probability of 0.8). For the priorprobability of England winning, let us also say that at the beginning of the game,there was an equal chance that either team could win.

P England winjScore firstð Þ ¼ 0:8� 0:50:67

ð10:3Þ

Working this through gives us a probability of around 0.6 that England havingscored first will indeed end years of hurt and lift the World Cup trophy. In the nextsection, we will see how these concepts of using information to update our priorbeliefs and arrive at our posterior beliefs are used in the context of PCMs.

10.3 Phylogenetic Comparative Methods and DiscreteCharacters

Comparing traits across species is a fundamental part of biology and enables us totest hypotheses about the functions of the traits and gain insights into their evo-lutionary history. In phylogenetic comparative methods (PCMs), we map traits of

10 Keeping Yourself Updated: Bayesian Approaches 265

Page 4: Modern Phylogenetic Comparative Methods and Their Application in Evolutionary Biology || Keeping Yourself Updated: Bayesian Approaches in Phylogenetic Comparative Methods with a Focus

interest onto a phylogeny (which shows how the species are related evolutionarily)and work backwards to make inferences about the pattern and process of change inthese traits. Evolutionary trees contain information that enables us to examinebiological diversity and make inferences about where, when, and how traits havechanged over time and to test hypotheses about why such diversity exists (Pagel1999). As the chapters in this book demonstrate, a variety of methods have beendeveloped that can address a number of important evolutionary questions.

PCMs can be used to analyse both continuously and discretely distributed data.Typical continuous characters involve measurable features of size and distance(e.g. body size, wing length), while discrete traits are those that can be thought ofas falling into distinct categories (e.g. mating system, feeding behaviour) orreflecting presence or absence of a certain trait.3 The majority of the other chaptersin this book deal with methods designed for continuous data (but see Chap. 9 byIves and Garland, Chap. 11 by de Villemereuil and Nakagawa, and Chap. 16 byBeaulieu and O’Meara). Therefore, here, we will deal primarily with discretecharacters and how they can be implemented in a Bayesian framework. At the endof this chapter, we will briefly see how this approach can be extended easily tomethods that utilize continuous traits. In order to understand the benefits aBayesian approach can have, we will first examine some of the other methods thathave been developed to analyse discrete traits.

10.3.1 Modelling the Evolution of Discrete Characters

10.3.1.1 Parsimony

The earliest PCMs for discrete traits were based on the idea of maximum parsi-mony, i.e. minimizing the number of evolutionary changes (Maddison 1990).Given a certain distribution of character states at the tips of the tree, there are manydifferent possible ways that a character can change over the tree. Parsimonymethods find the pattern4 that involves the lowest number of transformationsbetween character states. Parsimony works under an implicit assumption that therate of evolution is slow,5 and when this is the case, it leads to fairly accuratereconstructions of character evolution (Huelsenbeck et al. 2003). In the basicimplementation of parsimony, only a single change can occur along a branch, anda change from one state to any other is equally probable. This approach can bemodified slightly by proposing a cost matrix, wherein certain changes incur ahigher tariff (Maddison and Maddison 2009).

3 It should be noted that count data, such as clutch size, are also technically discrete yet are notcategorical.4 or patterns if more than one solution is possible.5 relative to rate at which new lineages form.

266 T. E. Currie and A. Meade

Page 5: Modern Phylogenetic Comparative Methods and Their Application in Evolutionary Biology || Keeping Yourself Updated: Bayesian Approaches in Phylogenetic Comparative Methods with a Focus

10.3.1.2 Maximum Likelihood

Parsimony is somewhat limited in that it only provides reconstructions of thepattern of changes in the character of interest. An alternative is to adopt a model-based approach that seeks to make inferences about the process of characterevolution (from which likely patterns of changes can be reconstructed) (Pagel1994a; Sanderson 1993). For example, the evolution of a binary trait (i.e. takingvalues of 0 and 1) can be modelled in a very simple manner invoking just twoparameters, a rate of change from 0 to 1 and a rate of change from 1 to 0. In fact,we can even propose a simpler model with just one parameter, if we assume thatthese two rates are equal. We can use the information about the distribution of 0sand 1s at the tips of the tree, and the branch lengths of the tree, in order to estimatethese rates of change. A slow rate of change is likely to lead to outcomes whereclosely related species generally exhibit the same character, while under fasterrates of change, even closely related species will not necessarily share similarcharacters (Fig. 10.1).

In practical terms, character evolution is modelled using a continuous-timeMarkov chain, which is a mathematical system that transitions at random betweendifferent character states. One of the features of a Markov process is that it has no‘‘memory’’; the probability of change from one state to another depends only onthe current state and not on what has happened previously. A transition matrix isused to describe the rate of change between different character states (Fig. 10.1).6

These rates are known as instantaneous rates of change and reflect the probabilityof change over an infinitesimally small amount of time. This approach is extremelyflexible and can be readily extended to multiple character states, and more com-plexity can be added to reflect variation in the rate of change between differentcharacter states. For a given number of character states, different models, whichrepresent alternative evolutionary hypotheses, can be constructed and assessed asto how well they explain the observed data. By setting certain rates of changebetween character states to be zero, hypotheses about different evolutionarypathways can be tested (Currie et al. 2010; Hibbett 2004; Pagel 1994a). Using theexample in Fig. 10.1, if we wanted to test the hypothesis that a certain can begained but never lost, then we could set q10 to 0, indicating that the transition from1 to 0 cannot occur. This could then be tested against other models, which allowchanges in both directions. Using this approach, Currie et al. (2010) examinedcompeting hypotheses relating to alternative evolution pathways of human polit-ical organization and found that changes follow incremental steps of increasinghierarchical complexity, with larger jumps not occurring.

The fit of the models to the data and the value of the parameters can be assessed bycalculating what is known as the likelihood function. Using maximum-likelihood(ML) estimation, we search for the values of the model of evolution that give thebest description of the data (i.e. the values that maximize the likelihood function)

6 For more on transition matrices, see Chap. 16 by Beaulieu and O’Meara in this volume.

10 Keeping Yourself Updated: Bayesian Approaches 267

Page 6: Modern Phylogenetic Comparative Methods and Their Application in Evolutionary Biology || Keeping Yourself Updated: Bayesian Approaches in Phylogenetic Comparative Methods with a Focus

(Pagel 1999). Using the example in Fig. 10.1, let us imagine we are estimating asimple one-parameter model (i.e. q01 = q10). If we were to propose a high value forthis rate parameter, it would produce a low likelihood. Proposing a lower valuewould result in a higher (i.e. better) likelihood. Proceeding like this, we wouldpropose lower values until we reached a point where lower values began producinglower (i.e. worse) likelihoods (see Fig 10.2). By comparing the maximum likeli-hoods of different models, we can test between different hypotheses about theevolutionary process that gave rise to the observed data (see below, and Garamszegiand Mundry Chap. 12, this volume).

One of the key advantages of model-based approaches over parsimony is thatthey use the information about the branch lengths of the tree in the analyses. Forexample, because more changes are likely over a long time period than a short one,we would intuitively expect that saying something about the likely character state inancestral species becomes more difficult the further back in time you go. However,parsimony discards this information and attaches the same probability to theancestor of two sister species, regardless of whether they diverged 100 years ago or100 million years ago. Under model-based methods, however, the probability of theinferred ancestral state is affected by the branch lengths of the tree (see Fig. 10.3).

Fig. 10.1 Model-based phylogenetic comparative methods use character data mapped onto thetips of a phylogenetic tree to infer the parameters of a model of character evolution. Theevolution of binary, or two-state, character can be modelled simply with two parameters, a rate ofchange from 0 to 1 and rate of change from 1 to 0. In this example, closely related species tend topossess the same character state, indicating a slow rate of change. When using continuous-timeMarkov chain methods, these rate parameters are represented in a transition (or ‘‘Q’’) matrix

268 T. E. Currie and A. Meade

Page 7: Modern Phylogenetic Comparative Methods and Their Application in Evolutionary Biology || Keeping Yourself Updated: Bayesian Approaches in Phylogenetic Comparative Methods with a Focus

10.4 Bayesian Methods

10.4.1 Dealing with an Uncertain World

Under maximum-likelihood methods, we find point estimates of parameter valuesthat provide the best fit to the data. However, there may be a range of parametervalues (which give slightly lower likelihoods) that still provide a reasonabledescription of the data. Rather than just calculating the maximum-likelihoodestimate of parameter values, we can employ a Bayesian approach to estimate theposterior probability distribution of values (Fig. 10.4) (Pagel and Meade 2005). Inother words, we start with some prior distribution reflecting the possible values ofthese parameters (see below); we then update this distribution based on theanalysis to arrive at the posterior distribution of the parameter values given theobserved data. This allows us to incorporate uncertainty in the parameter estimatesinto our analyses.

This framework also allows us to incorporate phylogenetic uncertainty into ouranalyses (Huelsenbeck et al. 2000; Pagel et al. 2004; Huelsenbeck and Rannala2003; and Chap. 3 this volume). Rarely can we know the phylogenetic relationshipsbetween species without error. Importantly, our inferences about how traits haveevolved may differ, depending on what we assume about the phylogenetic rela-tionships between species. Rather than attempting to represent these phylogeneticrelationships with a single tree, it is more principled to use a collection of trees thatrepresent likely alternative hypotheses about how species are related. Furthermore,de Villemereuil et al. (2012) demonstrate that using a Bayesian approach toincorporate phylogenetic uncertainty in analyses of linear models is more accurate(i.e. reduces the error rate associated with estimates of model parameters) than

Fig. 10.2 Example of a likelihood surface showing how the likelihood of the model changeswith different values of the rate parameter. In this example, the value of the parameter thatmaximizes the likelihood is around 1.6

10 Keeping Yourself Updated: Bayesian Approaches 269

Page 8: Modern Phylogenetic Comparative Methods and Their Application in Evolutionary Biology || Keeping Yourself Updated: Bayesian Approaches in Phylogenetic Comparative Methods with a Focus

running a regular PGLS7 analysis using a single tree. The collection of trees couldrepresent different published hypotheses, but probably more commonly comes froma posterior sample of phylogenetic trees from a Bayesian method of phylogeneticinference (i.e. trees created from an analysis of genetic or morphological data,where phylogenetic trees are sampled in proportion to their probability). Forexample, Bayesian posterior samples of 10,000 phylogenetic trees representing the

Fig. 10.3 Model-based phylogenetic comparative methods make use of the information from thebranch lengths of phylogenetic trees. Here, we can see how knowledge of the branch lengths(which represent evolutionary time, or more generally evolutionary distance, if the branch lengthsare not in units of time) can affect estimation of the ancestral character states. In situation (i),species A and B diverged relatively recently, meaning we can be more certain that their commonancestor shared the same character state. In situation (ii), however, divergence occurred further inthe past, which means there is more uncertainty about the reconstruction of this character. In thishypothetical example, the analyses indicate that the probability that the common ancestor had thesame character state as species A and B is around 0.75. Parsimony analyses do not use branch-length information and so would return the same answer under both scenarios

Fig. 10.4 Bayesian MCMC methods produce a posterior distribution of likelihoods (left) andparameter values (right). The straight vertical lines represent the equivalent estimates under amaximum-likelihood analysis. Notice in the Bayesian analysis, the likelihoods reach themaximum likelihood but do not exceed it (that is what maximum means!). The rate parameterestimates fall either side of the maximum-likelihood value as slightly higher or lower valuesproduce slightly worse likelihoods

7 Phylogenetic generalized least squares.

270 T. E. Currie and A. Meade

Page 9: Modern Phylogenetic Comparative Methods and Their Application in Evolutionary Biology || Keeping Yourself Updated: Bayesian Approaches in Phylogenetic Comparative Methods with a Focus

evolutionary relationships between (respectively), (i) primates, (ii) carnivorans, (iii)even-toed ungulates and cetaceans, and (iv) odd-toed ungulates, are available fromthe 10kTrees website8 with the intention of their being employed in comparativeanalyses (Arnold et al. 2010). With Bayesian PCMs, we can naturally incorporatephylogenetic uncertainty by performing the analysis over a sample of trees.9 In theterms of Bayes theorem we introduced earlier essentially, we are asking, what isthe probability of the model of evolution given the data and the sample of phylo-genetic trees? To do this, we need to give values for the prior probabilities of (i) thedata given the model and the trees, (ii) the model, and (iii) the trees.

Incorporating these different forms of uncertainty into our analyses in this wayis an intellectually satisfying (but practically challenging) feature of BayesianPCMs because it gives a better idea about how strong the support for any particularhypothesis actually is (as good scientists, we should always be sceptical about ourmodels and look to see how robust they are to different assumptions). For example,if there is a strong signal in the data, then the posterior distribution of parametervalues should cluster closely around the maximum-likelihood estimate. However,if there is a weaker signal, the posterior will be wider and may be more likely tooverlap with alternative models. Likewise, we need to assess whether the strengthof support for a particular hypothesis is affected heavily by the particular evolu-tionary relationships given by different phylogenetic trees.

10.4.2 MCMC Estimation

In order to estimate the posterior distribution of parameter values, we can use theMarkov chain Monte Carlo (MCMC) procedure to explore and take a sample ofvalues from ‘‘parameter space’’. In this technique, parameter values are sampled inproportion to their posterior probability (i.e. more probable values are sampledmore frequently). Essentially, the chain starts with some approximate parametervalues and a tree drawn at random from the tree sample. The likelihood of the datagiven these values and the tree is then calculated. At the next step, the values of theparameters and the tree from the sample are changed at random and the likelihoodis again calculated. The new parameter values are either accepted, or the old valuesare retained. If the new likelihood is an improvement on the previous likelihood,then the new values are accepted. Otherwise, they are accepted only with a certainprobability, depending on how worse the new likelihood is.10 This process isrepeated many times. Eventually, the chain ends up searching more often through

8 http://10ktrees.fas.harvard.edu/9 See Garamszegi and Mundry Chap. 12, this volume, for an example of how to incorporatephylogenetic uncertainty within an Information Criterion framework.10 The process described here relates to the Metropolis–Hastings MCMC algorithm. However,other algorithms such as the Gibbs sampler are also available that follow different rules abouthow they accept new values and explore the posterior distribution.

10 Keeping Yourself Updated: Bayesian Approaches 271

Page 10: Modern Phylogenetic Comparative Methods and Their Application in Evolutionary Biology || Keeping Yourself Updated: Bayesian Approaches in Phylogenetic Comparative Methods with a Focus

the areas of parameter space that provide the highest likelihoods (Fig. 10.5). Atthis point, which is known as convergence, the chain is sampling from the pos-terior distribution.

There are two important issues we need to be aware of in evaluating the output ofMCMC analyses. Firstly, at the beginning, the MCMC has generally started at apoint away from the posterior distribution and the initial stages are characterized bya ‘‘hill-climbing’’ phase as the chain moves from the low-likelihood region ofparameter space (Fig. 10.5). The chain is described as converging on the posteriordistribution. As we are looking to estimate the posterior distribution, we need todiscard the initial pre-convergence, or ‘‘burn-in’’, phase of the MCMC. Secondly,the way new values in the MCMC procedure are accepted or rejected means suc-cessive steps in the chain may be correlated with one another. Potentially, thisautocorrelation can lead to a biased sample that is not representative of the pos-terior distribution. While running the analysis for a sufficiently long period of timewould ameliorate this problem, this could lead to a large and unnecessarilyunwieldy amount of output. The usual solution, known as thinning, is to takesamples from the MCMC at regular intervals (e.g. every 100 steps), rather thanoutput every single iteration of the chain. The sampling frequency can be deter-mined by examining the degree of autocorrelation from initial exploratory analyses.

10.4.3 Priors

In order to come up with our posterior beliefs, Bayesian approaches require us tospecify the prior beliefs. For these PCMs, this means specifying what values we

Fig. 10.5 Example of the early stages of an MCMC sampling procedure. From a random startingposition, the algorithm gradually finds parameter values that provide a better fit to the data, until itreaches the region of the posterior distribution. The initial phase where the likelihoods aregenerally increasing is known as the burn-in

272 T. E. Currie and A. Meade

Page 11: Modern Phylogenetic Comparative Methods and Their Application in Evolutionary Biology || Keeping Yourself Updated: Bayesian Approaches in Phylogenetic Comparative Methods with a Focus

think characterize the rates of evolution. Our parameter values are continuous andin theory could take an infinite possible number of states. To make the processtractable, we instead specify a prior distribution for the parameters (Ronquist et al.2009). This is an extremely important aspect of Bayesian methods and is both ablessing and a curse. One advantage is that it allows us to incorporate other sourcesof knowledge so that we do not waste time exploring answers that cannot possiblybe true. The downside is that often we do not have much information about whatthese priors should be. In the case of PCMs, it is difficult to know what values ofthe rates of evolution are sensible a priori. Caution needs to be exercised as if thereis not a strong signal in the data, then the particular prior used can have a big effecton the posterior and therefore may determine the answer we arrive at (Pagel andMeade 2005). Indeed, the weaker the signal, the more the posteriors sample thepriors, meaning that in the extreme, the posterior sample will be the same as theprior.

There are a number of different prior distributions that can be used (Fig. 10.6).The simplest and least restrictive is the uniform distribution, which assumes thatany value between two specified points is equally likely. An alternative is theexponential distribution, which assumes that lower values are more likely (whichmay be plausible biologically if we share the assumption of parsimony that rates ofevolution are generally low). Another common prior is the gamma distribution,which can take a variety of shapes, in some cases approximating an exponential, inother cases assuming that mid-range values are most likely (this may be preferableif we know certain changes have definitely occurred and therefore rate values mustbe greater than zero). In cases where there is not much information to guide ourchoices, it is preferable to use a uniform distribution, as this has the fewestassumptions. However, if the signal in the data is not strong enough, it may benecessary to specify a stronger prior. This can be assessed by examining theposterior distributions of the parameters and seeing whether they centre around aparticular value or whether they have maintained a relatively flat distribution.Different prior distributions can be explored, and their effect on the results can be

Fig. 10.6 Examples of different prior probability distributions that can be used in Bayesianphylogenetic comparative analyses. Under a uniform distribution, all values within a given rangeare equally probable. Lower values are more probable under exponential distributions (hereshown with varying distribution parameters, lambda). Gamma distributions have two parameters(shape: alpha and scale: beta), which can give rise to a variety of different shaped distributions.Under certain parameter values, the gamma distribution is similar to an exponential, and othersgive a humped distribution with moderate values being most probable

10 Keeping Yourself Updated: Bayesian Approaches 273

Page 12: Modern Phylogenetic Comparative Methods and Their Application in Evolutionary Biology || Keeping Yourself Updated: Bayesian Approaches in Phylogenetic Comparative Methods with a Focus

examined. If a particular result is determined by the choice of prior, then thereshould be good, justifiable reasons for choosing that prior. The results of maxi-mum-likelihood analyses are a useful way of guiding the choice of prior values asthey can give an indication of the mid-point of the posterior distribution (althoughthey will not define the range of the prior). As a general rule of thumb if theposterior distribution appears to be truncated at either the upper or lower limitsdefined by an informative (i.e. non-uniform) prior, then the limits of the priorshould be adjusted. One useful approach is to use hyperpriors, where the values ofthe prior distribution are not set but can also vary (see glossary and the OPM). Thisprovides more information than a uniform distribution, but is less constrainingthan a regular, single prior distribution.

10.5 Assessing Models of Evolution

When using model-based methods with discrete characters, we are generally notinterested in the values of the rate parameters themselves.11 Instead, the aim is tocompare different models. Usually, we are more interested in whether one model(which represents a particular hypothesis) is a better explanation of the data thananother model (representing an alternative hypothesis). For example, we mightwant to know whether change between two states of a binary trait occurs at thesame rate in both directions or whether changes from 0 to 1 occur at a higher ratethan from 1 to 0. We will see later how this approach is used to assess whether twotraits evolve together in a correlated fashion or whether they have evolved inde-pendently of each other.

Under maximum likelihood, if one model can be thought of as ‘‘nested’’ withinanother model (i.e. one model is a simpler version of another model, with certainparameters set to be equal to each other, or ‘‘switched off’’ by setting them to zero),then models can be compared via a likelihood ratio test (Posada 2009). The likeli-hood ratio statistic is calculated as double the difference of the log-likelihoods of thesimpler and the more complex model. Generally, this statistic is assumed toapproximate a chi-squared distribution, with degrees of freedom determined by thedifference between the number of parameters in each model. This therefore takes intoaccount the fact that a nested model with more parameters will never produce aworse maximum likelihood, and it is easier to get a higher likelihood with moreparameters. A more general framework for comparing both nested and non-nestedmodels is model-selection procedures involving information criteria (e.g. AIC,BIC), which contain an explicit term that takes into account the number of param-eters in a model (models with too many parameters get ‘‘penalized’’) (Burnham andAnderson 2002; see also Garamszegi and Mundry Chap. 12, this volume).

11 They are a function of the data, model, and distribution of tree used in the analysis, whichmakes them hard to compare across analyses.

274 T. E. Currie and A. Meade

Page 13: Modern Phylogenetic Comparative Methods and Their Application in Evolutionary Biology || Keeping Yourself Updated: Bayesian Approaches in Phylogenetic Comparative Methods with a Focus

Exactly the same idea of comparing alternative models is at the heart ofBayesian approaches to statistical inference. Whereas under maximum likelihoodwe are comparing the likelihoods of two models in a Bayesian framework, weneed to compare two posterior probability distributions, using what is known as themarginal likelihood of each model. The marginal likelihood of a model is itslikelihood scaled by the prior probabilities and integrated over all the trees in thesample and all values of the rate parameters (Pagel and Meade 2005).12 Thisincorporation of the priors means that a model with more parameters is not undulyfavoured (just as extra parameters are penalized in the likelihood ratio test and AICmethods described above). In a Bayesian framework, we can test between differenthypotheses by calculating a measure known as a Bayes factor (Kass and Raftery1995).13 This is effectively a ratio of probabilities of the data given the differenthypotheses and can be calculated as the ratio of the marginal likelihoods ofmodels. Bayes factors are interpreted somewhat subjectively with rules of thumbbeing employed to assess the strength of evidence in favour of one hypothesis oranother. Since these values are based on log-likelihoods, the difference betweenthem can be doubled so that they are on the same scale as likelihood ratio statistics.A value of less than zero is obviously evidence against the main hypothesis (andtherefore evidence in favour of the alternative hypothesis). According to Kass andRaftery (1995), values between 0 and 2 are only just in favour of the hypothesisand not worth placing too much confidence in, 2–6 are described as ‘‘positive’’evidence, 6–10 are ‘‘strong’’, while more than 10 is ‘‘very strong’’. In the followingsections, we will see how these concepts are applied in some examples of com-parative analyses using Bayesian methods.

10.6 Using Model-Based Methods to Test FunctionalHypotheses

Most functional hypotheses take the form of arguing that a certain trait reflects anadaptive response to some other variable. This underlies the classic textbookexamples of natural selection, variation in beak shapes in finches being a responseto different diets, and changes in the frequencies of black and white variants of thepeppered moth being linked to changing environments caused by industrialization.We can compare a range of different species to ascertain whether a general rela-tionship between our variables of interest exists. This comparative method is one

12 An approximation of the marginal likelihood is part of the output of the program used in thepractical section that accompanies this chapter.13 Note that using Bayes factors (and model selection criteria such as AIC), it is possible to findevidence for a null hypothesis, something that is not possible in classical, frequentist statisticswhere the null hypothesis can only be rejected.

10 Keeping Yourself Updated: Bayesian Approaches 275

Page 14: Modern Phylogenetic Comparative Methods and Their Application in Evolutionary Biology || Keeping Yourself Updated: Bayesian Approaches in Phylogenetic Comparative Methods with a Focus

of the three ways that evolutionary or behavioural ecologists assess evidence foradaptive hypotheses (the others being experiments and optimality modelling)(Davies et al. 2012).

Pagel (1994a) developed an elegant method for testing whether two binary traitshave indeed evolved together. This method is implemented in the programBayesTraits14 and enables both maximum-likelihood and Bayesian MCMC methodsof estimation. To illustrate this approach, let us consider the hypothesis that oestrusadvertisement by females reflects an adaptation to living in multimale groups (Pagel1994b; Domb and Pagel 2001) (we will return to this example later in the chapter andin the OPM). Prominent sexual swellings in female primates indicate when a femaleis fertile and most likely to conceive. They are hypothesized to have evolved inspecies that have groups with multiple males, who compete for access to the females.Looking at raw data from 60 species of Old World monkeys and apes, there appearsto be an association between these two variables. Nineteen species have both mul-timale groups and females with conspicuous oestrus, 28 species lack either trait, ninespecies have multimale groups but lack oestrus advertisement, while none ofthe species have only single-male groups with females who advertise.15 Of these60 species, many are macaques (almost all of which possess both traits) and many aregibbons (all of which lack these traits). There is a strong possibility that we mightbe overestimating the strength of the association between these traits unless weadequately incorporate the phylogenetic relationships between these species.

Under Pagel’s method, we explicitly compare a model of evolution in whichthese two traits evolve together (a dependent, or co-evolutionary model) andmodel in which the two traits evolve without affecting each other at all (anindependent model). For two binary traits, there are four possible ways that thesetraits can co-occur across species (i.e. 00, 01, 10, 11). The dependent modelproposes that there are 8 possible ways that traits can change between these fourpossible states (Fig. 10.7). For example, a species with a single-male system andwithout oestrus advertisement can develop either a multimale system or oestrusadvertisement (it is unlikely that both traits change at exactly the same time, andthis cannot happen under this model). The instantaneous rates of these changesmake up the parameters of our model of evolution (i.e. the Q matrix we cameacross earlier). Under this model, the rate of change of one trait depends on thestate of the other. It is this characteristic that makes this a model of co-evolution. Itfollows from this that an independent model would be one where the rate ofchange of one trait does not depend on the state of the other. Such a model can beachieved if we set the relevant parameters to be equal to each other (e.g. if the rateof change from single- to multimale systems is the same regardless of whetheroestrus advertisement is present or not) (Fig. 10.7).

14 http://www.evolution.rdg.ac.uk/BayesTraits.html15 Four species lack data for one of the traits, which illustrates that these methods can handlemissing data; the likelihood is simply integrated over all possible character states in these cases.See also chap. 11 by de Villemereuil and Nakagawa for a discussion of the issues surroundingmissing data and how to deal with them.

276 T. E. Currie and A. Meade

Page 15: Modern Phylogenetic Comparative Methods and Their Application in Evolutionary Biology || Keeping Yourself Updated: Bayesian Approaches in Phylogenetic Comparative Methods with a Focus

We can run analyses using Old World monkey and ape data over a sample ofphylogenetic trees, which represent the uncertainty about the phylogenetic rela-tionships between these species. Figure 10.8 shows how the MCMC algorithmsamples from the posterior distribution. This is done for both the dependent andthe independent models of evolution. Thus, for our primate data, we obtain esti-mates from these preliminary analyses of the marginal mean of *41 log-units forthe dependent model and *46 log-units for the independent model. Comparingthe dependent model to the independent model for our primate data gives us aBayes factor16 of 10, which means there is strong evidence that oestrus adver-tisement has indeed co-evolved with multimale systems. Therefore, the associationbetween the traits we saw when we examined the raw data is not simply an artefactof the historical relationships between the species.

This example shows how we can get some measure of whether two traits haveevolved together or not. We can also use these methods to investigate more aboutthe specific evolutionary history of the traits we are interested in and build up apicture of where and when they have changed. A neat thing about this approach isthat we can go beyond simple measures of association and examine the order inwhich the traits have occurred, particularly if we explicitly reconstruct the likelystate of traits at ancestral nodes in the tree. This can provide a much stronger testof causal hypotheses. If changes in a certain trait are hypothesized to precedechanges in another trait, and if our analyses indicate that the order of trait changesis actually the other way round, then we can reject that hypothesis.17 We willreturn to our primate example in the OPM to give a demonstration of how this isdone.

Fig. 10.7 Dependent and independent models of evolution under Pagel’s method (1994a). Theindependent model can be seen to be a simpler version of the dependent model, which occurswhen the arrows diagonally opposite each other (i.e. those that are the same colour) have thesame rate of evolution

16 on the scale discussed earlier.17 It is important to note that while we can falsify causal hypotheses in this way, if we do findevidence for the hypothesized order of trait changes, this does not prove causation but is at leastconsistent.

10 Keeping Yourself Updated: Bayesian Approaches 277

Page 16: Modern Phylogenetic Comparative Methods and Their Application in Evolutionary Biology || Keeping Yourself Updated: Bayesian Approaches in Phylogenetic Comparative Methods with a Focus

A nice example of this approach is provided by Fitzpatrick et al. (2009), whoshow how female promiscuity, which creates increased sperm competition, leads tolarger and faster sperm. The authors examined the strength of sperm competition(based on breeding characteristics) and the speed and size of spermatozoa in 29species of cichlid fish from Lake Tanganyika in eastern Africa. Ancestral statereconstruction using the Markov chain approach we have been discussing indicatedthat it was likely that the common ancestor of all these species experienced lowsperm competition and had small, slow sperm. Examining the rates of change in theirdependent models of evolution, they found that some parameters frequently took avalue of zero, providing evidence that this transition had not occurred during theevolutionary history of these species. This allowed them to assess the likely order inwhich these traits changed. Their analyses indicate that sperm initially became fasterbefore getting bigger, and importantly, both sperm size and speed increase afterincreases in levels of sperm competition, which is consistent with the idea of femalepromiscuity driving these changes in sperm morphology (Fig. 10.9).18

Fig. 10.8 Example of MCMC sampling from the posterior distribution under dependent (blue)and independent (red) models of evolution. The dependent model is generally returning higherlikelihoods, indicating that it is a better fit to the data than the independent model. Note that theinitial burn-in phase of the chain has been discarded

18 It is important to point out that the traits in these analyses were created by binarizing whatwere initially continuously varying characters. While perhaps not an ideal way to treat thesecharacters, the study still provides a neat example of how the order of trait changes can beinferred using Pagel’s method, which is attractive for testing casual, adaptive hypotheses. In casessuch as this, the distribution of a continuous character may provide information about whethercategorization is justifiable. For example, Holden and Mace (1997) showed that continuousphysiological variable lactose digestion capacity (LDC) exhibited a bi-model distribution,therefore making the decision to binarize the trait into high and low LDC populations

278 T. E. Currie and A. Meade

Page 17: Modern Phylogenetic Comparative Methods and Their Application in Evolutionary Biology || Keeping Yourself Updated: Bayesian Approaches in Phylogenetic Comparative Methods with a Focus

Other examples of this Bayesian approach have involved studies of mechanismsof sex determination in marine reptiles (Organ et al. 2009), activity periods (Griffinet al. 2012), and social systems in primates (Shultz et al. 2011), and the evolutionof brood parasitism in bees (Cardinal et al. 2009). These methods have also beenapplied to human cultural evolution to examine such things as post-marital resi-dence (Jordan et al. 2009), systems of grammar (Dunn et al. 2011), and politicalcomplexity (Currie et al. 2010). It can be seen from the above examples that thesemodel-based techniques are extremely flexible and allow a wide range of evolu-tionary questions to be addressed. This approach allows extensions to these simplemodels to be easily incorporated. For example, these basic models assume that therate of evolution is constant over the tree. However, it is possible to test whetherthe rate of evolution actually varies over the tree (Penny et al. 2001) or whether therate of change increases during speciation events (i.e. a punctuated mode ofevolution) (Pagel et al. 2006; Pagel 1999).

Fig. 10.9 Flow diagrams showing the inferred rates of change from three analyses of spermcompetition and sperm characteristics in cichlid fish. Ancestral state reconstructions indicate thatthe common ancestor of 29 species of these fish had slow, small sperm and experienced lowlevels of sperm competition. These analyses indicate a clear direction to the order in which thetraits change. Sperm gets faster before getting larger (top left), and both sperm size (top right) andsperm speed (bottom middle) increase after sperm competition increases. Figure redrawn fromfigures in Fitzpatrick et al. (2009) and modified with permission

(Footnote 18 continued)understandable. Section 10.7 discusses an alternative way to model binary characters that have anunderlying continuous distribution.

10 Keeping Yourself Updated: Bayesian Approaches 279

Page 18: Modern Phylogenetic Comparative Methods and Their Application in Evolutionary Biology || Keeping Yourself Updated: Bayesian Approaches in Phylogenetic Comparative Methods with a Focus

10.7 Further Issues and Advanced Topics

10.7.1 Stochastic Character Mapping and Alternative Waysto Model Discrete Characters

A further extension of this kind of model-based Bayesian approach is to employthe inferred rate of change to explicitly reconstruct the changes a characterundergoes over the whole phylogeny, using a technique known as stochasticcharacter mapping (SCM) (Bollback 2006; Huelsenbeck et al. 2003). We sawearlier how this was traditionally done using parsimony techniques, and characterhistories can also be approximated with likelihood methods by reconstructinglikely states at ancestral nodes and noting where character changes seem to occurbetween these nodes. SCM goes one step further, by producing a posterior sampleof ancestral states and likely changes along the branch, and unlike previoustechniques, SCM can show multiple changes along a branch. By explicitly con-sidering the rate of change and branch lengths in these character histories, SCMmakes more use of the information available. In addition to this kind of descriptiveapplication, SCM can also be used to detect signatures of positive selection ingenetic data and provides an alternative assessment of co-evolution based on theamount of time traits spend together in certain states19. Furthermore, the outputfrom SCM analyses can be used in further analyses that examine how other traitsare evolving, e.g. variation in rates of change of a continuous character (O’Mearaet al. 2006) or the different selective regimes in OU models (Beaulieu et al. 2012).

Here, we have focussed on the Markov chain approach to modelling the evo-lution of discrete characters. However, it should be noted that other methods arealso possible. For example, logistic regression (i.e. a regression analysis in whichthe dependent variable is a categorical variable) can be adapted to incorporate thevariance–covariance structure derived from the phylogenetic associations betweenspecies (Ives and Garland 2010; Ives and Garland Chap. 9 this volume). Also,categorical traits can be modelled as if they are related to a continuously varyingunderlying scale (the liability); above a certain value, the trait takes one form,while below this value, it takes another form, etc. (Felsenstein 2005, 2012). Oneadvantage of these methods is that they allow us to examine the covariationbetween more than just two binary characters.20 On the other hand, they do notallow us to make direct inferences about the order in which traits change in themanner that Pagel’s method does. As with all investigations, the particular methodthat should be employed will depend on the question being asked and the dataavailable to answer it.

19 SCM is implemented in the program SIMMAP (http://www.simmap.com/) (Bollback 2006).20 This is potentially possible in Pagel’s method described above, but would be morecomplicated and involve many more parameters.

280 T. E. Currie and A. Meade

Page 19: Modern Phylogenetic Comparative Methods and Their Application in Evolutionary Biology || Keeping Yourself Updated: Bayesian Approaches in Phylogenetic Comparative Methods with a Focus

10.7.2 Minimum Models and Reversible-Jump MCMC

One practical issue faced by the model-based approach is to find the optimumnumber of parameters that sufficiently describe the evolutionary process, but donot ask too much of the data. For example, the evolution of a single binary traitmay be best described by a simple model in which rates of gains and losses aredescribed by a single parameter, rather than a model in which these two rates areboth estimated. So an important task is to try and find minimum models by settingsome parameters to zero or making some parameters equal to each other (Pageland Meade 2005). Even for models with only a few rate parameters, the number ofpossible ways to do this becomes very large, very quickly. A Bayesian techniqueknown as reversible-jump MCMC (Green 1995; Pagel and Meade 2006) allows usto explore this universe of different models and not only sample parameter valuesin proportion to their probability, but also sample the different models of evolutionthemselves, i.e. those models with the optimal number of parameters to explain thedata well. By examining the posterior distribution of models, we have a direct wayof testing different scenarios of trait evolution, e.g. deciding between dependentand independent models of trait evolution.

10.7.3 Continuous Traits and Packages for PerformingBayesian PCMs

Many other chapters in this book introduce and discuss methods designed forvariables that are continuously distributed. The same principles of Bayesian infer-ence can be applied to these methods, too. The main difference is that instead of therate parameters of a Markov chain, we want to find the parameters of models thatinvolve continuous variables and their evolution. For example, the posterior distri-butions of the slope and intercept parameters of a linear model (de Villemereuil et al.2012) or the variance and strength of selection parameters of an OU model (Beaulieuet al. 2012) could be estimated in a Bayesian framework. In addition to employingMarkov chain models of discrete trait evolution, the software used in the OPM(BayesTraits) can perform Bayesian implementations of phylogenetic generalizedleast squares regression and correlation analyses. Additionally, open source softwarefrom Bayesian inference using Gibbs sampling (BUGS) and related packages hasbeen used for Bayesian implementations of PCMs, and like BayesTraits, it is able toincorporate phylogenetic uncertainty by performing analyses over a sample of trees(de Villemereuil et al. 2012). Other packages such as MCMCglmm (Hadfield 2010)can also be adapted to handle these kinds of Bayesian analyses in a phylogeneticcontext (see chap. 11 by de Villemereuil and Nakagawa). Although MCMCglmmcannot currently incorporate more than a single phylogenetic tree into analyses, anattractive feature is that it is flexible enough to deal with traits that can take a numberof different distributions.

10 Keeping Yourself Updated: Bayesian Approaches 281

Page 20: Modern Phylogenetic Comparative Methods and Their Application in Evolutionary Biology || Keeping Yourself Updated: Bayesian Approaches in Phylogenetic Comparative Methods with a Focus

As a practical consideration, it should be noted that one drawback to theseBayesian methods is that the time required to perform these analyses is greatlyincreased in comparison with maximum-likelihood methods. This is due in part tothe extra time taken in the estimation of the posterior distribution (i.e. the Markovchain may have to run for millions of iterations). The actual computational timewill also be greater the more taxa you are analysing or the more parameters you areestimating. This is not only a factor in the final analyses, but also increases thetime that needs to be spent in the initial phases of an analysis where suitable priorsneed to be chosen with care and the inputs that affect how the chain searchesparameter space need to be selected. However, the results from a Bayesian analysisare relatively straightforward to handle and interpret, and once familiar with thesecomplications and with enough experience, these issues become less problematic.Processor speeds are increasing ever more rapidly, and the time taken to performanalyses is becoming much more manageable.

10.8 The Practical

In the OPM, you will use the program BayesTraits to perform phylogeneticcomparative analyses of discrete characters modelled as a Markov process in aBayesian MCMC framework. The practical uses the data from Old World mon-keys and apes on oestrus advertisement and group composition that you wereintroduced to above. You will use these data and a sample of phylogenetic trees totest whether these traits have evolved dependently or independently using Pagel’smethod. At the end of the practical section, we provide a checklist of steps toperform and things to look out for that will help in this process.

10.9 Conclusion

Bayesian techniques for performing phylogenetic comparative analyses provide apowerful and flexible toolkit for tackling a wide range of evolutionary questions.The strengths of this approach lie in its explicit focus on testing between alter-native hypotheses,21 the incorporation of our uncertainty about phylogeneticrelationships, and the ability to include prior information to inform our analyses.Furthermore, these Bayesian methods present the results as posterior distributionsrather point estimates of likelihoods and parameter values. While this may appearcumbersome, and off-putting for the uninitiated, it is in fact a more realisticrepresentation of what our data can actually tell us about the evolutionary process

21 rather than just focussing on the rejection of null hypotheses as is the case with classicalstatistical procedures.

282 T. E. Currie and A. Meade

Page 21: Modern Phylogenetic Comparative Methods and Their Application in Evolutionary Biology || Keeping Yourself Updated: Bayesian Approaches in Phylogenetic Comparative Methods with a Focus

that generated them. Becoming familiar with the added complexities that Bayesiananalyses entail is well worth the effort as this approach ultimately proves a farmore satisfying way of testing evolutionary hypotheses.

Glossary

Bayes factors Bayes factors are a way of testing between differenthypotheses in a Bayesian framework. They are cal-culated as ratios of the marginal likelihoods of dif-ferent models. The larger the ratio the more supportthere is for one model over another. The interpreta-tion of Bayes factors is somewhat arbitrary, but rulesof thumb exist to use these values to assess thestrength of evidence in favour of one hypothesis overanother.

Hyperprior A hyperprior is a prior distribution on the hyperpa-rameter of a prior distribution. In other words insteadof the parameters of the distribution being given fixedvalues, they themselves are drawn from prior distri-butions. In the program BayesTraits (which is used inthe OPM), the hyperparameters of specified distri-butions are drawn from uniform distributions. Forexample, a gamma distribution could have its shapeand scale parameters drawn from a uniform distri-bution ranging from 0 to 10. In comparative analyses,we do not always possess relevant biological infor-mation that could inform us about what form andvalues the priors should take therefore hyperpriorsare attractive because they allow us to be lessrestrictive about the values of a given priordistribution.

Marginal Likelihood The marginal likelihood of a model is its likelihoodscaled by the prior probabilities and integrated overall values of the parameters. In the context of phy-logenetic comparative analyses this may also involveintegrating over all the trees in the sample.

Markov ChainMonte Carlo (MCMC)

MCMC is a statistical procedure used in Bayesiananalyses to search parameter space and sample valuesin proportion to their posterior probability in order toarrive at an estimate of the posterior distributions of amodel and its parameter values. A number of

10 Keeping Yourself Updated: Bayesian Approaches 283

Page 22: Modern Phylogenetic Comparative Methods and Their Application in Evolutionary Biology || Keeping Yourself Updated: Bayesian Approaches in Phylogenetic Comparative Methods with a Focus

different criteria can be implemented to govern theway an MCMC searches and samples the posteriordistribution. With the Metropolis–Hasting algorithm,parameter values that increase the likelihood arealways accepted, while those that lead to a decreaseare accepted only with a certain probability. TheGibbs sampler always accepts proposed values butworks by drawing new values from the conditionaldistributions of the parameters (i.e. the distribution ofa parameter given the value of other parameters).

Maximum likelihood In a maximum-likelihood we search for the values ofthe parameters of a statistical model that give thelargest possible value of the likelihood function.

Prior probabilityand Priors/Priordistribution

In Bayesian statistics, we need to specify our initialbelief about the probability of a hypothesis, given theinformation available at the time. This belief thengets updated when we gain more information (i.e.this is our belief prior to the assessment of newinformation). In the context of a comparative analy-sis, we are assessing the parameters of a statisticalmodel, and before running the analysis and examin-ing the data, we have to specify a prior probabilitydistribution of the values these parameters shouldtake given our current understanding. The chapter byCurrie and Meade provides some examples of com-mon prior distributions that are used in comparativeanalyses. See also Hyperprior.

Posterior probabilityand Posteriors/Posteriordistribution

In Bayesian statistics, the posterior probability refersto our belief in a hypothesis after (i.e. posterior to)assessing new information. In the context of a com-parative analysis, the results of our analysis give usthe posterior probability distribution of values of theparameters of a statistical model. See also MarkovChain Monte Carlo (MCMC).

References

Arnold C, Matthews LJ, Nunn CL (2010) The 10kTrees website: a new online resource forprimate phylogeny. Evol Anthropol 19:114–118

Beaulieu JM, Jhwueng DC, Boettiger C, O’Meara BC (2012) Modeling stabilizing selection:expanding the Ornstein–Uhlenbeck model of adaptive evolution. Evolution 66(8):2369–2383.doi:10.1111/j.1558-5646.2012.01619.x

284 T. E. Currie and A. Meade

Page 23: Modern Phylogenetic Comparative Methods and Their Application in Evolutionary Biology || Keeping Yourself Updated: Bayesian Approaches in Phylogenetic Comparative Methods with a Focus

Bollback JP (2006) SIMMAP: stochastic character mapping of discrete traits on phylogenies.BMC Bioinformatics 7(1):88. doi 10.1186/1471-2105-7-88

Burnham KP, Anderson DR (2002) Model selection and multi-model inference: a practicalinformation-theoretic approach. Springer, New York

Cardinal S, Straka J, Danforth BN (2009) Comprehensive phylogeny of apid bees reveals theevolutionary origins and antiquity of cleptoparasitism. In: Proceedings of the NationalAcademy of Sciences. doi:10.1073/pnas.1006299107

Currie TE, Greenhill SJ, Gray RD, Hasegawa T, Mace R (2010) Rise and fall of politicalcomplexity in island south-east Asia and the Pacific. Nature 467(7317):801–804

Davies NB, Krebs JR, West SA (2012) An introduction to behavioural ecology. Wiley, NewJersey

de Villemereuil P, Wells J, Edwards R, Blomberg S (2012) Bayesian models for comparativeanalysis integrating phylogenetic uncertainty. BMC Evol Biol 12(1):102

Domb LG, Pagel M (2001) Sexual swellings advertise female quality in wild baboons. Nature410(6825):204–206

Dunn M, Greenhill SJ, Levinson SC, Gray RD (2011) Evolved structure of language showslineage-specific trends in word-order universals. Nature 473(7345):79–82

Felsenstein J (2005) Using the quantitative genetic threshold model for inferences between andwithin species. Philos Trans Roy Soc B Biol Sci 360(1459):1427–1434. doi:10.1098/rstb.2005.1669

Felsenstein J (2012) A comparative method for both discrete and continuous characters using thethreshold model. Am Nat 179(2):145–156. doi:10.1086/663681

Fitzpatrick JL, Montgomerie R, Desjardins JK, Stiver KA, Kolm N, Balshine S (2009) Femalepromiscuity promotes the evolution of faster sperm in cichlid fishes. Proc Natl Acad Sci106(4):1128–1132. doi:10.1073/pnas.0809990106

Green PJ (1995) Reversible jump Markov chain Monte Carlo computation and Bayesian modeldetermination. Biometrika 82(4):711–732

Griffin RH, Matthews LJ, Nunn CL (2012) Evolutionary disequilibrium and activity period inprimates: a bayesian phylogenetic approach. Am J Phys Anthropol 147(3):409–416. doi:10.1002/ajpa.22008

Hadfield JD (2010) MCMC methods for multi-response generalized linear mixed models: themcmcglmm R package. J Stat Softw 33(2):122

Hibbett DS (2004) Trends in morphological evolution in homobasidiomycetes inferred usingmaximum likelihood: a comparison of binary and multistate approaches. Syst Biol53(6):889–903

Holden C, Mace R (1997) Phylogenetic analysis of the evolution of lactose digestion in adults.Hum Biol 69(5):605–628

Huelsenbeck JP, Nielsen R, Bollback JP (2003) Stochastic mapping of morphological characters.Syst Biol 52(2):131–158. doi:10.1080/10635150390192780

Huelsenbeck JP, Rannala B (2003) Detecting correlation between characters in a comparativeanalysis with uncertain phylogeny. Evolution 57(6):1237–1247

Huelsenbeck JP, Rannala B, Masly JP (2000) Accommodating phylogenetic uncertainty inevolutionary studies. Science 288(5475):2349–2350

Ives AR, Garland T (2010) Phylogenetic logistic regression for binary dependent variables. SystBiol 59(1):9–26. doi:10.1093/sysbio/syp074

Jordan FM, Gray RD, Greenhill SJ, Mace R (2009) Matrilocal residence is ancestral inAustronesian societies. Proc Roy Soc B Biol Sci 276(1664):1957–1964. doi:10.1098/rspb.2009.0088

Kass RE, Raftery AE (1995) Bayes Factors. J Am Stat Assoc 90(430):773–795Link WA, Barker RJ (2009) Bayesian inference: with ecological applications. Elsevier Science,

New JerseyMaddison WP (1990) A method for testing the correlated evolution of 2 binary characters—are

gains or losses concentrated on certain branches of a phylogenetic tree. Evolution44(3):539–557

10 Keeping Yourself Updated: Bayesian Approaches 285

Page 24: Modern Phylogenetic Comparative Methods and Their Application in Evolutionary Biology || Keeping Yourself Updated: Bayesian Approaches in Phylogenetic Comparative Methods with a Focus

Maddison WP, Maddison DR (2009) Mesquite: a modular system for evolutionary analysis. 2.71edn

O’Meara BC, Ane C, Sanderson MJ, Wainwright PC (2006) Testing for different rates ofcontinuous trait evolution using likelihood. Evolution 60(5):922–933

Organ CL, Janes DE, Meade A, Pagel M (2009) Genotypic sex determination enabled adaptiveradiations of extinct marine reptiles. Nature 461(7262):389–392

Pagel M (1994a) Detecting correlated evolution on phylogenies: a general-method for thecomparative-analysis of discrete characters. Proc R Soc Lond Ser B Biol Sci 255(1342):37–45

Pagel M (1994b) Evolution of conspicuous estrous advertisement in old-world monkeys. AnimBehav 47(6):1333–1341

Pagel M (1999) Inferring the historical patterns of biological evolution. Nature401(6756):877–884

Pagel M, Meade A (2005) Bayesian estimation of correlated evolution across cultures: a casestudy of marriage systems and wealth transfer at marriage. In: Mace R, Holden CJ, Shennan S(eds) Left Coast Press. Walnut Creek, California

Pagel M, Meade A (2006) Bayesian analysis of correlated evolution of discrete characters byreversible-jump Markov chain Monte Carlo. Am Nat 167(6):808–825

Pagel M, Meade A, Barker D (2004) Bayesian estimation of ancestral character states onphylogenies. Syst Biol 53(5):673–684

Pagel M, Venditti C, Meade A (2006) Large punctuational contribution of speciation toevolutionary divergence at the molecular level. Science 314(5796):119–121. doi:10.1126/science.1129647

Penny D, McComish BJ, Charleston MA, Hendy MD (2001) Mathematical elegance withbiochemical realism: the covarion model of molecular evolution. J Mol Evol 53(6):711–723.doi:10.1007/s002390010258

Posada D (2009) Selecting models of evolution. In: Lemey P, Salemi M, Vandamme AM (eds)The phylogenetic handbook: a practical approach to phylogenetic analysis and hypothesistesting. Cambridge University Press, Cambridge, pp 345–361

Ronquist F, van der Mark P, Huelsenbeck JP (2009) Bayesian phylogenetic analysis usingMrBayes. In: Lemey P, Salemi M, Vandamme AM (eds) The phylogenetic handbook: apractical approach to phylogenetic analysis and hypothesis testing. Cambridge UniversityPress, Cambridge

Sanderson MJ (1993) Reversibility in evolution: a maximum-likelihood approach to charactergain loss bias in phylogenies. Evolution 47(1):236–252

Shultz S, Opie C, Atkinson QD (2011) Stepwise evolution of stable sociality in primates. Nature479(7372):219–222

286 T. E. Currie and A. Meade