Diversity metrics
While species richness (SR) offered a simple measure of taxonomic diversity at each site, phylogenetic diversity was calculated as Faith’s phylogenetic diversity (PD) index, or the sum of all branch lengths of the phylogeny connecting all species at a site (Faith 1992), using the function ‘pd’ in R package picante (Kembel et al. 2010). The branch lengths are taken to represent evolutionary time, with higher PD indicating group of species that are more evolutionarily apart in time (Tucker et al. 2019). Absolute functional diversity was estimated as functional richness, FRic (Villéger et al. 2008), which represents the multidimensional volume of functional space occupied by the species within a community (Villéger et al. 2008). We estimated FRic by computing the pairwise distance between all birds (branch lengths of the functional dendrogram for species within a community) at every site which had more than two species. The dimensions of the functional distance matrix were condensed using PCoA to estimate the convex hull volume of functional spaces for species within a community in R using the package ‘FD’ (Laliberté et al. 2014).
Dispersion metrics for continuous traits were measured by quantifying the community-weighted mean (CWM) of traits showing phylogenetic signal using the ’dbFD’ function in the ’FD’ R package (Laliberté et al. 2014).The rationale behind this was that environmental filtering would lead to a decrease in trait range or variance in communities(e.g. Graham et al. 2012; Zhang et al. 2020).CWM statistics were calculated by taking averages of trait values of species that were present in each site (communities), weighted by species abundance.
Mean pairwise phylogenetic distance (MPD)and mean pairwise functional distance (MFD) at each site (Webb et al. 2002) were derived from the average functional or phylogenetic distance between each pair of species that co-existed at each site calculated as
\begin{equation} MPD(or\ MFD)=\frac{\sum_{i}^{n}{\sum_{j}^{n}\delta_{i,j}}}{n}\left(i\neq j\right)\nonumber \\ \end{equation}
where n is species richness in each band, \(\delta_{i,j}\) is the pair-wise functional or phylogenetic distance (Euclidean distance) between species i and species j .
For a phylogenetic or functional tree ‘T’ with a set of species ‘n’ represented by a subset of branching nodes, the MPD of‘n’ is equal to the average of the distances of all possible simple paths in ‘T’ that connect pairs of nodes in ‘n’(Tsirogiannis and Sandel 2014). We compared these indices to 1000 randomized communities to test whether the functional and phylogenetic community structures differed from random expectations. For this we used the function ‘ses. mpd’ in package picante (Kembel et al. 2010) to generate random communities by shuffling the tips of the branches of the phylogenetic and functional trees used to calculate distance matrices for the entire community of river birds keeping the species richness constant. This procedure assumes that all species could colonize habitats across the whole gradient but are excluded due to local biotic and abiotic factors. We calculated the standardized effect size (SES) of MPD and MFD for each site comparing the observed values versus the expected values from the null communities (Kembel et al. 2010). The SES aids in inferring community assembly processes like environmental filtering and competition. When traits and lineages are conserved (i.e. with phylogenetic signals) with SES values <0, it indicates that communities are phylogenetically and functionally clustered and are shaped by environmental filtering. Community overdispersion with SES > 0 for MPD and MFD values are taken to indicate competitive exclusion (Webb et al. 2002).