ent_sp_simpson: Spatially Explicit Simpson's Entropy

View source: R/ent_sp_simpson.R

ent_sp_simpsonR Documentation

Spatially Explicit Simpson's Entropy

Description

Simpson's entropy of the neighborhood of individuals, up to a distance \insertCiteShimatani2001divent.

Usage

ent_sp_simpson(
  X,
  r = NULL,
  correction = c("isotropic", "translate", "none"),
  check_arguments = TRUE
)

ent_sp_simpsonEnvelope(
  X,
  r = NULL,
  n_simulations = 100,
  alpha = 0.05,
  correction = c("isotropic", "translate", "none"),
  h0 = c("RandomPosition", "RandomLabeling"),
  global = FALSE,
  check_arguments = TRUE
)

Arguments

X

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

r

a vector of distances.

correction

the edge-effect correction to apply when estimating the number of neighbors or the K function with spatstat.explore::Kest. Default is "isotropic".

check_arguments

if TRUE, the function arguments are verified. Should be set to FALSE to save time when the arguments have been checked elsewhere.

n_simulations

the number of simulations used to estimate the confidence envelope.

alpha

the risk level, 5% by default.

h0

A string describing the null hypothesis to simulate. The null hypothesis may be "RandomPosition": points are drawn in a Poisson process (default) or "RandomLabeling": randomizes point types, keeping locations unchanged.

global

if TRUE, a global envelope sensu \insertCiteDuranton2005divent is calculated.

Value

ent_sp_simpson returns an object of class fv, see spatstat.explore::fv.object. There are methods to print and plot this class. It contains the value of the spatially explicit Simpson's entropy for each distance in r.

ent_sp_simpsonEnvelope returns an envelope object spatstat.explore::envelope. There are methods to print and plot this class. It contains the observed value of the function, its average simulated value and the confidence envelope.

References

\insertAllCited

Examples

# Generate a random community
X <- rspcommunity(1, size = 1000, species_number = 3)
# Calculate the entropy and plot it
autoplot(ent_sp_simpson(X))

# Generate a random community
X <- rspcommunity(1, size = 100, species_number = 3)
# Calculate the entropy and plot it
autoplot(ent_sp_simpsonEnvelope(X, n_simulations = 10))


divent documentation built on April 3, 2025, 7:40 p.m.