pez (version 1.2-0)

ConDivSim: Null models for functional-phylogenetic diversity

Description

Simulate expectations (under a null model) of mean pairwise distance for a set of communities with different species richness.

Usage

ConDivSim(object, type = "traits", n.sim = 100, plot = TRUE,
  disp99 = FALSE)

Arguments

object

a comparative.comm object, with presence-absence community data.

type

character string giving the type of distance matrix on which the mean pairwise distance is based. Either "trait" or "phy" to a phylogenetic or trait-based distance matrix, or an actual matrix to use (e.g., one from funct.phylo.dist)

n.sim

The number of permutations of the presence vector used to make the estimations.

plot

TRUE or FALSE to make the plot of the expected average mean pairwise distance, and the 5-95% confidence interval.

disp99

Display the 99% interval?

Value

matrix with quantiles of mean pairwise distances for all quantiles of of mean pairwise distance, with one row for the range of species richnesses in the data (see column SpRich).

Details

If plot == TRUE, then a surface is drawn giving the null distribution. Lighter shades of gray give larger intervals with categories: 0.005-0.995 = 99%, 0.025-0.975 = 95%, 0.05-0.95 = 90%, 0.25-0.75 = 50%.

See Also

sim.phy scape

Examples

Run this code
# NOT RUN {
data(laja)
data <- comparative.comm(invert.tree, river.sites, invert.traits)
#Must have all species present in at least one community!
#...and must be presence-absence data
data <- data[,colSums(data$comm) > 0]
data$comm[data$comm>1] <- 1
sims <- ConDivSim(data)
#...without traits...
sims.phy <- ConDivSim(data, type="phy")
# }

Run the code above in your browser using DataLab