segregation.test: Test of Spatial Segregation of Types

View source: R/segtest.R

segregation.testR Documentation

Test of Spatial Segregation of Types

Description

Performs a Monte Carlo test of spatial segregation of the types in a multitype point pattern.

Usage

segregation.test(X, ...)

## S3 method for class 'ppp'
segregation.test(X, ..., nsim = 19,
       permute = TRUE, verbose = TRUE, Xname)

Arguments

X

Multitype point pattern (object of class "ppp" with factor-valued marks).

...

Additional arguments passed to relrisk.ppp to control the smoothing parameter or bandwidth selection.

nsim

Number of simulations for the Monte Carlo test.

permute

Argument passed to rlabel. If TRUE (the default), randomisation is performed by randomly permuting the labels of X. If FALSE, randomisation is performing by resampling the labels with replacement.

verbose

Logical value indicating whether to print progress reports.

Xname

Optional character string giving the name of the dataset X.

Details

The Monte Carlo test of spatial segregation of types, proposed by Kelsall and Diggle (1995) and Diggle et al (2005), is applied to the point pattern X. The test statistic is

T = sum[i] sum[m] (phat(m | x[i]) - pbar[m])^2

where phat(m | x[i]) is the leave-one-out kernel smoothing estimate of the probability that the i-th data point has type m, and pbar[m] is the average fraction of data points which are of type m. The statistic T is evaluated for the data and for nsim randomised versions of X, generated by randomly permuting or resampling the marks.

Note that, by default, automatic bandwidth selection will be performed separately for each randomised pattern. This computation can be very time-consuming but is necessary for the test to be valid in most conditions. A short-cut is to specify the value of the smoothing bandwidth sigma as shown in the examples.

Value

An object of class "htest" representing the result of the test.

Author(s)

\spatstatAuthors

.

References

Kelsall, J.E. and Diggle, P.J. (1995) Kernel estimation of relative risk. Bernoulli 1, 3–16.

Diggle, P.J., Zheng, P. and Durr, P. (2005) Non-parametric estimation of spatial segregation in a multivariate point process: bovine tuberculosis in Cornwall, UK. Applied Statistics 54, 645–658.

See Also

relrisk

Examples

  segregation.test(hyytiala, 5)

  if(interactive()) segregation.test(hyytiala, hmin=0.05) 

spatstat.core documentation built on May 18, 2022, 9:05 a.m.