mcseg.test {spatialkernel} | R Documentation |
Monte Carlo test of spatial segregation in a multivariate point process by simulating data from random re-labelling of the categorical marks.
mcseg.test(pts, marks, h, stpts = NULL, ntest = 100, proc = TRUE)
pts |
matrix containing the x,y -coordinates of the
data point locations. |
marks |
numeric/character vector of the marked type labels of the point pattern. |
h |
numeric vector of the bandwidths at which to calculate the cross-validated likelihood function. |
stpts |
matrix containing the x,y -coordinates of the
locations at which to implement the pointwise segregation test,
with default NULL not to do the pointwise segregation test. |
ntest |
integer with default 100, number of simulations for the Monte Carlo test |
proc |
logical with default TRUE to print the processing
messages. |
The null hypothesis is that the estimated risk surface is
spatially constant, i.e., the type-specific probabilities
are p_k(x)=p_k, for all k, see phat
. Each
Monte Carlo simulation is done by relabeling the data categorical
marks at random
whilst preserving the observed number of cases of each type.
The segregation test can also be done pointwise, usually at a fine grid of points, to mark the areas where the estimated type-specific probabilities are significantly greater or smaller than the spatial average.
A list with components
pvalue |
numeric, p-value of the Monte Carlo test. |
stpvalue |
matrix, p-values of the test at each point in
stpts (if stpts is not NULL ), with each column corresponds
to one type |
... |
copy of the arguments pts, marks, h, stpts, ntest, proc . |