minglingF
, isarF
, shannonF
and simpsonF
highly recommended.
segregationFun(X, fun="isar", r=NULL, ntype="geometric", funpars=NULL,
toroidal=FALSE, minusRange=TRUE, included=NULL, dbg=FALSE,
doDists=FALSE, prepRange=0.0, prepGraph=NULL, prepGraphIsTarget=FALSE,
weightMatrix=NULL, translate=FALSE)
ppp
(see package 'spatstat')v2
in shannonF
. Simpson: none.included
-vector. If given as a positive number, included
-vector is created with points with distance atleast minusRange from the border.prepRange
, dodists
and toroidal
are ignored and calculations are carried
using the prepGraph as a starting point. Useful for huge datasets.prepGraph
is used to calculate a single function value directly, all other neighbourhood parameters are ignored.isarF
for this.spatstat::Kest
for details). Used only in mingling index.fv
, see spatstat for more details. Basically a list with the computed values and parameter values.
Possible neighbourhood relations for the spatial version include geometric, k-nearest neighbours, Delauney, and Gabriel.
Delauney and Gabriel are parameter free, so given r
has no meaning. In geometric graph, r
is a vector
of distances (sizes of the surrounding 'disc') and for k-nn r
is the vector of neighbourhood abundances for each point
to consider in the calculation of the spatial exposure measures. The basic type of spatial summary uses range, or 'geometric'
graph connections with varying neighbourhood parameter.
For geometric
and knn
, the calculations are done by shrinking the graph given by the largest value of r
. If dealing with large datasets,
it is advisable to give preprocessing range, prepRange
. The algorithm first calculates a geometric graph with parameter
prepRange
, and uses this as basis for finding the needed neighbourhoods. Speeds up calculations. prepGraph
, if given, works as the
preprocessed geometric graph. But make sure prepRange
is large enough (e.g. in geometric
, prepRange
>max(r
)).
The doDists
option speeds up calculations by precomputing the pairwise distances but takes n*(n-1) memory!
For border correction, use minusRange
for reduced border correction (for rectangular windows only). If using geometric
or knn
neighbourhoods,
the option toroidal
for toroidal correction is also available. The vector included
can be given for more specific minus
-correction,
only those points with TRUE (1) value are used in calculation. However, the neighbourhoods are calculated with all points.