Introduction

Understanding how ecological and evolutionary processes interact to influence the composition of ecological communities at varying spatial scales is central to ecological science. Evolutionary processes determine the ecological traits that underlie species’ interactions with their environment, and the evolutionary lability (or rate of evolution) of these traits determine the degree to which closely related species are ecologically similar, or the degree of ‘phylogenetic signal’ present in species’ ecological niches (sensu Losos 2008). Phylogenetic signal in species’ ecological niches may arise simply due to Brownian motion evolution of ecological traits, while evolutionary selection or constraints may also lead closely related species to occupy similar ecological niches (referred to as niche conservatism; Wiens and Graham 2005). Alternatively, evolutionary lability of traits could cause close relatives to occupy dissimilar niches and distant relatives to occupy similar niches (referred to as convergent evolution). The degree of phylogenetic signal in species’ ecological niches, along with the degree of niche differentiation among species in a community, is expected to impact the phylogenetic structure of ecological communities (Cavender-Bares et al. 2004; Ackerly et al. 2006).

The habitat niche of tree species, or the physical and chemical conditions necessary for mature individuals to persist (Grubb 1977), has been shown to be an important part of the niche of tropical tree species, explaining the distribution and abundance of species over a variety of spatial scales. At local spatial scales (distances <1 km), tropical forest community structure is strongly influenced by habitat heterogeneity in the form of topo-edaphic variation. Topographic variation, which is often used as a surrogate for ecologically relevant habitat variables such as moisture and light availability, has been shown to explain the distributions of individual tree species and community turnover within many tropical forest dynamics plots (up to 50-ha; Harms et al. 2001; Valencia et al. 2004; Gunatilleke et al. 2006; Legendre et al. 2009; Chuyong et al. 2011; De Cáceres et al. 2012), and the importance of soil resource variation in explaining community structure has come to light more recently as a result of fine-scale mapping of soil variables (Davies et al. 2005; John et al. 2007; Baldeck et al. 2013a). However, while the importance of tree species’ local habitat niches in shaping community structure is well appreciated, we have a relatively poor understanding of how phylogenetic signal in the habitat niches of tree species may also influence tropical forest community structure.

A general pattern of phylogenetic signal in species’ ecological niches has been supported by a number of studies examining phylogenetic signal in species’ ecological traits in a variety of taxonomic groups (e.g., Peterson et al. 1999; Prinzing 2001; Chazdon et al. 2003; Burns and Strauss 2011; Violle et al. 2011; Baraloto et al. 2012), though notable exceptions have also been observed (Losos 2008). In an attempt to understand how tree species’ local habitat niches were influenced by their evolutionary relatedness, Baldeck et al. (2013b) tested whether congeneric or confamilial species pairs had more similar habitat niches than more distantly related species pairs within eight tropical forest dynamics plots. They found mixed results among study sites, with significant effects found for congeneric species pairs in five out of the eight plots examined, and the effect sizes were quite small (Mantel r values of 0.02–0.06). These results suggest varying degrees of phylogenetic signal in species’ habitat niches in these communities, carrying implications for the phylogenetic structure of these communities and the degree to which that structure is related to habitat heterogeneity.

Phylogenetic community structure may be measured in ways analogous to measures of compositional biodiversity: it may be expressed as the degree of phylogenetic relatedness among species in the same sample, which we refer to here as phylogenetic alpha diversity, or as the degree of phylogenetic relatedness between species in two samples, termed phylogenetic beta diversity (Webb et al. 2008). Phylogenetic alpha diversity has proven useful for examining patterns of relatedness within small spatial neighborhoods, providing insight into ecological assembly processes within communities, with emphasis on determining the relative strength of habitat filtering and competitive exclusion (e.g., Webb 2000; Cavender-Bares et al. 2004; Swenson et al. 2007; Kraft and Ackerly 2010). In contrast, phylogenetic beta diversity can reveal patterns of phylogenetic turnover along environmental gradients (Bryant et al. 2008; Graham and Fine 2008; Faith et al. 2009). In plant communities, phylogenetic beta diversity has been used to elucidate the roles of habitat specialization and historical biogeographic and evolutionary processes in shaping regional community phylogenetic patterns along environmental gradients (e.g., Fine and Kembel 2011; Swenson 2011; Anacker and Harrison 2012; Zhang et al. 2013). An examination of phylogenetic beta diversity may therefore provide insight into the role of evolutionary processes in structuring forest communities over local environmental gradients.

