## Abstract

Variation in traits across species or populations is the outcome of both environmental and historical factors. Trait variation is therefore a function of both the phylogenetic and spatial context of species. Here we introduce a method that, within a single framework, estimates the relative roles of spatial and phylogenetic variations in comparative data. The approach requires traits measured across phylogenetic units, e.g. species, the spatial occurrences of those units and a phylogeny connecting them. The method modifies the expected variance of phylogenetically independent contrasts to include both spatial and phylogenetic effects. We illustrate this approach by analysing cross-species variation in body mass, geographical range size and species-typical environmental temperature in three orders of mammals (carnivores, artiodactyls and primates). These species attributes contain highly disparate levels of phylogenetic and spatial signals, with the strongest phylogenetic autocorrelation in body size and spatial dependence in environmental temperatures and geographical range size showing mixed effects. The proposed method successfully captures these differences and in its simplest form estimates a single parameter that quantifies the relative effects of space and phylogeny. We discuss how the method may be extended to explore a range of models of evolution and spatial dependence.

## 1. Introduction

Organisms are the dual products of the environment in which they currently live and their evolutionary history. Thus, species that live in similar environments, or have similar ecologies, would be expected to have common adaptations, and their similarity should be correlated with spatial proximity (Cliff & Ord 1981; Ripley 1981; Borcard *et al*. 1992; Legendre 1993; Legendre *et al.* 1997; Lennon 2000); similarly, closely related species would be expected to show more similarity than those that are distantly related because they share more common evolutionary history (Ridley 1986; Harvey & Pagel 1991; Harvey & Purvis 1991; Price 1997; Harvey & Rambaut 2000; Freckleton & Harvey 2006). In other words, species' traits may be conserved across both space and phylogeny as a consequence of selection for ecological adaptation and the constraints of past evolutionary history. Potential ecological or environmental determinants of trait variation may similarly contain both phylogenetic (Grafen 1989; Westoby *et al.* 1995; Diniz-Filho *et al.* 1998; Desdevises *et al.* 2003; Wiens & Graham 2005) and spatial (Sokal 1983; Borcard *et al.* 1992; Legendre 1993; Peres-Neto 2006) signals and both need to be identified.

The comparative approach seeks to disentangle the roles of such processes. In analyses looking at cross-species variation in traits, similarity resulting from shared evolution is regarded as a potentially confounding factor; by incorporating phylogenetic information into comparative analyses, it is possible to address these statistically while analysing correlations between traits and the environment in order to reveal environmentally driven evolutionary patterns (Felsenstein 1985; Grafen 1989; Harvey & Pagel 1991; Lynch 1991). The phylogenetic component of trait variation is typically marginalized, so that such approaches do not explicitly measure what proportion of the variation in trait values in a clade is driven by the environment relative to the proportion that is explained by history. Consequently, it is not generally well understood which of history or environment is more important in determining trait variation across species. Yet, the distinction between phylogenetically structured and more plastic and environmentally driven trait variations has gained new and particular importance in the context of potential range shifts under climate change (Ackerly 2003; Diniz-Filho & Bini 2008).

In analyses with a geographical focus, the importance of spatial non-independence of data has become appreciated, and various techniques have been developed to address it (e.g. reviews by Clifford *et al.* 1989; Haining 1990; Legendre *et al*. 2002; Dormann *et al*. 2007). To date, these approaches have found extensive use for modelling the spatial abundance or richness of species (Borcard *et al.* 1992; Lennon 2000; Jetz & Rahbek 2002; Lichstein *et al.* 2002; Diniz *et al.* 2003; McPherson & Jetz 2007), and also the spatial analysis of genetic variation and diversity (Sokal & Oden 1978; Sokal *et al.* 1989; Escudero *et al.* 2003).

Common to both phylogenetic and spatial analyses is the problem of non-independence, and any process that yields non-independence can result in unwelcome correlation structures in data when confronted with statistical methods that assume independence. In the analyses of spatial and time-series data, it has been recognized that diagnosing and measuring such non-independence is an important step in analysing and understanding data (e.g. for overviews see Haining 1990; Chatfield 1996). In those cases, model choice for the spatial pattern is often not easy. By contrast, in comparative analysis, we have the advantage that it is frequently possible to specify models of trait evolution on the phylogeny (e.g. Hansen 1997; Pagel 1997, 1999; Felsenstein 2008) and hence tackle the source of non-independence head-on.

