spatialsegregation-shannon {spatialsegregation} | R Documentation |
Compute the spatial and aspatial Shannon index for a given multitype point pattern.
shannonF(X, r=NULL, v2=FALSE, ...) shannon.index(X, spatial=FALSE, ...)
X |
Multitype point pattern of class ppp (see package 'spatstat') |
r |
Vector of sizes for neighbourhoods, e.g. geometric graph with different ranges. |
spatial |
If FALSE, return the classical aspatial index value. |
v2 |
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 . |
Date: | 2009-09-06 |
License: | GPL v2 or later |
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 types of the pattern, and pi_tau is the expected relative 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.
Returns an fv
-object, see spatstat
for more information.
Tuomas Rajala University of Jyvaskyla, Finland tuomas.a.rajala@jyu.fi
Rajala, Illian: Graph-based description of mingling and segregation in multitype spatial point patterns. To appear 2009.
Reardon, O'sullivan: Measures of spatial segregation. Sociological methodology, 34:121-162, 2004.