Learn R Programming

smacpod (version 1.3.0)

spscan.test: Spatial Scan Test

Description

spscan.test performs the spatial scan test of Kulldorf (1997).

Usage

spscan.test(x, case = 2, nsim = 499, alpha = 0.1, nreport = nsim + 1,
  maxd = NULL)

Arguments

x
A ppp object from the spatstat package with marks for the case and control groups.
case
The position of the name of the "case" group in levels(x$marks). The default is 2.
nsim
The number of simulations from which to compute p-value.
alpha
The significance level to determine whether a cluster is signficiant.
nreport
The frequency with which to report simulation progress. The default is nsim+ 1, meaning no progress will be displayed.
maxd
The radius of the largest possible cluster to consider.

Value

  • Returns a list with the following components:
  • coordsThe centroids of the significant clusters.
  • rThe radii of the window of the significant clusters.
  • pThe vector of p-values associated with the significant clusters.
  • pppThe original ppp object for which the scan test was performed.

Details

The test is performed using the random labeling hypothesis. The windows are circular and extend from the observed data locations. The clusters returned are non-overlapping, ordered from most significant to least significant. The first cluster is the most likely to be a cluster. If no significant clusters are found, then the most likely is returned (along with a warning).

References

Waller, L.A. and Gotway, C.A. (2005). Applied Spatial Statistics for Public Health Data. Hoboken, NJ: Wiley. Kulldorff, M. (1997) A spatial scan statistic. Communications in Statistics -- Theory and Methods 26, 1481-1496.

Examples

Run this code
data(grave)
out = spscan.test(grave)
plot(out, main = "")
# get warning if no significant cluster
out2 = spscan.test(grave, alpha = 0.01)

Run the code above in your browser using DataLab