As yet, there have been few attempts to synthesize methods for measuring spatial and phylogenetic signals in comparative datasets. Of course, many studies have looked at how the effects of environmental drivers (e.g. latitude, temperature, altitude) influence species' traits (Ashton *et al.* 2000; Freckleton *et al.* 2003; Blackburn & Hawkins 2004; McKechnie *et al.* 2006). However, spatial non-independence can be pervasive: the influence of unmeasured and hidden variables can dramatically affect the analyses (Lennon 2000). Comparative biologists have developed a suite of statistical techniques for analysing trait data containing phylogenetic signal. Although the issue has been recognized and possible methods discussed (e.g. Legendre *et al.* 2004), so far none have considered how spatial effects may be also included within a single statistical framework.

In this paper, we provide an illustration of the joint effects of phylogenetic and spatial dependence on trait variation across species, the 891 species of carnivores, even-toed ungulates and primates of the world. We introduce a method allowing the effects of phylogenetic and spatial processes to be measured simultaneously, and show how it may be used to reveal how spatial and phylogenetic factors simultaneously shape the evolution and distribution of traits.

## 2. Material and methods

### (a) Phylogenetic distribution of traits

The model of trait distribution we use is the Brownian model, which forms the basis for many commonly employed phylogenetic methods (Felsenstein 1985; Harvey & Pagel 1991; Martins & Hansen 1997; Pagel 1997, 1999). The Brownian model is essentially a neutral model of trait evolution in which changes in trait values occur continuously and in which increases and decreases in traits are equally as likely and independent of the current state. This is a simple model; however, a range of more complex models can be reduced to a Brownian form or accommodated in the same framework (Hansen 1997; Pagel 1997). We consider a single trait evolving among a set of *n* species. The state of the trait is denoted by a vector ** x**. Under the Brownian model, if

*t*is the time over which the trait is evolving, then Δ

**, the change in**

*x***, is a multivariate normal (MVN) random deviate,(2.1)where**

*x***is a (**

*Σ**n*×

*n*) matrix proportional to the expected variances and covariances for trait changes among species, which are given by the shared path lengths on the phylogeny (e.g. Martins & Hansen 1997; Pagel 1997), and

*σ*

^{2}is the rate at which variance accumulates per unit time. After

*T*units of time,

**(**

*x**T*) is a multivariate normally distributed with mean

**(0) and variance–covariance matrix**

*x**σ*

^{2}

*Σ**T*.

### (b) Phylogenetic contrasts

In order to develop the method for simultaneously incorporating spatial and phylogenetic effects, we estimated phylogenetic contrasts. This is a computationally efficient method for fitting a Brownian model to comparative data and for estimating the parameters of the Brownian process. The unstandardized contrasts (*u*) and their variances (*v*) are calculated following the detailed algorithm given in Felsenstein (1985).

### (c) Incorporating spatial effects

In order to model the spatial effect, we assume an analogous linear variance model of spatial similarity and modify the method of contrasts to account for additional processes (see Garland *et al.* (1992) for an earlier discussion of the idea of modifying contrasts). If *d*_{ij} is the spatial distance between species *i* and *j*, and the phylogenetic distance is *p*_{ij}, then the net variance for the distance between their traits is(2.2)In this model, *ϕ* measures the relative contribution of phylogenetic and spatial effects. A value of *ϕ* equal to 0 is a model in which there are only phylogenetic effects and a value of 1 is the one in which there are only spatial effects. According to this model, traits evolve as a function of both phylogenetic and spatial distances. This model therefore allows for closely related species to be geographically close together, as would be expected in many datasets.

Alternative models are possible and we outline in table 1 a series of simple functions varying in complexity, in terms of nonlinearity and number of parameters that could be used in applications of this approach. Exploratory analysis however indicated that the linear model worked well for the data that we analysed (e.g. see below). In practice, we would recommend that a range of functions are explored.

