Compute the spatial and aspatial Shannon index for a given multitype point pattern.
shannonF(X, r = NULL, v2 = FALSE, ...)shannon.index(X, spatial = FALSE, ...)
Multitype point pattern of class ppp
(see package 'spatstat')
Vector of sizes for neighbourhoods, e.g. geometric
graph with different ranges.
If TRUE, use the real number of types in neighbourhoods as the log-base instead of total population type count.
Further parametes for the function segregationFun
.
If FALSE, return the classical aspatial index value.
Returns an fv
-object, see spatstat
for more information. The index returns a scalar.
shannon.index
: Traditional index.
The form of Shannon index is H = 1 - E(o)/E(N), where E(N) is the global entropy and E(o) is the local entropy calculated as E(o)= - sum pi_tau log(pi_tau), where the sum is over the different types present in the pattern, and pi_tau is the expected frequency of type tau points in a neighbourhood of a typical point of the pattern.
The function shannonF
is the calculation function. Uses function segregationFun
.
The function shannon.index
is a shortcut to get the non-spatial Shannon index.
Rajala, Illian: A family of spatial biodiversity measures based on graphs, Env. Ecol. Stat. 2012
Reardon, O'sullivan: Measures of spatial segregation. Sociological methodology, 34:121-162, 2004.