Supplementary Material Functional traits reveal the expansion and packing of ecological niche space underlying an elevational diversity gradient in passerine birds Alex L. Pigot, Christopher H. Trisos, Joseph A. Tobias 1. Description of guild classification and assignment protocol Our study focused on passerine birds for two main reasons. First, they make up a large proportion of avian diversity (> 50%) with much ecological and morphological variation, and second, they tend to be more easily surveyed and collected than many non-passerine groups, with higher data quality in terms of elevational ranges and biometric measurements. We classified passerine species into dietary guilds using a dataset quantifying the relative proportion of the diet made up by 7 different food categories (invertebrates, vertebrates, carrion, fruit, seeds, nectar, and other plant material) [1]. Proportions of each food type were estimated in intervals of 10%, and we assigned species obtaining the majority (≥ 60%) of their food from a single category as specialists to the corresponding dietary guild (insectivores; granivores; frugivores) (figure S1). The remaining species were classified as non-specialists (omnivores) (figure S1). Only 4 of 7 dietary guilds were included in our analyses because no study species specialised on carrion or vertebrate prey, and we assigned the single specialist nectarivore (Coereba flaveola) to the omnivore guild. For insectivorous birds, we further characterised species niches according to six categories of attack behaviour (i.e. the phase between the locating of prey and its capture [2]): “Aerial screen”, “Ground pick”, “Aerial attack”, “Perch glean”, “Branch probe” and “Deadleaf probe” (figure S1). These categories represent differences in the behavioural strategy by 1 which prey are captured, with each manoeuvre potentially associated with differences in adaptive morphology. While some of the behavioural categories we use are substrate specific (e.g. branch probing), perch gleaning and aerial attack manoeuvres are associated with multiple possible substrates. We therefore further subdivided these two behavioural classes according to four major substrate types: i) air and ii) ground (for aerial attack only), and iii) foliage and iv) branch (including trunk) thus forming 6 distinct foraging manoeuvre-substrate combinations (figure S1). We note that some kinds of manoeuvres are likely to be more readily distinguished by observers (e.g. aerial screening) and that some less conspicuous categories may disguise substantial variation in behaviour (e.g. perch gleaning can include a variety of acrobatic manoeuvres requiring varying degrees of agility). Nevertheless, the resolution of our categories reflects the level of information typically available in published sources, and the need to reliably translate this information into distinct behavioural categories without being compromised by author-specific differences in terminology. The categories we use are broadly consistent with previous schemes examining avian guild structure (e.g. [2-4]). Summary descriptions of each ecological guild category are provided in table S3. We used published descriptions [5] to provide a proportional assignment of species to each of the unique foraging behaviour and substrate combinations, following the protocol used by Wilman et al. [1]. Specifically, for each category, we estimated the percentage contribution to the diet of each behaviour-substrate combination in 10% steps, recording these steps as integers from 0 to 10 so that, for each species, values across categories summed to 10 (i.e. 100%). For instance, a typical classification for a species in our dataset might be: obtains 50% of its invertebrate diet from “aerial attack on branches”, 30% from “aerial attack on foliage”, and 20% from “perch gleaning on branches”. Through this approach, we were able to separately quantify the proportion of the invertebrate diet obtained from each 2 manoeuvre (80% aerial attack versus 20% perch gleaning) and each substrate (70% branches versus 30% foliage). We scored species to categories if the species was described as using that particular manoeuvre and substrate. For instance, if only a single behaviour and substrate was described we scored 10 (100%) for that category. When multiple behaviours and substrates were given, we assigned coarse proportional values based on specific terminology, relative word usage and the overall context of the description. For instance, typical terms used were “specialist” (score 8 or 9), “mostly” (score 6–8), “sometimes” (score 1 or 2) or “occasional” (score 0 or 1), with the precise score depending on the number of described categories. For instance, “mostly” gleans from foliage but “sometimes” gleans from bark would be scored, perch glean-foliage = 8 and perch glean-branch = 2, whereas “mostly” gleans from foliage but “sometimes” gleans from bark and probes dead-leaves would be scored, perch glean-foliage = 6, perch glean-branch = 2 and dead leaf probe = 2. Where no qualitative terms were used, we assigned decreasing scores to categories in the order in which they were mentioned depending on the context of the description. See Wilman et al [1] for further justification of scoring system and database S1 for individual guild scores for each species. 2. Testing the relationship between ecology and morphology We visualised the position of guilds within high-dimensional morphospace using a parallel coordinate plot, simultaneously showing the distribution of species (50 % quantiles) along each PC axis (figure S3). To test the association between morphological traits and ecological guilds, we used a random forest model implemented in the R statistical package “randomForest” [6]. We grew an ensemble of 500 classification trees based on bootstrapped samples of the original data and used these trees to classify species to ecological guilds. Because the number of species within each guild is highly uneven (table S3) we set the 3 sample size to be drawn from each category equal to the richness of the most species-poor guild. In addition to testing overall classification accuracy, we use this modelling technique to address three key assumptions that are fundamental to our approach and yet which have received little prior scrutiny: a) trait dimensionality, b) trait standardisation and 3) missing niche axes. a) Trait dimensionality Analyses of morphospace structure based on principal component (PC) scores typically retain only the first two or three synthetic trait axes on the basis that the remaining axes explain little of the variation in raw morphological variables. However, whether niche structure can be accurately described using only a few trait dimensions remains unclear [7] with previous evidence from birds suggesting that PC axes explaining little morphological variance can nevertheless have a disproportionate effect in describing species ecological niches [8]. We examined this issue by calculating how OOB accuracy scores vary as the number of PC trait axes retained in the analysis is increased, starting with only PC1 and including progressively higher PC axes (PC2–7). As expected, we found that increasing the number of PC trait axes retained in the analysis leads to an increase in classification accuracy (figure S4a-c). Within some individual guilds, classification accuracy shows occasional declines with increasing dimensionality (e.g. omnivores, figure S4a). This arises because the random forest model maximises classification accuracy across all categories, potentially at the expense of decreasing accuracy within some guilds. Nevertheless, taken across all categories, an increase in the number of PC trait axes consistently improves our ability to discriminate between ecological guilds (figure S4a-c). We found that the number of PC trait axes required to accurately describe passerine niche space depends on the level of resolution with which ecological niches are defined. For 4 discriminating major dietary types (e.g. frugivore versus insectivore), the first three PC axes alone are sufficient to resolve these ecological guilds with reasonable accuracy (figure S4a). In contrast, discriminating more fine-scale aspects of the avian niche, including different foraging attack manoeuvres (figure S4b) or substrates (figure S4c), typically requires more trait axes (≥ 4 dimensions). Together, these results suggest that analyses based on only a few trait axes will be biased towards inferring patterns of niche packing because species with similar positions in low dimensional trait space may differ in ecologically important ways that are only revealed once higher trait dimensions are included. Thus, our results strongly support the retention of all PC axes when quantifying patterns of morphospace structure. b) Standardising synthetic trait axes Previous studies of morphospace structure using scores from PC analysis have typically used either i) un-standardised PC scores, or ii) scores normalised to have unit variance. The first approach produces patterns in morphospace structure dominated by trait axes that account for the majority of the variance in the original morphological variables. In contrast, the second approach treats each synthetic axis equally and is based on the assumption that axes explaining little morphological variance may be as ecologically informative as those explaining substantial variance in the raw traits (e.g. [9, 10]). We tested this assumption by removing each PC axis sequentially from the random forest model and estimating the drop in classification accuracy, and thereby examining the individual contribution of each axis in classifying species to ecological guilds. We found individual PC trait axes had consistently low contributions to the correct classification of species to ecological guilds (< 10%, table S5) and that variable importance was unrelated to the proportion of variance in the raw morphological data explained by each axis (table S2). For instance, the most important trait axes for classifying insectivore foraging 5 manoeuvre were PC5 and PC6, but these axes together account for only 5% of variance in the raw morphological traits (tables S2, S5). Visualisation of a single classification tree suggests that the low contribution of individual trait axes arises because guilds are only distinguished by complex interactions across multiple trait axes (figure S5). Contrary to the view that higher order PC scores are best ignored because of low relevance and signal-to-noise ratio, these results indicate that each PC trait axis is of approximately similar importance in defining passerine niche space. We conclude that all PC trait axes should be given equal weight when quantifying morphospace structure. c) Missing niche axes Inferences regarding patterns of niche occupation from morphological traits may be compromised if the measured traits are insufficient to fully describe the major axes of ecological niche space. To assess the potential consequences of this for our analysis we recalculated OOB scores using multiple PC trait spaces constructed from subsamples of our selection of raw morphological variables (127 unique combinations). Through this approach, we tested the mean rate at which OOB accuracy scores increase with the number of measured morphological variables (i.e. from one to all seven morphological variables). If the morphological variables used provide a sufficient description of the avian niche, we predicted that the addition of each further trait variable should result in a diminishing improvement in model accuracy. In contrast, a linear increase in OOB accuracy scores would suggest that many further, as yet unmeasured, traits are required to accurately describe passerine niche space. We found that increasing the number of measured morphological traits resulted in a continuous increase in classification accuracy (figure S4d-f). The appearance of small declines in classification accuracy with increased trait sampling reflects stochasticity in the OOB scores arising from the random sampling of species traits in the random forest model. 6 For a number of guilds, classification accuracy appears to plateau as the number of sampled traits increases (e.g. frugivores, figure S4d), suggesting that the measurement of additional traits will only marginally increase classification accuracy (figure S4d-f). The tendency for predictive accuracy to plateau as more traits are sampled implies that limits to classification accuracy are not caused by the absence in our dataset of many unmeasured but ecologically informative traits. Instead, we suggest that such limits may reflect the fact that ecological guild categories do not represent completely distinct regions of niche space. Indeed, many species have niches that span multiple guilds and thus similarity in species traits across guilds probably represents true similarity in niches (database S1). Taken together, these results suggest that the predominant pattern of niche packing that we detect is unlikely to be explained by missing trait axes and that the measurement of further morphological variables would not substantially alter our conclusions. 3. Quantifying morphovolume and trait packing We calculated assemblage morphovolume as the volume of the minimum convex polygon (MCP) enclosing all species present within each elevation band (i.e. MCPV) [11]. The MCPV is geometrically constrained to be less than the theoretical maximum (a hypercube) for assemblages with fewer than 2T species, where T is the number of trait dimensions [12]. To ensure that the use of MCPV did not bias our conclusions, we also calculated volume as a hypercube (HCV) with dimensions equal to the range along each trait axis. Gradients in morphovolume based on this alternative metric were qualitatively similar to those obtained using the MCPV indicating that our conclusions are robust to the small sample sizes typical of high elevation (figures S6-S7). To partition the gradient of species richness into components attributable to niche expansion or packing, we used the MCPV to quantify the % of the additional species in the 7 more diverse low elevation assemblage (A1) that occurred within (‘packing’) or outside (‘expansion’) the volume of trait space occupied by the more depauperate higher elevation assemblage (A2) [11, 13]. Because species shared between A1 and A2 must, by definition, contribute to trait packing (i.e. the species cannot occur outside the volume of A2) we only calculate trait packing for species unique to A1 (i.e. absent from A2). One method for quantifying niche packing is to simply calculate the % of the unique species in A1 that are enclosed by the actual MCP of A2 (‘NP fixed’ metric). However, while this technique has often been applied to detect the effects of habitat filtering [11], it may underestimate the importance of trait packing if assemblages differ in the shape or position of morphospace occupied. In the most extreme case, where A1 and A2 occupy completely disjunct regions of trait space, all of the increase in species richness may be incorrectly attributed to trait expansion, even if A1 occupies a volume of trait space equivalent to or smaller than that occupied by A2 (i.e. 100% trait packing). To overcome this problem, we developed a greedy search algorithm to calculate the % of species in A1 that can be contained within a MCP of a volume equivalent to that occupied by A2 (‘NP flexible’ metric, figure S8). We sequentially removed the unique species from A1 in the order that resulted in the largest reduction in morphospace volume (figure S8). We proceeded to remove species until the morphovolume of A1 was equivalent to or less than that occupied by A2. According to this approach, the % of unique species removed from A1 during the simulation represents the increase in richness due to trait expansion, while the % of unique species retained at the end of the simulation represents the extra richness accommodated through trait packing (figure S8). Using the ‘NP flexible’ metric we calculated % trait packing along the gradient in two different ways. First, we quantified the % trait packing in the most diverse lowland assemblage (300 m, A1) relative to mid-elevations (1600 m, A2) and the highland assemblage 8 (3250 m, A2). Second, we compared each 200m elevation band (200-3800m, A1) to the assemblage immediately above it (400-4000m, A2). When comparing adjacent elevation bands, we found that on average 85% of the additional species in the lower elevation assemblage are accommodated through trait packing (i.e. occur within a volume of trait space equivalent to that of the upper elevation band) (figure 3a). When comparing assemblages across the entire elevation gradient, we find that 78% of the additional species in the lowlands (300 m) are accommodated within a volume of trait space equivalent to that occupied in the highlands (3250 m) (figure 3b). Thus, we find that trait packing dominates over trait expansion regardless of the identity of the assemblages being compared. The ‘NP flexible’ metric is designed to account for changes in both the shape and position of assemblages within morphospace (figure S8). To demonstrate the importance of this, we also quantified niche packing using the ‘NP fixed’ metric. As above, we did this for both adjacent elevation bands and for the lowlands (300 m) relative to mid-elevations (1600 m) and the highlands (3250 m). Our results show that the ‘NP fixed’ metric greatly underestimates the importance of niche packing (figure S9). When comparing adjacent assemblages, on average only 36% (compared to 85% above) of additional species are accommodated through trait packing (figure S9a). When we compared assemblages in the lowlands (300 m) to those in the highlands (3250 m) we found that only 11% (compared to 78% above) of the additional species are accommodated through trait packing (figure S9b). These results highlight the critical importance of accounting for differences in the position and shape of morphospace when estimating niche packing, even among adjacent assemblages sharing many species. In addition to the position of morphospace, it is important to consider its continuity. Following Cornwell et al. [11], our method assumes that a simple expansion in total niche space corresponds to an increase in the range of multivariate trait space. This assumption is in 9 line with Macarthur’s [14] original idea that increases in niche space correspond to the extension of niche axes. However, it is worth considering that large ‘holes’ may be present in occupied trait space within the total morphovolume at higher elevations, and that species occurring within these holes at lower elevations would be considered evidence for niche packing in our analyses, although they occupy novel regions of trait space. We test for this form of niche expansion by quantifying mean nearest neighbour difference (MNND). This metric is constant across the gradient in Tyrannidae suggesting a constraint on packing and a tendency to occupy either holes or the periphery of trait space (figure S7). However, in all other families increasing species richness is associated with decreasing MNND, a pattern that is not predicted if lowland species are simply occupying internal gaps in high elevation morphovolume (figure S7). Moreover, constraints on packing would also be expected to lead to an increase in the evenness of trait spacing (FEve) but we found no consistent trend in FEve across the gradient (figure 2). These results are consistent with the hypothesis that most species/traits in lowland bird communities are packed increasingly closely within the total morphovolume of highland communities, rather than simply expanding into ‘holes’ concealed within our estimated morphovolume. 4. Testing gradients in ecological specialisation We tested whether ecological specialisation varies across the elevation gradient for each hierarchical guild level i) diet (7 classes, n = 520), ii) insectivore attack strategy (6 classes, n = 227), and iii) and foraging substrate for insectivores utilising gleaning or aerial attack manoeuvres (4 classes, n = 115). To calculate dietary specialisation, we used raw proportional dietary scores (i.e. 7 food classes), rather than the ecological guild categories derived from these, because the latter are not-equivalent units of diet breadth (i.e. omnivores have broader diets than specialist insectivores, frugivores and granivores categories). To 10 calculate specialisation of insectivore attack strategies and foraging substrates, we only used species obtaining 100% of their diet from insects and gleaning/aerial attack manoeuvres respectively. The Levins’ index (S) [15] provides a continuous measure of specialisation that takes into account the relative use of each different guild category, with higher scores indicating lower specialisation. In all cases, specialisation scores were right skewed and transformations failed to improve the normality of residuals in our fitted models (figure S2). We therefore assigned species as ‘specialists’ (S = 1) or ‘non-specialists’ (S > 1), choosing a threshold value of S = 1 because this provided a relatively equitable number of species between these two categories. To test the relationship between specialisation and species mid-point elevation (logtransformed), we fitted generalised linear models within a binomial error structure. To test whether these results were robust to the phylogenetic non-independence of species, we also fitted linear mixed models using Bayesian Markov Chain Monte Carlo methods in the R package MCMCglmm treating the phylogenetic covariance between species as a random effect [16]. Phylogenetic relationships among all species along our study gradient were extracted from the Jetz et al [17] time-calibrated phylogeny. We note that most (87%) of species in our dataset were represented by genetic data, with the remainder inserted according to taxonomic constraints. To account for phylogenetic uncertainty, we repeated our analysis across 10 trees drawn at random from the posterior distribution and report the mean parameter estimates across replicates. With specialisation (0 or 1) as a categorical response variable, models failed to converge and so we instead fitted species midpoint-elevation as the dependent variable and specialisation (assigned as a factor with two states: “specialist” or “non-specialist) as the independent variable. We ran all models for 2 million iterations with a 11 burn-in of 250,000 iterations and a thinning interval of 1000 iterations. We set flat noninformative priors with a low degree of belief. 12 Table S1. Description of species traits and % of variance attributed to interspecific differences (from ANOVA). % variance across species Trait Description Beak length Distance from the anterior edge of the nostrils to the tip 96.6 Beak width Width at the anterior edge of the nostrils 93.8 Beak depth Vertical height at the anterior edge of nostrils 96.5 Tarsus length Distance from the middle of the rear ankle joint, i.e. the notch between the tibia and tarsus, to the end of the last scale of the acrotarsium 90.5 Kipp’s distance Distance between the tip of the longest primary/wing tip and the first secondary feather measured on the folded wing 85.4 Wing length Distance between the carpal joint to wing tip, measured on a flattened wing 96.7 Tail length Distance from the tip of the longest rectrix to the point at which the two central rectrices protrude from the skin 13 95.2 Table S2. Trait loadings and proportion of variance accounted for by each principal component axis. Trait Beak Length Beak Width Beak Depth Tarsus Length Kipp's Distance Wing Length Tail Length % of variance Cumulative % of variance PC1 -0.399 -0.337 -0.416 -0.225 -0.481 -0.358 -0.379 PC2 -0.367 -0.153 -0.301 -0.318 0.802 0.072 -0.045 PC3 -0.198 0.591 0.432 -0.297 0.043 -0.104 -0.570 PC4 0.736 -0.253 -0.138 -0.041 0.191 -0.040 -0.579 PC5 0.350 0.257 -0.205 -0.747 -0.126 -0.182 0.403 PC6 -0.024 -0.601 0.699 -0.305 0.040 -0.204 0.115 PC7 -0.056 -0.152 0.020 -0.327 -0.263 0.883 -0.134 61.7 61.7 21.7 83.4 6.6 90.0 4.5 94.5 3.2 97.7 1.8 99.5 0.5 100.0 14 Table S3. Description of diet, foraging manoeuvre and substrate categories used to assign ecological guilds and their associated species richness (n). Guild category Diet (n = 520) Frugivore (n = 63) Granivore (n = 14) Insectivore (n = 355) Omnivore (n = 88) Description ≥ 60% diet consists of fruit ≥ 60% diet consists of seeds ≥ 60% diet consists of insects and other invertebrates < 60% diet consists of a single food type Insectivore attack behaviour (n = 355) Attacking prey in continuous flight, sometime termed hawking. Differs Aerial screen from aerial attack (see below) in that the attack behaviour does not (n = 11) commence or end from a perch or other surface. Prey is obtained from the ground through a variety of movement Ground pick including probing the soil, flicking and picking at leaf litter or other (n = 47) debris. Branch probe Species feed by probing, prising, pecking, chiselling or hammering (n = 14) insects from the branches or trunks of trees or dead bamboo stems Dead leaf probe Includes a variety of foraging techniques including pecking, probing (n = 27) and tearing at dead leaves. Picks prey from the surface of substrates while perched. While this Perch glean excludes any aerial manoeuvre during the attack phase it may include (n = 137) certain acrobatics including reaching or hanging. Prey is taken from the air or substrate surface via some form of aerial Aerial attack manoeuvre starting and ending at a perch or surface. This category (n = 120) includes a variety of different attack methods including jumping, pouncing, hovering and sallying. Gleaning/aerial attack substrate (n = 257) Air For “aerial attack” only. (n = 31) Ground For “aerial attack” only. (n = 12) Foliage For “aerial attack” and “perch glean”. Includes leaves, grass, bamboo, (n = 177) vines, epiphytes and small twigs. Branch For “aerial attack” and “perch glean”. Includes bark and moss on (n = 37) branches and trunks. Guild richness (n) is the median richness obtained from 500 replicate assignments of species to guilds with a probability based on their observed guild membership scores and is thus less than the number of species partially utilising each category (see “Methods”). 15 Table S4. Assemblage elevations used to quantify the contribution of niche packing and expansion to increases in species richness for each guild. Guild Assemblage Elevation (m) Richness All Lowlands 300 286 All Mid-elevations 1600 144 All Highlands 3250 70 Frugivore Lowlands 250 36 Frugivore Mid-elevations 1900 17 Frugivore Highlands 2900 9 Omnivore Lowlands 750 49 Omnivore Mid-elevations 1900 24 Omnivore Highlands 3500 13 Insectivore Lowlands 300 201 Insectivore Mid-elevations 1400 101 Insectivore Highlands 2900 51 Species richness is highest in lowland assemblages for each guild, with assemblages at higher elevations selected to represent a 4-fold reduction in richness. 16 Table S5. Out of bag (OOB) accuracy scores for each ecological guild, foraging manoeuvre and substrate obtained from random forest model. OOB Accuracy Score % Guild category Diet Granivore Frugivore Omnivore Insectivore 71 67 45 76 Insectivore attack behaviour Aerial screen Ground pick Dead leaf probe Branch probe Aerial attack Perch glean 95 78 61 51 71 41 Gleaning/aerial attack substrate Air Ground Foliage Branch 62 52 42 48 17 Table S6. Contribution to classification accuracy of each PC axis. Values show the % decline in accuracy following the removal of each trait axis from a random forest model containing all traits. Trait axis Dietary guild (%) Insectivore foraging manoeuvre (%) Gleaning/aerial attack substrate (%) PC1 1.5 1.2 0.8 PC2 2.7 2.1 0.7 PC3 2.7 1.0 0.4 PC4 0.9 1.4 0.5 PC5 1.4 5.0 0.8 PC6 1.2 7.0 2.1 PC7 0.4 1.0 0.2 18 Table S7. Elevation gradient in specialisation of diet (7 states), insectivore attack strategy (6 states) and gleaning/aerial attack foraging substrate (4 states) for non-phylogenetic GLM and phylogenetic GLMM. Diet (n = 520) Attack strategy (n = 227) Foraging substrate (n = 115) *, P < 0.05; n.s., not significant. GLM effect -0.01 n.s. 0.49 * -0.59 * 19 GLMM effect 0.07 n.s. 0.21 n.s. -0.27 n.s. Figure S1. Assignment protocol of species to guilds. Filled boxes represent the 14 classes analysed. 20 Figure S2. The frequency distribution of specialisation (S) in diet (7 states), insectivore attack strategy (6 states) and gleaning/aerial attack foraging substrate (4 states). 21 Figure S3. The mapping of ecological guilds onto passerine morphospace. Each plot shows the distribution of species (50 % quantiles) across each PC axes (from 1 to 7; see table S2 for PC trait loadings). The centre of each plot corresponds to the minimum value of each PC axis, with increasing values towards the edge (the scale is illustrated for aerial screening insectivores). Guilds with extreme traits are thus distributed towards either the edge or centre of the web, with intermediate trait values in the middle of each axis. 22 Figure S4. The relationship between phenotypic traits and ecological niche, focusing on (a) diet, (b) insectivore foraging strategy, and (c) substrate use of gleaning and sallying insectivores. Points show the mean assignment accuracy of a random forest model for each guild, calculated as the proportion of species classified accurately based on an increasing number of principal component axes (a-c) or raw morphological traits (d-f). GR: Granivore; FR: Frugivore; IN: Insectivore; OM: Omnivore; AS: Aerial screen; GP: Ground pick; AA: Aerial attack; DLP: Dead-leaf probe; BP: Branch probe; PG: Perch glean; A: Air; G: Ground; B: Branch; F: Foliage. 23 Figure S5. The mapping of ecological guilds onto morphospace. Results are shown from a single classification tree relating membership of ecological guilds (tips) to the position of species in PC trait space. The identities of the PC axes used to classify species are denoted for each of the major branching events. For clarity, the trait values used to split branches are omitted. 24 Figure S6. Elevational gradients in the mean nearest neighbour distance (MNND), minimum convex polygon volume (MCPV), and hypercube volume (HCV) across avian guilds. Points indicate observed assemblages, with 95% expectations under the null model (95% confidence interval) shown as grey polygons. Red points indicate assemblages that are significantly phenotypically clustered (i.e. smaller trait distances or volume than expected under the null model). Blue points indicate assemblages that are phenotypically overdispersed (i.e. greater trait distances or volume than expected under the null model). MCPV was not calculated for assemblages containing <7 species. 25 Figure S7. Elevational gradients in the richness (N), mean nearest neighbour distance (MNND), and minimum convex poylgon volume (MCPV) across major avian families. Points indicate observed assemblages, with 95% expectations under the null model (95% confidence interval) shown as grey polygons. Red points indicate assemblages that are significantly phenotypically clustered (i.e. smaller trait distances or volume than expected under the null model). Blue points indicate assemblages that are phenotypically overdispersed (i.e. greater trait distances or volume than expected under the null model). Family abbreviations: ALL (all passerines), TYRA (Tyrannidae), THRA (Thraupidae), THAM (Thamnophilidae), FURN (Furnariidae), DEND (Dendrocolaptidae) and COTI (Cotingidae). MCPV was not calculated for assemblages containing <7 species. 26 Figure S8. Partitioning assemblage richness into trait packing and expansion components. For illustration purposes we quantify packing and expansion in the most species rich lowland assemblage (A1, 300 m, N = 286 species) compared to a selected highland assemblage (A2, 3250 m, N = 70 species), representing a four-fold increase in richness (a) black solid points show the observed assemblages in morphovolume/richness space. Red points indicate the decrease in the volume of A1 after sequentially removing the species contributing the most to morphovolume (from right to left). Arrows indicate the richness at which the morphovolume of A1 equals that of A2 (b) the % of the additional species in A1 attributable to trait packing (i.e. occurring within the volume of A2) or trait expansion (i.e. occurring outside the volume of A2). 27 Figure S9. Niche packing is underestimated by the ‘NP Fixed’ metric. The % contribution of niche packing (blue) versus expansion (red) to (a) total passerine richness between adjacent elevation bands, and (b) between the lowlands, mid-elevations (M) and highlands (H) according to the ‘NP Fixed’ metric. In (a), the morphovolume of additional species in each band (numbers above bars show sample sizes) is compared with the single adjacent higher elevation band. In (b), the % contribution of niche packing across the gradient is shown separately for all passerines (‘All’) and within the most diverse guilds (IN, insectivore; FR, frugivore; OM, omnivore). In contrast to the ‘NP Flexible’ metric (figure 3), the ‘NP Fixed’ metric assumes a constant structure of morphospace and is thus biased towards inferring niche expansion when the position or shape of morphospace varies between assemblages. 28 References [1] Wilman, W., Belmaker, J., Simpson, J., de la Rosa, C. & Rivadeneira, M.M. 2014 EltonTraits 1.0: Species-level foraging attributes of the world's birds and mammals. Ecology 95, 2027–2027. [2] Remsen, J.V. & Robinson, S.K. 1990 A classification scheme for foraging behaviour of birds in terrestrial habitats. Studies in avian biology 13, 144-160. [3] Terborgh, J. 1992 Diversity and the tropical rainforest. New York, Scientific American Library. [4] Fitzpatrick, J.W. 1985 Form, foraging behavior, and adaptive radiation in the Tyrannidae. Ornithological Monographs 36, 447-470. (doi:10.2307/40168298). [5] del Hoyo, J.A., Sargatal, E.J. & Christie, D.A. 1992–2010 Handbook of the birds of the world. (Lynx, Barcelona. [6] Liaw, A. & Wiener, M. 2002 Classification and regression by randomForest. R News 2, 18-22. [7] Eklof, A., Jacob, U., Kopp, J., Bosch, J., Castro-Urgal, R., Chacoff, N.P., Dalsgaard, B., de Sassi, C., Galetti, M., Guimaraes, P.R., et al. 2013 The dimensionality of ecological networks. Ecol Lett 16, 577-583. (doi:Doi 10.1111/Ele.12081). [8] Miles, D.B. & Ricklefs, R.E. 1984 The correlation between ecology and morphology in deciduous forest passerine birds. Ecology 65, 1629-1640. (doi:Doi 10.2307/1939141). [9] Price, T.D., Hooper, D.M., Buchanan, C.D., Johansson, U.S., Tietze, D.T., Alstrom, P., Olsson, U., Ghosh-Harihar, M., Ishtiaq, F., Gupta, S.K., et al. 2014 Niche filling slows the diversification of Himalayan songbirds. Nature 509, 222-225. (doi:Doi 10.1038/Nature13272). [10] Ricklefs, R.E. 2012 Species richness and morphological diversity of passerine birds. P Natl Acad Sci USA 109, 14482-14487. (doi:DOI 10.1073/pnas.1212079109). [11] Cornwell, W.K., Schwilk, D.W. & Ackerly, D.D. 2006 A trait-based test for habitat filtering: convex hull volume. Ecology 87, 1465-1471. (doi:Doi 10.1890/00129658(2006)87[1465:Attfhf]2.0.Co;2). [12] Villeger, S., Mason, N.W.H. & Mouillot, D. 2008 New multidimensional functional diversity indices for a multifaceted framework in functional ecology. Ecology 89, 2290-2301. (doi:Doi 10.1890/07-1206.1). [13] Belmaker, J. & Jetz, W. 2013 Spatial Scaling of Functional Structure in Bird and Mammal Assemblages. Am Nat 181, 464-478. (doi:Doi 10.1086/669906). [14] Macarthur, R.H. 1965 Patterns of species diversity. Biol Rev 40, 510-533. (doi:DOI 10.1111/j.1469-185X.1965.tb00815.x). [15] Krebs, C.F. 1999 Ecological methodology. Menlo Park, CA., Addison-Wesley Educational Publishers. [16] Hadfield, J.D. & Nakagawa, S. 2010 General quantitative genetic methods for comparative biology: phylogenies, taxonomies and multi-trait models for continuous and categorical characters. J Evolution Biol 23, 494-508. (doi:DOI 10.1111/j.14209101.2009.01915.x). [17] Jetz, W., Thomas, G.H., Joy, J.B., Hartmann, K. & Mooers, A.O. 2012 The global diversity of birds in space and time. Nature 491, 444-448. (doi:Doi 10.1038/Nature11631). 29