We used tree census data and fine-scale maps of topographic and soil resource variation from eight fully-censused tropical forest dynamics plots to test whether phylogenetic beta diversity within a plot was related to environmental variation. We expected that the effect of habitat heterogeneity on phylogenetic community structure is the outcome of habitat niche differentiation among species and phylogenetic signal in habitat niches. As previous studies of these same plots had indicated the importance of environmental variation in shaping species compositional structure, as well as varying degrees of phylogenetic signal in species’ habitat niches (Baldeck et al. 2013a, b), we expected that the phylogenetic structure of these communities may also be shaped by environmental variation. Specifically, we expected that phylogenetic turnover, or phylogenetic beta diversity, would be related to environmental gradients within plots, and that areas with similar habitats would have more closely related tree communities in sites where there was evidence of phylogenetic signal in species’ habitat niches.

Methods

Study sites and environmental data

We used tree census data from eight Center for Tropical Forest Science (CTFS) forest dynamics plots located around the globe. The plots were 24–50 ha in size, spanning a variety of tropical climates, soil types, forest types, and species diversity (Losos and Leigh 2004; Table 1). Within each forest plot, all trees ≥1 cm dbh (diameter at breast height) were identified to species, their dbh was recorded, and their location within the plot was mapped to the nearest 10 cm (protocol described in Condit 1998). The eight plots included Barro Colorado Island (BCI), Panama; Huai Kha Khaeng and Khao Chong, Thailand; Korup, Cameroon; La Planada, Colombia; Pasoh, Peninsular Malaysia; Sinharaja, Sri Lanka; and Yasuni, Ecuador. Information on individual plot characteristics is presented in Table 1.

Table 1 Characteristics of study sites used in these analyses and list of soil nutrients and processes measured at each site

Maps of soil resource concentrations across each plot were produced at the 20 × 20 m scale following the soil sampling and kriging methods described in John et al. (2007). Briefly, soil samples were taken in a 40 or 50 m grid across each plot, with additional samples taken near alternate grid points to estimate fine scale variation in soil variables. Non-nitrogen elements were extracted with Mehlich-III solution and analyzed on an inductively-coupled plasma optical emission-spectrometer (ICP–OES, Perkin Elmer Inc., Massachusetts, USA), with the exception of phosphorus at the Yasuni study site, which was extracted with Bray-1 solution and analyzed colorimetrically on a Lachat Quikchem 8500 Flow Injection Analyzer (Hach Ltd., Colorado, USA). For the three neotropical study sites (BCI, La Planada, and Yasuni) an estimate of the in situ nitrogen mineralization rate (Nmin) was taken at each sample location by measuring inorganic nitrogen before and after a 28-day incubation period. Nitrogen was extracted in 2 M KCl and detected as NH4 + and NO3 using an auto-analyzer (OI FS 3000, OI Analytical, Texas, USA). Sample values were then kriged to obtain estimated concentrations of soil nutrients at the 20 × 20 m quadrat scale. The set of soil variables for each study site contained 6–12 variables, generally including Al, Ca, K, Mg, Mn, P, and pH, but where available also included Nmin, B, Cu, Fe, and Zn (Table 1).

Topographic variables, including mean elevation, slope, convexity, and aspect were also calculated for all 20 × 20 m quadrats from elevation measurements made at the intersections of a 20 × 20 m grid throughout each plot. Mean elevation was calculated as the mean of the elevation measurements at the four corners of a quadrat. Slope was calculated as the average slope of the four planes formed by connecting three of the corners of a quadrat at a time. Convexity was the elevation of a quadrat minus the average elevation of all immediate neighbor quadrats. Lastly, aspect was the direction of the steepest slope of a quadrat, and was calculated in ArcMap 9.3 (www.esri.com).

Phylogenetic beta diversity

