Below is a list of the functions that were implemented for this project. A detailed rationale for the project can be found in the project proposal Enhancing the representation of ecophylogenetic tools in R
Phylogenetic Bipartite Linear Model
Description of function pblm
Fits a linear model to the association strengths of a bipartite data set with or without phylogenetic correlation among the interacting species. Fit a linear model with covariates using estimated generalized least squares to the association strengths between two sets of interacting species. Associations can be either binary or continuous. If phylogenies of the two sets of interacting species are supplied, two phyogenetic signal strength parameters (d1 and d2), one for each species set, based on an Ornstein-Uhlenbeck model of evolution with stabilizing selection are estimated. Values of d=1 indicate no stabilizing selection and correspond to the Brownian motion model of evolution; 0<d<1 represents stabilizing selection; d=0 depicts the absence of phylogenetic correlation (i.e., a star phylogeny); and d>1 corresponds to disruptive selection where phylogenetic signal is amplified. Confidence intervals for these and the other parameters can be estimated with bootstrapping.
Description of function pblmpredict
The function pblmpredict predicts the associations of novel species following the methods given in appendix B of Ives and Godfray (2006).
Ives A.R. & Godfray H.C. (2006) Phylogenetic analysis of trophic associations. The American Naturalist, 168, E1-E14
Blomberg S.P., Garland T.J. & Ives A.R. (2003) Testing for phylogenetic signal in comparative data: Behavioral traits are more labile. Evolution, 57, 717-745
Calculate Faith's Phylogenetic Diversity
Description of function pd
Calculate the sum of the total branch lengths for one or multiple samples.
Faith D.P. (1992) Conservation evaluation and phylogenetic diversity. Biological Conservation, 61, 1-10
Permutations to Test for Phylogenetic Signal in Community Composition
Description of function phylostruct
Randomize sample/community data matrices to create null distributions of given metrics. The function creates null distributions for the psd set of metrics and for the correlations of sppregs from observed community data sets.
Helmus M.R., Bland T.J., Williams C.K. & Ives A.R. (2007a) Phylogenetic measures of biodiversity. American Naturalist, 169, E68-E83
Helmus M.R., Savage K., Diebel M.W., Maxted J.T. & Ives A.R. (2007b) Separating the determinants of phylogenetic community structure. Ecology Letters, 10, 917-925
Gotelli N.J. (2000) Null model analysis of species co-occurrence patterns. Ecology, 81, 2606-2621
Phylogenetic Species Diversity Metrics
Description of functions psv, psr, pse, psc, psd and psv.spp
Calculate the bounded phylogenetic biodiversity metrics: phylogenetic species variability, richness, evenness and clustering for one or multiple samples.
Phylogenetic species variability (PSV) quantifies how phylogenetic relatedness decreases the variance of a hypothetical unselected/neutral trait shared by all species in a community. The expected value of PSV is statistically independent of species richness, is one when all species in a sample are unrelated (i.e., a star phylogeny) and approaches zero as species become more related. PSV is directly related to mean phylogenetic distance. The expected variance around PSV for any sample of a particular species richness can be approximated. To address how individual species contribute to the mean PSV of a data set, the function psv.spp gives signed proportions of the total deviation from the mean PSV that occurs when all species are removed from the data set one at a time. The absolute values of these “species effects” tend to positively correlate with species prevalence.
Phylogenetic species richness (PSR) is the number of species in a sample multiplied by PSV. It can be considered the species richness of a sample after discounting by species relatedness. The value is maximum at the species richness of the sample, and decreases towards zero as relatedness increases. The expected variance around PSR for any sample of a particular species richness can be approximated.
Phylogenetic species evenness (PSE) is the metric PSV modified to incorporate relative species abundances. The maximum attainable value of PSE (i.e., 1) occurs only if species abundances are equal and species phylogeny is a star. PSE essentially grafts each individual of a species onto the tip of the phylogeny of its species with branch lengths of zero.
Phylogenetic species clustering (PSC) is a metric of the branch tip clustering of species across a sample's phylogeny. As PSC increases to 1, species are less related to one another the tips of the phylogeny. PSC is directly related to mean nearest neighbor distance.
These metrics are bounded either between zero and one (PSV, PSE, PSC) or zero and species richness (PSR); but the metrics asymptotically approach zero as relatedness increases. Zero can be assigned to communities with less than two species, but conclusions drawn from assigning communities zero values need be carefully explored for any data set. The data sets need not be species-community data sets but may be any sample data set with an associated phylogeny.
References Helmus M.R., Bland T.J., Williams C.K. & Ives A.R. (2007) Phylogenetic measures of biodiversity. American Naturalist, 169, E68-E83
Phylogenetic Species Richness Sample-Based Rarefaction Curve
Description of function specaccum.psr
Finds a sample-based rarefaction curve for phylogentic species richness for a set of samples.
References Gotelli N.J. & Colwell R.K. (2001) Quantifying biodiversity: procedures and pitfalls in the measurement and comparison of species richness. Ecology Letters, 4, 379-391
Helmus M.R., Bland T.J., Williams C.K. & Ives A.R. (2007) Phylogenetic measures of biodiversity. American Naturalist, 169, E68-E83
Regressions to Separate Phylogenetic Attraction and Repulsion
Description of function sppregs
Fit regressions on species abundance or presence/absence across communities and calculate phylogenetic correlations. For each species in samp, the function fits regressions of species presence/absence or abundances on the environmental variables supplied in env; and calculates the (n^2-n)/2 pairwise species correlations between the residuals of these fits and pairwise species phylogenetic correlations. The residuals can be thought of as the presence/absence of species across sites/communities after accounting for how species respond to environmental variation across sites. Each set of coefficients can be tested for phylogenetic signal with, for example, the function phylosignal.
Description of function sppregs.plot
The function sppregs.plot produces a set of three plots of the correlations of pairwise species phylogenetic correlations versus: the observed pairwise correlations of species across communities, the residual correlations, and the pairwise differences between (i.e., the change in species co-occurrence once the environmental variables are taken into account). The significance of these correlations can be tested via permutation with the function phylostruct.
Helmus M.R., Savage K., Diebel M.W., Maxted J.T. & Ives A.R. (2007) Separating the determinants of phylogenetic community structure. Ecology Letters, 10, 917-925