1. Models of trait macroevolution on trees (MOTMOT) is a new software package that tests for variation in the tempo and mode of continuous character evolution on phylogenetic trees. MOTMOT provides tools to fit a range of models of trait evolution with emphasis on variation in the rate of evolution between clades and character states.
2. We introduce a new method, trait MEDUSA, to identify the location of major changes in the rate of evolution of continuous traits on phylogenetic trees. We demonstrate trait MEDUSA and the other main functions of MOTMOT, using body size of Anolis lizards.
If you can't find a tool you're looking for, please click the link at the top of the page to "Go to old article view". Alternatively, view our Knowledge Base articles for additional help. Your feedback is important to us, so please let us know if you have comments or ideas for improvement.
Phylogenetic trees describe the evolutionary relationships among taxa but also contain information on variation in the tempo and mode of evolution among lineages and through time. Identifying variation in rates of phenotypic evolution on phylogenies provides an important step in revealing the mechanisms that have generated differences in the temporal, geographic and taxonomic distribution of biological diversity over large spatial and temporal scales. We introduce models of trait macroevolution on trees (MOTMOT), a new package written in the R programming language (R Development Core Team 2010), that provides methods for assessing patterns in the tempo of continuous trait evolution on phylogenetic trees. MOTMOT uses transforms of phylogenetic branch lengths to test for non-Brownian trait evolution and complements several other R packages notably GEIGER (Harmon et al. 2008), ape (Paradis, Claude, & Strimmer 2004) and caper (Orme et al. 2011). We demonstrate some of the main uses of MOTMOT using body size evolution in Caribbean Anolis.
Brownian motion and models of trait evolution
MOTMOT uses statistical models of trait evolution based on Brownian motion. Brownian motion has been described in the context of phylogenetic trait evolution numerous times (e.g. Felsenstein 1973; Freckleton, Harvey, & Pagel 2002; O’Meara et al. 2006), so we keep the description here brief. The central tenet is that the magnitude and direction of changes in trait values are independent of the current state of the character and have an expected mean change of zero. Trait variance accumulates linearly with time, and the expected covariances of related species are proportional to the amount of shared evolutionary history (phylogenetic branch length). Hansen & Martins (1996) showed that the Brownian model adequately describes the expected covariances among related species under some microevolutionary models including random genetic drift, random punctuated change, directional selection and stabilising selection with a shifting optimum. Under such models, the Brownian variance (σ2) can be taken as a measure of the average rate of evolution (Garland 1992; McPeek 1995; O’Meara et al. 2006; Thomas, Freckleton, & Székely 2006).
where n is the number of tips, y is an n ×1 vector of trait values at the tips, is an n ×1 vector of the phylogenetic mean for the trait (under Brownian motion, this is the estimated state at the root), V is the variance–covariance matrix representation of the phylogenetic tree and X is an n ×1 vector of ones in the constant rate Brownian model but can be treated as a design matrix in heterogeneous rate models where rate varies according to the state of a discrete trait (see Thomas, Freckleton, & Székely 2006; Thomas, Meiri, & Phillimore 2009). The fit of the Brownian model to trait data and a phylogeny can be assessed with the log-likelihood equation
where ui is the unstandardised contrast at node i and Vi is the corresponding expected variance following Felsenstein (1985). Phylogenetically independent contrasts allow rapid evaluation of the log likelihood, even for trees with thousands of tips. It is possible to extend the contrasts method to multivariate data sets,
where W is the k × k covariance matrix for the standardised contrasts with elements calculated as follows:
in which uj,i is the contrast for trait j at node i.
MOTMOT fits a range of models of trait evolution (see Table 1) and has two main functions for parameter estimation. The first, transformPhylo.ML, optimises the likelihood of uni- or multivariate data using the independent contrasts method (eqns 3 and 4). This allows rapid fitting of the models of trait evolution listed above (also Table 1) that assume a single mean value across all taxa. We use the L-BFGS-B routine (Byrd et al. 1995) in the optim function (stats library) for optimisation. This allows upper and lower bounds on parameters. The free model (Mooers, Vamosi, & Schluter 1999) is over-parameterised, so finding the optimum branch scaling is difficult and slow. The free model in MOTMOT should only be used to give a rough visualisation of rate variation on the phylogeny.
Table 1. Models of trait evolution available in models of trait macroevolution on trees (MOTMOT)
Hypothesised clade or trait-dependent rate shift (single mean)4–6
Rate variation between lineages
Hypothesised clade or trait-dependent rate shift (multiple means)4–6
Rate variation between lineages
Clade rate shifts4–7
Location and magnitude of rate shifts
Independent branch rates
The second maximum likelihood function, ML.RatePhylo, implements methods described by Thomas, Freckleton, & Székely (2006), Thomas, Meiri, & Phillimore (2009) in which rates of trait diversification are expected to vary according to the state of a discrete trait. There are several ways in which the rate of evolution may vary among species within clades or groups of taxa (Fig. 1). First, the relative rate of evolution differs because of trait divergence among species (disparification) of one group compared to one or more other groups (Fig. 1a and b). However, changes in rate may also occur in the absence of any net divergence among focal species, for example, if there is a major change in the direction of trait evolution in the root branch but no subsequent divergence among taxa in the clade (Fig. 1c compared with Fig. 1a). Alternatively, there may be continued directional change along all branches; this change is in the same direction in each branch but with no net divergence among taxa compared with the null (Fig. 1d compared with Fig. 1a). Fig. 1c and d are characterised by a change in the mean trait value but no net change in divergence among taxa.
The function ML.RatePhylo allows the user to test for different forms of rate shift by explicitly modelling differences in mean between groups. This cannot be readily achieved using independent contrasts because it also requires specification of a design matrix (see Thomas, Meiri, & Phillimore 2009). We therefore use the GLS log-likelihood function (eqn 2) and optimise using the L-BFGS-B routine optim in ML.RatePhylo.
In addition to hypothesis testing, MOTMOT’s transformPhylo.sim function also allows the user to simulate trait evolution under all of the models described above.
Identifying Rate Shifts
While rate variation models are typically used as hypothesis tests, we frequently have no a priori expectation on the location or number of rate shifts. We take inspiration from a recent method [Modelling Evolutionary Diversification Using Stepwise AIC (MEDUSA)] for identifying the position and magnitude of shifts in the rate of lineage diversification (Rabosky 2006; Alfaro et al. 2009) and apply an analogous approach to rate shifts in continuous character diversification. The trait medusa algorithm 1 (tm1 algorithm) in the transformPhylo.ML function proceeds as follows: (1) evaluate the likelihood of a single-rate Brownian model; (2) fit rate heterogeneous models and evaluate the likelihood at each node in the phylogeny (one at a time) where the second rate is permitted in all branches descended from the focal node plus the stem branch leading to that node (new shifts are inferred only as monophyletic groups); (3) select the best-fitting two-rate model; (4) fit rate heterogeneous models with two-rate shifts where one of the shifts must occur at the node identified in step 3 (each additional shift defines a monophyletic set of taxa but rate shifts can be nested); (5) continue this procedure until a user-defined maximum number of rate shifts has been reached; (6) select the preferred model from the set of best-rate heterogeneous models using the Akaike Information Criterion (AIC). The number of parameters is equal to the total number of rates estimated plus the number of rate shifts inferred. For example, a model with two-rate shifts has three rates and hence five parameters in total.
In the interests of computational efficiency, the tm1 algorithm uses independent contrasts. As a result, the tm1 algorithm searches for clade-wide rate shifts but cannot model differences in means between groups in the same way as ML.RatePhylo. However, we only infer clade (rather than polyphyletic group) shifts, so the possibility of directional trait change rather than net trait divergence can be tested by allowing rate shifts on the stem branch leading to a clade. The ‘clade’ option in transformPhylo.ML permits post hoc tests of single-branch vs. clade-wide rate shifts. Alternatively, the tm2 algorithm provides a more thorough model fitting procedure. The tm2 algorithm proceeds in the same way as tm1; however, at each node, it evaluates the fit of the standard clade-wide shift (as described for tm1 above) and a single-branch shift where the rate shift occurs only on the stem branch leading to the focal node. At each step, the best model is chosen by comparison of all clade-wide and single-branch models. In subsequent steps (three-rate, four-rate and so on), it is possible to revisit, for example, a node with a previously inferred clade-wide rate shift and test additionally for a single-branch shift. Consequently, the final model can contain any combination of single-branch and clade-wide shifts including both shift types at the same nodes.
For large trees, the number of possible rate shifts is high. MOTMOT allows the user to restrict search space by (1) setting an upper limit on the number of rate shifts to infer; (2) specifying a minimum clade species richness such that the rate shift search does not proceed within smaller clades; and (3) listing specific clades within which no further rate shifts should be inferred.
The final preferred multiple rate model is determined by comparison of the Akaike Information Criterion (AIC, or its small sample alternative, AICc; Akaike 1973; Burnham & Anderson 2002). The choice of a suitable cut-off value for ΔAIC is not trivial. This is because the number of potential nodes at which rate shifts could occur will increase with increasing tree size and if the user decreases the minimum clade size. Consequently, the probability of falsely inferring at least one rate shift is likely to be high and to scale with the number of available nodes in the tree. We conducted simulations to assess a suitable ΔAIC and the accuracy of shift localities. Full details of the simulations are provided as Supporting Information. In brief, a suitable cut-off for ΔAICc (i.e. large enough to reject the null at α = 0·05) declines as the number of possible shift locations declines (Fig. 2a). Even with a high ΔAICc cut-off, the power to detect real rate shifts remains reasonably high (60–70%; Fig. 2b) and the location of shifts is generally inferred accurately (Fig. 2c), although the latter is affected by minimum clade size (see Supporting Information).
Body size evolution in Greater Antillean Anolis
The radiation of Anolis lizards in the Caribbean has become a classic model system for studying adaptive radiations and macroevolutionary trends with particular interest in the repeated evolution of ecomorphs on different islands (Losos 2009). We use a recently published data set of maximum adult snout-vent length (hereafter body size) measurements for male Anolis (Thomas, Meiri, & Phillimore 2009) and a molecular phylogeny (pruned from the larger tree in Nicholson et al. 2005) to demonstrate some of the main functionality of MOTMOT. The data, phylogeny and annotated R scripts are provided as online Supporting Information.
Models of Trait Evolution
We compared the fit of the Brownian model,
transformPhylo.ML (data, phy=phylogeny, model=‘bm’), to λ (model=‘lambda’), α (model=‘OU’), κ (model=‘kappa’), ψ (model=‘psi’) and δ (model=‘delta’) for log body size. Although all models, with the exception of OU, fit the data better than the Brownian model, the improvement in likelihood is not sufficient to reject Brownian motion (Table 2).
Table 2. Parameter estimates and model fit for Anolis male body size
ML parameter estimate (approx. conf. int.)
LRT vs. bm
Model comparison with the Brownian (bm) null is by likelihood ratio test (LRT) with one degree of freedom. All LRTs were nonsignificant.
We tested for rate variation in male body size first in relation to geography and second using the tm1 and tm2 algorithms. For the geographic analyses, we compared rates between species from the four main islands of the Greater Antilles (Cuba, Hispaniola, Jamaica, Puerto Rico) using the ML.RatePhylo function. We used the ancestral state reconstruction of island occupancy in Mahler et al. (2010) to assign all internal branches to one of the four islands where each internal node has a single fixed value (unlike Mahler et al. who allowed uncertainty in ancestral states in their models). We fitted a single-rate model while assuming a single mean across all taxa,
and found no evidence for rate heterogeneity (log likelihood = 84·650, LRT vs. Brownian = 2·518, P = 0·472, d.f. = 3). We then fitted a single-rate model while allowing means to differ between islands:
The best-rate shift model (based on an AICc cut-off of nine as determined by the simulations described above) identified two-rate shifts (Fig. 3a) for the tm1 algorithm and three-rate shifts for the tm2 algorithm (Fig. 3b). The first two-rate shifts using the tm2 algorithm occur at the same nodes as the two shifts identified using tm1. The tm2 algorithm additionally identified a substantial rate shift on a single branch. We note that if we use a more liberal AICc cut-off of four, the tm1 method also identifies a rate shift at this node but is limited to inference of a clade-wide rate shift (results not shown). We also note that the first rate shift using tm1 and tm2 (node 1 in Fig. 3) pertains to two taxa with identical trait values. It seems unlikely that the species genuinely have identical body sizes, and this may reflect crude measurement and/or rounding error.
R is rapidly becoming the default platform for phylogenetic comparative analyses. MOTMOT complements the growing number of phylogenetic R packages. Here, we have demonstrated the main functionality of MOTMOT using Anolis of the Caribbean as an example. This functionality can readily be extended to incorporate any trait evolution model based on transformations to the branch lengths of the phylogeny.
We thank David Orme, Luke Harmon and Emanuel Paradis whose R packages (caper, GEIGER and ape) underpin much of the code in MOTMOT; Luke Harmon, Matt Pennell, David Orme and two anonymous reviewers for their insightful reviews; and Travis Ingram, Albert Phillimore, Annat Haber and Chris Vendetti for additional helpful discussion and comments on the methods, code and manuscript. This work was funded by a Natural Environment Research Council (NERC, UK) Postdoctoral Research Fellowship (grant number NE/G012938/1) and Royal Society Grant (grant number RG0870720) to GHT.
Additional Supporting Information may be found in the online version of this article.
Data S1. Full simulation results for trait MEDUSA and comparison of run times to fit models of trait evolution in MOTMOT and GEIGER.
As a service to our authors and readers, this journal provides supporting information supplied by the authors. Such materials may be re-organised for online delivery, but are not copy-edited or typeset. Technical support issues arising from supporting information (other than missing files) should be addressed to the authors.