A master phylogenetic tree was created by pooling species from all eight study sites and submitting this species list to the online tool Phylomatic (Webb and Donoghue 2005). Tree ferns and the few species that were not identified to genus were left out of the species pool. This created a phylogenetic tree containing all species in all plots, the backbone of which was taken from the most recent Angiosperm Phylogeny Group classification (APGIII; www.mobot.org, accessed May 2011). This tree was assigned branch lengths according to the ‘bladj’ algorithm of the community phylogenetic software Phylocom (Webb et al. 2008), which anchors certain nodes at fossil and molecular dates estimated by Wikström et al. (2001) and evenly spaces intervening nodes. Phylogenies were created for each study site by pruning the dated master tree to contain only species from that study site, and the analysis for each study site was performed using its respective pruned tree.

Tree census data were divided into 20 × 20 m quadrats and pairwise phylogenetic beta diversity indices were calculated for all quadrat pairs within a study site. We calculated two indices of phylogenetic beta diversity that measure phylogenetic turnover occurring at different levels of the phylogeny (Webb et al. 2008). The first index was the average pairwise phylogenetic distance for pairs of taxa between two samples, termed mean pairwise distance (β MPD). The second index was the average phylogenetic distance between each taxon in the first sample and its nearest phylogenetic neighbor in the second sample and vice versa, termed mean nearest taxon distance (β MNTD). β MPD expresses phylogenetic turnover at deeper levels of the phylogeny, while β MNTD expresses phylogenetic turnover at the tips of the phylogenetic tree and may be interpreted as scaling with the frequency of finding close phylogenetic relatives between samples. However, calculated values of β MPD and β MNTD are affected by the compositional beta diversity between samples because co-occurrence of the same taxa will enter a phylogenetic distance of zero into the calculation. Therefore, observed values of β MPD and β MNTD were standardized with respect to expected values calculated under a null model. The null model randomizes the species labels on the phylogeny and recalculates the values of β MPD and β MNTD, randomizing the phylogenetic relationships among species while preserving the compositional beta diversity and species richness of the samples. The standardized versions of β MPD and β MNTD are termed β NRI (net relatedness index) and β NTI (nearest taxon index), respectively, and are the beta diversity analogs to the NRI and NTI metrics that are often used to examine phylogenetic alpha diversity (Webb 2000). Randomizations were repeated 99 times and the following standardizations were performed:

$$\beta_{\text{NRI}} = \, - 1 { } \times \, {\frac {\left( {{\text{mean}}\left( {\beta_{\text{MPD random}} } \right) \, - \, \beta_{\text{MPD observed}} } \right)} {{\text{ sd}}\left( {\beta_{\text{MPD random}} } \right)}}$$
$$\beta_{\text{NTI}} = \, - 1 { } \times \, {\frac {\left( {{\text{mean}}\left( {\beta_{\text{MNTD random}} } \right) \, - \, \beta_{\text{MNTD observed}} } \right)} {{\text{ sd}}\left( {\beta_{\text{MNTD random}} } \right)}}$$

Thus, positive values of β NRI and β NTI indicate that taxa are less closely related between two samples and negative values indicate that taxa are more closely related than expected by chance. Both β NRI and β NTI can be calculated on a presence-absence or abundance modes; we calculated each metric in both modes and repeated the same analysis for each. Values of β NRI and β NTI were calculated in Phylocom (version 4.1; Webb et al. 2008).

Analysis

To visualize the multivariate dispersion among quadrats expressed as either β NRI or β NTI, or the phylogenetic structure of a study site, we performed ordinations of quadrats within each study site and displayed the ordination results as a three-color map. The pairwise phylogenetic beta diversity matrices were ordinated in three-dimensional space with nonmetric multidimensional scaling. The position of each quadrat in the ordination space was translated into an RGB color by translating the scores on each axis to color intensity of red, green, and blue, and quadrats were then displayed as their corresponding colors. The difference in color between quadrats conveys information about their phylogenetic similarity: quadrats of similar color contain more closely related species than quadrats of dissimilar color, but the specific color of a single quadrat is arbitrary. We also summarized the ability of the three NMDS axes to capture the original phylogenetic beta diversity distances as the correlation between the original pairwise phylogenetic beta diversity values and the Euclidian distances among quadrats calculated from the NMDS axis scores.