Equation (2.2) does not incorporate any non-spatial or non-phylogenetic component to trait variance. To address this, we simultaneously also used the *λ* transformation suggested by Pagel (1997, 1999). This transformation allows for phylogenetically uncorrelated variance, for example, resulting from species-specific adaptation. This transformation is achieved by lengthening the branches of the phylogeny leading to the tips by a fraction relative to the internal branches. This is done by multiplying the internal branches by *λ* where usually 0<*λ*<1. A value of *λ*=0 indicates that there is no phylogenetic signal in the trait and a value equal to 1 indicates that traits vary as predicted by the Brownian model.

In the context of modelling spatial and phylogenetic effects simultaneously, the *λ*-statistic allows us to include trait variation independent of both phylogeny and space in our analysis. This is akin to including a ‘nugget’ in a spatial model (e.g. Haining 1990).

### (d) Estimation

Under the Brownian model, the expected distribution of traits is a MVN distribution. This distribution has two parameters, *μ*, the weighted mean of the trait at the basal node and, *σ*^{2}, the variance parameter. The distribution is characterized by the expected variance–covariance matrix, ** V**, which is an

*n*×

*n*matrix. When only phylogenetic effects are modelled, this is identical to

**in equation (2.1). Because in equation (2.2) the net variance is a linear combination of the phylogenetic and spatial variances, when spatial and phylogenetic effects are combined,**

*Σ***is given by(2.3)where**

*V***is the variance–covariance matrix generated by the spatial distribution of the observations. There are numerous ways to generate**

*W***(for alternatives to the evolutionary model of**

*W***we use, see Dormann**

*W**et al*. 2007). In the specific model given by equation (2.2), it is assumed that the ancestor originated a single point in space and that the degree of variance between species that results from spatial proximity is given by the accumulated distance between them, so that entries of

**are the accumulated spatial distance from the root until the most recent common ancestor of each pair of species.**

*W*For data ** x** and variance matrix

**(**

*V**ϕ*), the log likelihood of parameters

*ϕ*,

*μ*and

*σ*

^{2}is(2.4)In equation (2.4)

**is the design matrix, in the case of a single trait containing a column of 1 s. The theory of Felsenstein (1973) shows that the multinormal log likelihood given by equation (2.4) is exactly equal to(2.5)Equation (2.5) is the likelihood of the estimated changes leading to the observed data according to the Brownian process. The summation in equation (2.5) is across all of the internal nodes of the phylogeny and is the sum of the log likelihoods of the individual changes at each of the nodes.**

*X**V*

_{i}is the variance for node

*i*, calculated according to the algorithm in Felsenstein (1985) to account for estimation error in the ancestral traits. Although it is perfectly possible to maximize equation (2.4) directly (and for some choices of

**, this would be the only approach), maximization based on equation (2.5) is simpler because it does not require the inversion of the variance matrix, which is potentially numerically inaccurate and computationally inefficient. The parameters**

*W**μ*and

*σ*

^{2}are estimated as the weighted mean trait value at the basal node and the mean value of the squared standardized contrasts, respectively, for a given value of

*ϕ*.

The spatial distances for internal nodes in equation (2.2) were estimated using ancestral state reconstructions on the phylogeny. We used the `pic` function in the R package analysis of phylogenetics and evolution (APE; Paradis *et al.* 2004) to do this. When calculating contrasts, the spatial distances and phylogenetic variances were scaled so that the maximum was identical in each case.

In order to obtain the maximum-likelihood estimate of *ϕ*, we used a one-dimensional parameter search, employing the optimize routine in the statistical package R (R Development Core Team 2007). This is an implementation that uses a combination of golden section and parabolic interpolation algorithms (Brent 1973).

For the simultaneous estimation of *λ* at the same time as *ϕ*, the analysis proceeds in the same way: the only extra step is that the phylogeny is first transformed as described above. The maximum likelihood is then found by jointly maximizing over *ϕ* and *λ*. To do this, we used the `optim` function in R employing the L-BRGS-B algorithm (Byrd *et al.* 1995) and constraining the search to find optimum values of both *ϕ* and *λ* between 0 and 1 as these parameters are generally undefined outside this range. Previous simulations have shown that for given ** V**, maximum-likelihood values of the

