Skip to contents

ScanZones: distinct nearest-neighbour zones within ubpop of the population (smerc::scan.zones). KulldorffScan: Poisson or Bernoulli likelihood-ratio scan with non-overlapping secondary clusters and Monte Carlo p-values from Philox multinomial redistributions (Kulldorff 1997; smerc::scan.test). BesagNewell: nearest regions pooled to k cases, \(P(Poisson(E) \ge k_{obs})\) (Besag and Newell 1991; SpatialEpi). TangoTest: Tango's (1995) index with its chi-square approximation (smerc::tango.test). StoneTest: Stone's (1988) maximum cumulative O/E by distance order. Identical to the Python arm morie.fn.scanstat.

Usage

ScanZones(coords, pop, ubpop = 0.5)

KulldorffScan(
  coords,
  cases,
  pop,
  ex = NULL,
  kind = "poisson",
  ubpop = 0.5,
  nsim = 499L,
  alpha = 0.1,
  min_cases = 2,
  seed = 1L
)

BesagNewell(coords, cases, pop, k, expected = NULL)

TangoTest(cases, pop, W)

StoneTest(cases, expected, order, nsim = 0L, seed = 1L)

Arguments

coords

Coordinates.

pop

Populations.

ubpop

Population upper bound (fraction).

cases

Counts.

ex

Expected counts.

kind

"poisson" or "binomial".

nsim

Monte Carlo replications.

alpha

Significance level for reported clusters.

min_cases

Minimum cases in a zone.

seed

Philox seed.

k

Case threshold.

expected

Expected counts.

W

Tango weight matrix.

order

Region order by distance from the source (1-based).

Value

List.

References

Kulldorff, M. (1997). A spatial scan statistic. Communications in Statistics - Theory and Methods 26, 1481-1496.

Tango, T. (1995). A class of tests for detecting general and focused clustering of rare diseases. Statistics in Medicine 14, 2323-2334.

Examples

P <- cbind(0:5, 0)
KulldorffScan(P, c(9, 8, 1, 1, 1, 0), rep(10, 6), nsim = 0)$all_tobs
#> [1] 11.43862  0.00000
BesagNewell(cbind(c(0, 1, 2, 9), 0), c(3, 2, 0, 1), rep(10, 4), 4)$m_values
#> [1] 2 2 3 4