Calculates measures of community phylogenetic structure (correlation between co-occurrence and phylogenetic distance) to patterns expected under various null models
comm.phylo.cor(samp, phylo, metric = c("cij", "checkerboard", "jaccard", "doij"),
null.model = c("sample.taxa.labels", "pool.taxa.labels",
"frequency", "richness", "independentswap","trialswap"), runs = 999, ...)
Community data matrix
Phylogenetic tree
Metric of co-occurrence to use (see species.dist
)
Null model to use (see Details section for description)
Number of runs (randomizations)
Additional arguments to randomizeMatrix
A list with elements:
Observed co-occurrence/phylogenetic distance correlation
P-value of observed correlation (standard P-value for correlation coefficient, not based on comparison with randomizations)
Rank of observed correlation vs. random
Number of runs (randomizations)
P-value of observed correlation vs. randomizations (= obs.rank / (runs + 1))
A vector of random correlation calculated for each run
Currently implemented null models (arguments to null.model):
Shuffle phylogeny tip labels (only within set of taxa present in community data)
Shuffle phylogeny tip labels (across all taxa included in phylogenetic tree)
Randomize community data matrix abundances within species (maintains species occurence frequency)
Randomize community data matrix abundances within samples (maintains sample species richness)
Randomize community data matrix maintaining species occurrence frequency and site richnessing using independent swap
Randomize community data matrix maintaining species occurrence frequency and site richnessing using trial swap
Cavender-Bares J., D.A. Ackerly, D. Baum and F.A. Bazzaz. 2004. Phylogenetic overdispersion in Floridian oak communities, American Naturalist, 163(6):823-843.
# NOT RUN {
data(phylocom)
comm.phylo.cor(phylocom$sample, phylocom$phylo, metric="cij",null.model="sample.taxa.labels")
# }
Run the code above in your browser using DataLab