*λ*-statistic can be accurately tested against null values (0 and 1) using likelihood-ratio tests (Freckleton

*et al.*2002).

In order to interpret the model including both parameters, we note that when *λ* is estimated at the same time as *ϕ*, equation (2.3) becomes (where ** h** is a vector formed from the leading diagonal of

**representing the heights of the tips)(2.6)Equation (2.6) can be written as(2.7)In equation (2.7)**

*Σ**γ*=(1−

*ϕ*)(1−

*λ*) is the relative contribution of effects independent of both phylogeny and space;

*λ*′=(1−

*ϕ*)

*λ*is the relative contribution of phylogeny and

*ϕ*is the relative spatial effect. These composite parameters allow simple interpretation of the joint estimates of

*ϕ*and

*λ*. In equation (2.7) the sum of

*γ*,

*λ*′ and

*ϕ*is always 1, therefore these parameters can be interpreted as the individual proportional contributions to variance of the different components if

**and**

*Σ***are appropriately scaled.**

*W*### (e) Data for analysis

Spatial and environmental data used in the analysis were based on the extent of occurrence range maps provided in geographical information systems vector format by Ceballos (for data sources and mapping methodology, see Ceballos *et al.* 2005; Ceballos & Ehrlich 2006). We calculated geographical range midpoints from latitudinal and longitudinal extents of range maps and used them to characterize the spatial distance of species data points to each other. For the purpose of this analysis, we consider and analyse the following three attributes as ‘species traits’: geographical range size (*range size*); the environmental temperature characteristic for a species range (*temperature*); and a species' typical body mass (*body mass*). We estimated *range size* (in km^{2}) directly from range maps in cylindrical equal area projection and log-transformed data for analysis. The same maps formed the basis for characterizing the broad-scale temperature niche of species. Average annual temperature data (in °C) came from the Climatic Research Unit gridded climatology 1961–1990 dataset (New *et al.* 2002) at native 10 min resolution and was log transformed. We resampled both sets of data to 0.01° spatial resolution and extracted range map occurrences and temperature map across a 55×55 km^{2} equal area grid (in cylindrical equal area projection). We then calculated for each species *temperature* as the average environmental temperature across all grid cells it occupies. Finally, we extracted *body masses* for 183 artiodactyls, 201 carnivores and 207 primates from Smith *et al.* (2003) and log-transformed data for analysis (see source for details on body size compilation). Phylogenetic relationships among species of the three mammal clades came from select sources (Purvis 1995; Purvis *et al.* 1995; Bininda-Emonds *et al.* 1999; Price *et al.* 2005; Vos & Mooers submitted) and were extracted as subsets from the recently published mammalian supertree (Bininda-Emonds *et al.* 2007). Tree resolution (internal nodes/tips) was 0.76 for carnivores, 0.62 for artiodactyls and 0.73 for primates.

### (f) Simulations

We used simulations to validate the method for the datasets that we analysed. We did this to determine the behaviour of the estimator *ϕ* in terms of its power and type I error rates. For each node in the tree, we generated the phylogenetic variances and geographical distances to form the net variances for contrasts at nodes using the variances of the reconstructed contrasts under the Brownian model. To generate simulated data, we generated random normal deviates with mean zero and variance given by equation (2.2), and with the given value of *ϕ*. We first used this simulation method to simulate estimated values of *ϕ* for known values of *ϕ* between 0 and 1. We also generated distributions of values of *ϕ*, repeating 10 000 replicates for each of the three phylogenies.

## 3. Results

### (a) Simulations

There is generally a close correspondence between the values of *ϕ* estimated from simulated data with known values (figure 1*a*). It is important to note, however, that at the extremes there are small but influential biases: this is unsurprising given that the value of *ϕ* is restricted between 0 and 1. Consequently, any sampling error will yield some degree of bias: overestimation would be expected at the lower bound and underestimation expected at the higher bound. The degree of bias varies between the phylogenies, being the least for the carnivore dataset and slightly greater for the other two.