We then examined the ability of the entire set of environmental variables (soil plus topographic variables), as well as the soil and topographic variables separately, to explain phylogenetic community structure within the plots. Specifically, we tested whether the set of explanatory variables accounted for a significant amount of the multivariate dispersion among quadrats (given by the phylogenetic beta diversity indices) using distance-based canonical redundancy analysis (dbRDA; Legendre and Anderson 1999). Distance-based RDA works similar to ordinary redundancy analysis (RDA; Rao 1964); however, whereas RDA with community data implicitly measures the dissimilarity among samples as the Euclidian distances in the samples × species community matrix, dbRDA allows the use of any distance measurement. In dbRDA, a principal coordinates analysis is performed on the matrix of inter-sample dissimilarities and all eigenfunctions with positive eigenvalues are retained as the sample coordinates. These coordinates are then used as the response matrix in RDA.

Prior to analysis, β NRI and β NTI values were scaled between 0 and 1 to convert them to positive dissimilarity values. The matrix of the scaled phylogenetic beta diversity values among quadrats was used as the dissimilarity matrix in dbRDA. The set of environmental variables was expanded to increase model flexibility by adding the squared and cubed values of each variable, with the exception of aspect (Legendre et al. 2009; Baldeck et al. 2013a). We included the sine and cosine of aspect as the two aspect variables. This created a set of 11 topographic variables and 18-36 soil variables for each study site. The ability of the environmental variables to account for the multivariate dispersion among quadrats was tested for significance using 999 random permutations of the phylogenetic beta diversity matrix. We derived the adjusted R 2 from each dbRDA, which is an unbiased estimator of the proportion of variation explained that corrects for the number of explanatory variables used (Peres-Neto et al. 2006). Additionally, to obtain a better understanding of the specific environmental variables that most strongly explained phylogenetic beta diversity within sites, we performed forward selection on the environmental variables using the double stopping criterion of Blanchet et al. (2008).

We also examined the degree to which the phylogenetic beta diversity within a plot was spatially structured. Spatial variation in phylogenetic beta diversity was modeled with a set of spatial variables created through principal coordinates of neighbor matrices (PCNM) (Borcard and Legendre 2002). To create the PCNM spatial variables, a principal coordinates analysis was performed on a truncated matrix of the geographic distances among the 20 × 20 m quadrats, and all eigenfunctions with positive eigenvalues were retained. These spatial variables are able to model spatial structure in a dataset at any spatial scale that can be resolved by the sampling design (Borcard and Legendre 2002; Dray et al. 2006). When modelling spatial variation in community composition, the spatial variation contained in the community data is attributed to all processes that may cause spatial correlation in the community data at the spatial scales that can be modeled, including relationships between species and spatially structured environmental variation as well as spatial correlation in species distributions caused by limited dispersal. However, because the β NRI and β NTI values have been standardized to account for shared species, spatial aggregation in species distributions due to limited dispersal are unlikely to contribute to spatial patterns in phylogenetic beta diversity, and thus the spatially structured variation in phylogenetic beta diversity observed here is interpreted as representing the potential variation explained by spatially structured environmental variation.

For each dbRDA, we summarized the ability of the principal coordinates analysis to capture the original phylogenetic beta diversity distance values as the correlation between the original pairwise phylogenetic beta diversity values and the Euclidian distances among quadrats calculated from the variables generated by the principal coordinates analysis. We also examined the pairwise relationship between environmental dissimilarity and phylogenetic beta diversity within the plots to aid the interpretation of the relationship between environmental change and phylogenetic turnover. Environmental dissimilarity among quadrats was calculated as the distance among quadrats in the canonical (fitted) space of the dbRDA. The canonical axes from the dbRDA are linear combinations of the environmental variables that explain the greatest amount of multivariate dispersion among quadrats, and preliminary analysis showed that the pairwise distance among quadrats in the canonical space (as a measure of environmental distance) was more strongly correlated with the pairwise phylogenetic beta diversity values than the Euclidian distance among quadrats in scaled environmental space. Correlations between environmental dissimilarity and phylogenetic beta diversity were tested for significance via Mantel analysis using 999 random permutations of the phylogenetic beta diversity matrix. All analyses were performed in R (R Development Core Team 2012), with dbRDA and forward selection of environmental variables carried out in the ‘vegan’ (Oksanen et al. 2011) and ‘packfor’ (Dray et al. 2009) packages, respectively.

