DivAccum: Diversity Accumulation

View source: R/Accumulation.R

DivAccumR Documentation

Diversity Accumulation

Description

Diversity Accumulation

Usage

DivAccum(
  spCommunity,
  q.seq = seq(0, 2, by = 0.1),
  divCorrection = "None",
  n.seq = 1:ceiling(spCommunity$n/2),
  r.seq = NULL,
  spCorrection = "None",
  RCorrection = "Jackknife",
  H0 = "None",
  Alpha = 0.05,
  NumberOfSimulations = 100,
  Individual = FALSE,
  ShowProgressBar = interactive(),
  CheckArguments = TRUE
)

Arguments

spCommunity

A spatialized community (A wmppp.object with PointType values as species names.)

q.seq

A numeric vector: the sequence of diversity orders to address. Default is from 0 to 2.

divCorrection

A string containing one of the possible corrections to calculate diversity, see Tsallis for all possible values. "None" uses the plugin estimator. It is the default value.

n.seq

A vector of integers. Entropy will be accumulated along this number of neighbors around each individual. Default is 10% of the individuals.

r.seq

A vector of distances. If NULL accumulation is along n, else neighbors are accumulated in circles of radius r.

spCorrection

The edge-effect correction to apply when estimating the entropy of a neighborhood community that does not fit in the window. Does not apply if neighborhoods are defined by the number of neighbors. Default is "None". "Extrapolation" extrapolates the observed diversity up to the number of individuals estimated in the full area of the neighborhood, which is slow.

RCorrection

The correction to apply when estimating the asymptotic richness to extrapolate local entropy in edge effect correction. A string containing a correction recognized by Richness to evaluate the total number of species. "Jackknife" is the default value. An alternative is "Rarefy" to estimate the number of species such that the entropy of order $q$ of the asymptotic distribution rarefied to the observed sample size equals the actual entropy of the data.

H0

The null hypothesis to compare the distribution of spCommunity to. If "none", the default value, no null hypothesis is tested. "Multinomial" means the community will be rarefied down to the number of neighbors of n.seq. "RandomLocation" means the points will we randomly permuted accross their actual locations. "Binomial" means the points will we uniformly and independently drawn in the window (a binomial point process is a Poisson point process conditionally to the number of points).

Alpha

The risk level of the envelope of the null hypothesis. Default is 5%.

NumberOfSimulations

The number of bootstraps to build confidence intervals. Default is 100.

Individual

If TRUE, individual neighborhood entropies are returned.

ShowProgressBar

If TRUE (default), a progress bar is shown.

CheckArguments

If TRUE (default), the function arguments are verified. Should be set to FALSE to save time in simulations for example, when the arguments have been checked elsewhere.

Value

An "Accumulation" object that is a list.

  • Its first item, named "spCommunity", is spCommunity.

  • Its second item, named "Accumulation", is a 3-D array containing average diversity. The third dimension of the array is only of length 1: it contains observed diversity. The first two dimensions are respectively for $q$ values and the number of points of the neighborhood, starting from 1 (the point itself, with no neighbor), or the distances starting from 0.

  • Its third item, named "Neighborhoods" has the same structure as the second one but its third dimension contains the local values accumulated in the neighborhood of each point.

Examples

# Generate a random community
spCommunity <- rSpCommunity(1, size=50, S=3)
# Calculate the species accumulation curve and accumulation of Simpson diversity
accum <- DivAccum(spCommunity, q.seq=c(0,2))
plot(accum, q=0)
plot(accum, q=2)


EricMarcon/SpatDiv documentation built on May 25, 2023, 12:54 p.m.