As shown in figure 1, this bias leads to small but important consequences for the simulated distributions of *ϕ* under true values of *ϕ*=0 (figure 1*b*) or *ϕ*=1 (figure 1*c*). As would be expected given the results in figure 1, the distribution of *ϕ* varies between datasets, particularly in the case of simulated data under a true value of *ϕ*=0. The reasons for this difference between the datasets probably are that (i) the sizes of the datasets are different (albeit not vastly) and (ii) there is error in the phylogeny and the extent of this error varies between the datasets. In summary, these results underline the importance of simulation methods to generate sampling intervals for null values of *ϕ* for different datasets.

### (b) Analysis of data

We conducted initial analyses using diagnostic plots showing the value of the unstandardized contrasts as a function of phylogenetic or spatial distance (figure 3). These plots are comparable to variograms, with data grouped into distance classes (e.g. Haining 1990). They effectively visualize the apparently strong relationships between phylogenetic distance and contrasts in *body mass*, and between geographical distance and *temperature* contrasts, with somewhat shallower slopes for *range size*.

The parameter *ϕ* jointly quantifies the relative contribution of phylogenetic and spatial effects, ranging from 0 (phylogeny only) to 1 (space only). The estimated likelihood profiles of *ϕ* illustrate the combined assessment provided by this approach (figure 3). Table 2 summarizes the maximum-likelihood values of estimated parameters. Body mass yields a low maximum-likelihood value of *ϕ* confirming a dominant phylogenetic effect (figure 4*a*–*c*). In all three cases, the maximum-likelihood value of *ϕ* is not significantly different from 0. In turn, the maximum-likelihood value of *ϕ* for temperature is not significantly different from 1 in any clade (figure 3*d*–*f*), indicating that the spatial dependence of species' environmental temperature niche is considerably stronger than the phylogenetic effect. This reflects the clear relationship between the phylogenetic distance and the mean unstandardized contrast values found for temperature in figure 2.

We additionally fitted *λ* to the data that measure the relative phylogenetic and non-phylogenetic components of variance. For body mass and temperature, a model including both *ϕ* and *λ* does not offer an improved fit. The simple model given by equation (2.2) is thus sufficient to describe the combined spatial and phylogenetic dependence in these data. This means that the variation in traits is explained best by either phylogenetic effects (body mass) or spatial effects (temperature). In the case of environmental temperature in artiodactyls, there was an increase in log likelihood resulting from including *λ* in the model (increase in log likelihood of 15.5 units); however, the resultant net effect was small (*γ*=0.057).

For range size we found very different patterns. For this variable, a model including *λ* in addition to *ϕ* yielded considerably better models (increase in log likelihood of 35.1 units in carnivores, 24.9 units in artiodactyls and 39.9 units in primates). This suggests that in this variable a strong component of the trait variation was independent of phylogeny or spatial effects. In carnivores, there was no phylogenetic or spatial signal in the data (figure 4*a*). Range size in artiodactyls showed no phylogenetic signal, with a moderate amount of spatial signal (*γ*=0.488 and *ϕ*=0.512; figure 4*b*). Finally, in the case of the primates, there was a weak phylogenetic signal in the range sizes (*λ*′=0.216), but no spatial effect (figure 4*c*), and most variation was independent of either (*γ*=0.784).

## 4. Discussion

We have shown that across 591 mammal species, key traits may often be significantly affected by both spatial and phylogenetic factors, indicating the need for a joint rather than separate assessment of these effects. We introduce a method for such a joint measurement of phylogenetic and spatial signals that are a simple and logical extension of existing approaches. This integrative approach allows questions about the role of environment and history to be asked, which could not be addressed using separate diagnostics provided by the existing techniques. Furthermore, this approach can be readily adapted to form the basis for conducting comparative tests (e.g. regression, analysis of variance and other linear models) that allow both sources of non-independence to be controlled for simultaneously.

### (a) Autocorrelation versus direct effects

Whether we are examining phylogenetic or spatial effects, an obvious issue is whether non-independence in data should be modelled as the direct effect of predictors (e.g. by regressing trait values onto a set of predictors) or indirectly through expected covariance or autocorrelation (as in the generalized least squares (GLS) model above). The method we describe is readily expanded to consider predictors of the trait of interest.

