EntAccum: Entropy Accumulation

View source: R/Accumulation.R

EntAccumR Documentation

Entropy Accumulation

Description

Entropy Accumulation

Usage

EntAccum(
  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",
  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.

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 entropy. The third dimension of the array is only of length 1: it contains observed entropy. 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 accumulation of Shannon entropy 
accum <- EntAccum(spCommunity, q.seq=1)
plot(accum, q=1)
# along distance
accumR <- EntAccum(spCommunity, q.seq=1, r.seq=seq(0, .5, .05))
plot(accumR, q=1)


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