Results

Maps of overall phylogenetic community structure revealed broad spatial patterns in phylogenetic community composition within many of the study sites (Fig. 1). This was especially true when phylogenetic beta diversity was expressed as nearest neighbor distances: maps produced from β NTI values showed more colorful variation, while those produced from β NRI values contained large gray areas, indicating quadrats at the center of the ordination space. However, the three-dimensional NMDS ordination captured more of the variation among quadrats when phylogenetic beta diversity was expressed as β NRI versus when expressed as β NTI. The correlation between the original phylogenetic beta diversity values and the Euclidian distances in three-dimensional NMDS space was 0.78–0.91 (given as the Pearson’s r) among sites for β NRI versus 0.52–0.81 for β NTI.

Fig. 1
figure 1

Maps of phylogenetic community structure for a, b Barro Colorado Island, c, d Korup, e, f Yasuni, g, h Khao Chong, and i, j Sinharaja. Maps shown on the left side were produced from β NTI values (a, c, e, g, i) and maps on the right side were produced from β NRI values (b, d, f, h, j). β NTI and β NRI were both calculated from species abundance data. The similarity in color between two quadrats indicates their phylogenetic similarity

All variable sets—total environmental, soil, topography, and spatial variables—explained a significant amount of phylogenetic beta diversity at every study site as tested by the dbRDA (Table 2). This result was the same regardless of whether phylogenetic beta diversity was calculated as β NTI or β NRI, or whether it was calculated from presence-absence or abundance data. Results were qualitatively very similar between presence-absence and abundance modes of calculating the indices, and so we present only the results for indices calculated in abundance mode here and provide the presence-absence results in the supplementary materials.

Table 2 The percent of multivariate dispersion, expressed as the two types of phylogenetic beta diversity, explained by different combinations of soil, topographic (Topo.) and spatial variables in dbRDA

Across study sites, the entire set of environmental variables explained 3.0–10.3 % of the multivariate dispersion among quadrats when phylogenetic beta diversity was expressed as nearest neighbor distance using β NTI, and 0.4–8.8 % when expressed as mean pairwise distance using β NRI (Table 2). Across study sites and different explanatory variable sets, more variation was explained when phylogenetic beta diversity was expressed as β NTI than when expressed as β NRI, with the exception of two cases—soil and topography for BCI. The β NTI and β NRI distances also differed in how well they were fit by the principal coordinates analysis: the correlation between the original β NTI distances and the Euclidian distances derived from principal coordinates analysis was 0.66–0.80 (given as the Pearson’s r) among study sites, while this was 0.93–0.99 for β NRI. For both types of phylogenetic beta diversity, soil variables generally explained slightly more variation than topographic variables (with the exception of Sinharaja), and spatial variation explained approximately two to three times the amount of variation as was explained by all environmental variables combined.

Neither phylogenetic beta diversity index was consistently related to geographic distance across study sites (Table 3). When the effects of environmental, soil, or topographic dissimilarity on phylogenetic beta diversity were tested using the distance matrix approach, the results were usually significant, but not always. Importantly, the distance matrix approach revealed that in a few instances (e.g., Korup for β NTI and Huai Kha Khaeng for β NRI), the relationship between environmental, soil, or topographic dissimilarity and phylogenetic beta diversity was negative. This relationship was not revealed by the dbRDA as response matrices expressed as either similarities or dissimilarities produce the same adjusted R 2 values. The effect of environmental dissimilarity was larger than the effect of geographic distance in most of the study sites, especially when phylogenetic beta diversity was expressed as nearest neighbor distance.

Table 3 Mantel test results for the effects of environmental dissimilarity on phylogenetic beta diversity, given as Mantel r values

Discussion

