spatialsegregation-shannon {spatialsegregation} | R Documentation |
Compute the spatial and aspatial Shannon index for a given multitype point pattern.
shannonF(pp, parvec = 1:20, graph_type = "knn", ...) shannon_index(pp, graph_type = "knn", graph_par = 4, spatial = TRUE, ...)
pp |
Multitype point pattern (see package 'spatstat') |
parvec |
Default 1:20. Vector for the neighbourhood defining graph, e.g. geometric graph with different r . |
graph_type |
Default knn . Type of the neighbourhood graph. Accepts: knn , geometric , delauney , gabriel . |
graph_par |
The single parameter to calculate the value in. |
spatial |
If FALSE, return the classical aspatial index value. |
... |
Further tuning parametes for the function segregationFun. |
Date: | 2009-03-09 |
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 main calculation function. Uses function segregationFun
with parameter ftype=2
.
The function shannon_index
is a shortcut to get a single value for the pattern. Uses 4-nn graph by default.
Tuomas Rajala University of Jyvaskyla, Finland tarajala@maths.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.