Standardized effect size of mean pairwise distances in communities. When used with a phylogenetic distance matrix, equivalent to -1 times the Nearest Relative Index (NRI).
ses.mpd(samp, dis, null.model = c("taxa.labels", "richness", "frequency", "sample.pool",
"phylogeny.pool", "independentswap", "trialswap"),
abundance.weighted = FALSE, runs = 999, iterations = 1000)
Community data matrix
Distance matrix (generally a phylogenetic distance matrix)
Null model to use (see Details section for description)
Should mean nearest taxon distances for each species be weighted by species abundance? (default = FALSE)
Number of randomizations
Number of iterations to use for each randomization (for independent swap and trial null models)
A data frame of results for each community
Number of taxa in community
Observed mpd in community
Mean mpd in null communities
Standard deviation of mpd in null communities
Rank of observed mpd vs. null communities
Standardized effect size of mpd vs. null communities (= (mpd.obs - mpd.rand.mean) / mpd.rand.sd, equivalent to -NRI)
P-value (quantile) of observed mpd vs. null communities (= mpd.obs.rank / runs + 1)
Number of randomizations
Currently implemented null models (arguments to null.model):
Shuffle distance matrix labels (across all taxa included in distance matrix)
Randomize community data matrix abundances within samples (maintains sample species richness)
Randomize community data matrix abundances within species (maintains species occurence frequency)
Randomize community data matrix by drawing species from pool of species occurring in at least one community (sample pool) with equal probability
Randomize community data matrix by drawing species from pool of species occurring in the distance matrix (phylogeny pool) with equal probability
Randomize community data matrix with the independent swap algorithm (Gotelli 2000) maintaining species occurrence frequency and sample species richness
Randomize community data matrix with the trial-swap algorithm (Miklos & Podani 2004) maintaining species occurrence frequency and sample species richness
Webb, C.O., Ackerly, D.D., and Kembel, S.W. 2008. Phylocom: software for the analysis of phylogenetic community structure and trait evolution. Version 4.0.1. http://www.phylodiversity.net/phylocom/.
# NOT RUN {
data(phylocom)
ses.mpd(phylocom$sample, cophenetic(phylocom$phylo),null.model="taxa.labels")
# }
Run the code above in your browser using DataLab