While it is well appreciated that evolutionary history has important impacts on the composition of floras at regional, continental, and global geographic scales (Ricklefs 2004; Wiens and Donoghue 2004; Wiens and Graham 2005), our results highlight the importance of evolutionary processes in shaping tropical forest tree community composition at the local scale. We found significant relationships between phylogenetic community structure and habitat heterogeneity, indicating a role for habitat heterogeneity and phylogenetic signal in species’ local habitat niches in shaping phylogenetic community structure in these communities. Our results are consistent with previous observations of the importance of habitat heterogeneity in shaping species compositional structure of these communities (Harms et al. 2001; Valencia et al. 2004; Gunatilleke et al. 2006; Chuyong et al. 2011; De Cáceres et al. 2012; Baldeck et al. 2013a). Additionally, phylogenetic clustering of individuals in the same location has been observed in many forest communities, indicating the tendency of closely related individuals to occupy similar ecological niches (e.g., Webb 2000; Kembel and Hubbell 2006; Swenson et al. 2007; Kraft and Ackerly 2010). Here we relate phylogenetic community structure to measured habitat variables to show the importance of tree species’ topo-edaphic niches in shaping the phylogenetic structure of tropical forest communities.

Constrained ordination analysis revealed that phylogenetic beta diversity was significantly influenced by habitat heterogeneity in all the tropical forest communities examined. Across study sites, 3.0–10.3 % of the variation in β NTI was explained by the full set of environmental variables, which is likely to represent ecologically meaningful effects. In analyses of local-scale species compositional variation in forest communities, the proportion of compositional variation explained by all environmental variables in RDA was 13–39 %, and fractions of 3 % were thought to indicate important effects (Baldeck et al. 2013a). There are a variety of factors that may cause the amounts of explained variation to be small, including lack-of-fit of model to data inherent in constrained ordination techniques (Økland 1999), imperfect representation of the original phylogenetic beta diversity values by the principal coordinates analysis, and lack of fine-scale resolution of the phylogenetic tree. It is less clear whether the small amounts of variation (<3 %) in β NRI explained by the environment in half of the sites represent important effects.

The amount of phylogenetic beta diversity that was found to be spatially structured also provides context for interpreting the amount of variation explained by the environmental variables. In constrained ordination analyses of local community structure, spatial variation modelled through PCNM usually accounts for the largest amount of variation explained as this encompasses all spatially structured ecological processes influencing the response variable that can be modelled by the sampling design (e.g., Legendre et al. 2009; De Cáceres et al. 2012; Baldeck et al. 2013a). Thus we may think of the amount of variation explained by the spatial variables as representing an upper limit on the amount that might be explained by spatially structured environmental variation (both measured and unmeasured environmental variation, assuming influence of this variation may be captured by the sampling design). This upper limit was 6.9–20.3 % across sites for β NTI and 1.2–15.1 % across sites for β NRI, or approximately two to three times the amount of variation explained by the full set of environmental variables. Thus, the measured soil and topographic variables explain a portion of variation that is comparable in size to the portion of variation that is spatially structured. This also indicates that a similar amount of variation might be accounted for by unmeasured environmental variation, though further environmental measurements would be needed to confirm this.

The spatial structure of the phylogenetic beta diversity within a plot can be seen in the phylogenetic beta diversity maps (Fig. 1). Phylogenetic community structure appears to be strongly associated with environmental variation within these forest communities, especially when expressed as nearest neighbor distance. For example, it is easy to see the broad differences in phylogenetic composition between the plateau and slope areas of the BCI 50-ha plot (Fig. 1a; c.f. Figure 1 in Harms et al. 2001). Similarly, there is a broad division between lower and upper portions of the elevation gradient at Yasuni (Fig. 1c; c.f. Fig. 2 in Baldeck et al. 2013a). The Sinharaja study site had the greatest amount of spatially structured variation in β NTI among plots (20.3 %), which appeared to be very strongly associated with topographic features. Close affinities of a particular genera to topographic microhabitats within the Sinharaja forest plot has been documented in previous work (Fig. 1e; c.f. Fig. 2 in Gunatilleke et al. 2006).