The distinction between models of autocorrelation and those of direct effects of predictors is important as frequently non-independence in data can be generated by ‘hidden’ variables, so that as successive predictors are added to an analysis, the degree of non-independence of data may decrease (e.g. McKechnie *et al.* 2006). In the model we employ, the non-independence is contained in the residual portion of the variation in traits, so that if predictors are used to directly explain residual variation, the degree of independence of the residuals should increase. Therefore, if the predictors are phylogenetically or spatially non-independent, and these play a significant role in determining trait values, the spatial or phylogenetic components in traits can be directly explained.

In the analyses we report above, the aim was not to explain the variation in traits by direct effects: although this may be possible, at this point we simply sought to measure the broad contribution of both space and phylogeny to trait variation without asking what drives this variation. This is informative in itself, for instance in asking how the data are structured (e.g. as in figure 3), as well as being a useful first step in developing more complex analyses.

Neither space nor phylogeny can in themselves generate a direct effect on trait values: the effects of either have to be mediated through other variables, for example through changes in the environment or species' niches. One issue that is likely to be important when considering spatial effects is that the degree of overlap in species' ranges will be an important factor in determining the degree of similarity resulting from spatial proximity. Including this is a more complex issue. The approach that has been recently suggested by Felsenstein (2002, 2008) could be possibly adapted for such an analysis: in this approach intraspecific variation is also modelled and could be adapted to consider the within-species spatial distribution of populations. In general, it would be expected that the more species' ranges overlap with each other, the less important spatial proximity would be.

As with other comparable methods (e.g. the *λ*-statistic of Pagel 1999), the GLS methods we employ may be adapted for considering the effects of predictor variables, and *ϕ* estimated simultaneously with fitting statistical models (e.g. Freckleton *et al.* (2002) for an illustration of how such a method would be developed). Such an approach would be very useful in constructing analyses in which the combined effects of spatial and temporal non-independence are controlled for. The estimation of parameters such as *ϕ* to optimize a variance–covariance matrix in GLS analysis is known as estimated generalized least squares, and is known to be a very flexible technique (e.g. Ives *et al.* 2007).

The only issue with developing multi-predictor analyses is that the value of *ϕ* would have to be interpreted with caution: as outlined above, if the predictors in an analysis were environmental predictors, and hence likely to be spatially correlated, it would be no surprise if the spatial signal in the residuals of the analysis was weakened leaving only phylogenetic signal. Consequently, *ϕ* would not be interpretable in an evolutionary sense in such an analysis.

### (b) Evolutionary interpretations

According to the Brownian model of trait evolution, the differences between species traits grow linearly with evolutionary time. Thus, closely related species are more similar than distantly related ones. This model does not preclude an adaptive component to trait evolution (Blomberg *et al.* 2003): on the contrary, the model implies that species traits are continually changing and, unless the traits examined are neutral for the fitness of organisms, this change presumably must have an adaptive basis and be driven by changes to exogenous drivers.

If the value of *ϕ* is close to 1, we can be sure that trait evolution is being driven by geographical or environmental factors unrelated to phylogeny. If *ϕ*>0 then if two sister species live close together they will be more similar than a pair of species that split at the same time but live farther apart. By contrast, if *ϕ*=0, geographical distance is unimportant and only phylogenetic distance matters, presumably with environment playing little role.

According to this interpretation, the value of *ϕ* can be informative about the degree to which species' niches are conserved or changed relative to geography or phylogeny. A value of *ϕ*>0 indicates that niches are changing faster with respect to spatial variation than with evolutionary distance and that this is changing traits faster than the null Brownian model. Under such circumstances, the conclusion would be that traits and species niches are more labile than is expected based on phylogenetic distance alone.

Clearly, as indicated by the results in figures 3 and 4, not all traits are under the same kind of selective pressure, even for the same set of species. For the groups we have analysed, body mass is closely associated with evolutionary distance; however, environmental temperature and range size are much more closely allied to spatial factors. The variance in responses indicated in figures 3 and 4 is a clear evidence of mosaic evolution of species traits in response to a suite of selective pressures: range size and temperature are clearly a great deal more labile with respect to environmental variation than is body size.