There were also important differences in the relationship between environmental variation and phylogenetic beta diversity from site to site. We expected that the effect of habitat heterogeneity on phylogenetic community structure is the outcome of two processes: habitat niche differentiation among species and phylogenetic signal in habitat niches. In an analysis that applied identical methods to the same eight forest plots, Baldeck et al. (2013a) found that community compositional variation was related to habitat heterogeneity within all of the plots. This indicated that habitat niche differentiation is an important driver of community structure in all sites, though there was considerable variation among sites in the size of this effect. In another analysis of the same set of forest plots, evidence for phylogenetic signal in soil resource and topographic niches was found in some communities but not in others (Baldeck et al. 2013b). By examining the differences among sites in terms of habitat niche differentiation and the evidence that was found for phylogenetic signal, we may better understand how the relationship between habitat heterogeneity and phylogenetic turnover arises and how this relationship varies among sites.

When examining phylogenetic beta diversity at the level of close phylogenetic neighbors, the site with the greatest amount of phylogenetic community structure explained by environmental variables was Sinharaja, with 10.3 % of variation explained, and the site with the least amount explained was La Planada, with 3.0 % of variation explained. These two sites are the same size and have similar species richness (Table 1). However, the previous analysis of community compositional variation (Baldeck et al. 2013a) found Sinharaja and La Planada to be the sites with the greatest and least community compositional variation explained by environmental variables, respectively. This indicates a relatively high degree of habitat differentiation among species at Sinharaja and a lower degree of habitat differentiation at La Planada, which may have arisen due to stronger underlying topographic gradients in Sinharaja compared to La Planada (Losos and Leigh 2004). Conversely, the analysis of phylogenetic signal in habitat niches (Baldeck et al. 2013b) found relatively little difference between the two sites in the effect of relatedness on habitat niche similarity. Thus, differences in habitat niche differentiation, rather than differences in the strength of phylogenetic signal, may explain the different effects of habitat heterogeneity on phylogenetic community structure of these two communities.

When the relationships between environmental dissimilarity and phylogenetic beta diversity were examined, the orientations of these relationships were revealed. The most common relationship found was the expected positive relationship between β NTI or β NRI and environmental dissimilarity, which indicates that communities with similar environments contain communities that are more closely related. However, sometimes this relationship was negative—a fact that was not revealed by dbRDA. The across-site pattern in the effects of environmental dissimilarity on β NTI is generally consistent with the evidence for phylogenetic signal in habitat niches in these study sites (Baldeck et al. 2013b). In that study, congeneric species were generally found to have more similar niches along soil resource or topographic axes, with the main exception of the Korup study site, though effects were not always statistically significant.

In contrast to the other sites, Korup exhibited a negative relationship between topographic dissimilarity and β NTI (after accounting for the effect of geographic distance). It was previously shown that environmental variation strongly influences compositional community structure at Korup (Baldeck et al. 2013a), so the idea that habitat niche differentiation is less prevalent in this community can be ruled out. The negative relationship between topographic dissimilarity and β NTI at Korup could be explained by convergent evolution at the level of close phylogenetic neighbors, which was also suggested by the results of Baldeck et al. (2013b). In contrast, a negative relationship was found between all types of habitat dissimilarity and β NRI at Huai Kha Khaeng, although this site had consistently positive relationships between β NTI and habitat dissimilarity. This pattern suggests conservation of habitat niches at the level of close phylogenetic neighbors (consistent with the pattern observed in Baldeck et al. 2013b) and convergent evolution of habitat niches at a deeper level of the phylogeny.

Previous studies have shown that the regional-scale phylogenetic turnover of plant communities is often related to topographic and climatic gradients, indicating that species sorting along these gradients is non-random with respect to phylogeny (e.g., Fine and Kembel 2011; Swenson 2011; Anacker and Harrison 2012; Ricotta et al. 2012; Zhang et al. 2013). Here we found that there is important variation in the phylogenetic composition of a community within tropical forests at a much smaller spatial scale, and that this variation is linked to the habitat niches of trees and the phylogenetic signal in species habitat niches. These results reinforce the concept that the strength of niche differentiation among species and the phylogenetic signal present in those habitat niches interact to determine the effect of habitat heterogeneity on phylogenetic community structure.