In the specific dataset we have analysed, there is a question of whether variables such as range size and temperature can be considered as traits (see also the discussion of this in Freckleton *et al.* 2002), although the literature clearly does. For example, in climate envelope modelling (e.g. Thomas *et al.* 2004), the mean temperature at which a species exists is regarded as a fundamental measure of a species' niche and this seems a reasonable measure of climate tolerance. Our finding is that the mean temperatures at which species exist are more variable (with respect to phylogeny) than predicted by the null model. Although the sample on which we have based our conclusion is small (three groups), if repeated more widely, this finding would have important implications for our understanding of how species evolve to respond to changing environments.

There has been a lively debate about how range size evolves and whether species' ranges are in some sense ‘heritable’ (e.g. Webb & Gaston 2003). Our analysis suggests how such debates can be addressed empirically by measuring phylogenetic (i.e. heritable) and spatial (i.e. non-heritable) components. In our data, it is clear that the phylogenetic drivers of range size are weak and that in at least two cases spatial effects are more dominant (table 2; figure 4). In these data, the evidence is that range size variation is driven by where species live rather than by evolutionary history (and presumably therefore life history). Indeed, the evidence that range size shows any phylogenetic signal at all is weak (table 2) with the conclusion being that range size is an extremely labile trait with low heritability in these groups.

### (c) Developing the method

As mentioned above, a suite of other methods exist, particularly for conducting spatial analyses. Those most commonly used in ecology and evolutionary biology are summarized by Dormann *et al*. (2007). There exists a range of very similar methods based on autocorrelation models and GLS, typically employing a single parameter to measure spatial dependence, with different approaches varying in how the expected variance among species is calculated. The spatial approach that we have taken is essentially the same as the spatial GLS approach (e.g. Dormann *et al.* 2007) and the single trait GLS model including *λ*_{s} is essentially the same as this. Our approach is therefore set firmly among conventional approaches to measuring spatial dependence. Moreover, the method is economical in that it involves the estimation of only one parameter, although the approach is flexible enough that more complex models can be constructed (table 1). Moreover, the method is readily implemented using freely available software (e.g. using the APE package; Paradis *et al.* 2004).

Changes to the spatial model to account for different assumptions and modes of trait variation are readily incorporated. In order to distinguish between models, likelihood ratio statistics, Akaike information criteria or Bayesian information criteria (e.g. Burnham & Anderson 2002; Link & Barker 2006) or simulation approaches (as above) could be used. For instance, highly parametrized models of spatial variation could be incorporated. The important consideration in doing so, however, is to maintain a balance between the models of the two processes. For example, if the model of spatial variation is more complex than that of phylogenetic signal, it would be sensible to compare the variation attributable to the two directly, unless there were *a priori* reasons for employing the more complex model.

## 5. Conclusions

We have shown that species trait shows a variety of phylogenetic and spatial structures. Across 891 species of mammals, body size is mainly correlated with phylogeny, environmental temperature mainly a function of spatial processes and range size shows intermediate responses. Such a range of behaviour in a relatively small sample is evidence that a combined phylogenetic and spatial approach will be frequently warranted and that useful information on the evolution of traits will be gained by looking at both aspects of trait variation simultaneously. We illustrate how widely used phylogenetic methods can be adapted to also measure the strength of spatial dependence in comparative data. Such integrative assessment of both phylogenetic and spatial effects on biological variation is likely to facilitate more rigorous inference in ecology, behaviour, conservation and global change biology.

## Acknowledgments

The authors are indebted to Gerardo Ceballos, UNAM, for allowing the use of mammal geographical range maps compiled in his laboratory for this analysis. R.P.F. is funded by a Royal Society University Research Fellowship. W.J. gratefully acknowledges support by NSF (BCS—0648733). R code for implementing the methods described is available from R.P.F.

## Footnotes

- Received July 2, 2008.
- Accepted August 6, 2008.

- © 2008 The Royal Society