Skip to contents

EllipticScan: Kulldorff's elliptic scan (as smerc::elliptic.test); zones are nearest-neighbour prefixes in the elliptic distance for each shape and angle, the Poisson likelihood ratio is multiplied by the penalty \((4s/(s+1)^2)^a\), clusters are chosen greedily without overlap and p-values come from multinomial redistributions of the cases (Philox). FlexScan: Tango and Takahashi's flexibly shaped scan (as smerc::flex.test) over the connected subsets of each region's k nearest neighbours; FlexZones lists those zones (1-based). NormalScan: the normal-model scan for continuous outcomes, \(N\ln(s_0/s_z)\) over circular zones, with a permutation p-value. CuzickEdwards: the \(T_k\) count of case-case k-nearest-neighbour pairs, its expectation \(k n_1(n_1-1)/(n-1)\) and a permutation p-value. LawsonWaller: the focused score statistic \(U = \sum c_i(O_i - E_i)\) with multinomial (conditional) or Poisson variance. FixedCircleScan: Openshaw's GAM (Poisson tail) or the Rushton-Lolonis Monte Carlo test on circles of fixed radii centred on a grid of spacing overlap * r. Regions are 1-based. Identical to the Python arm morie.fn.clusterdetect.

Usage

EllipticScan(
  coords,
  cases,
  pop,
  ex = NULL,
  ubpop = 0.5,
  shape = c(1, 1.5, 2, 3, 4, 5),
  nangle = c(1, 4, 6, 9, 12, 15),
  a = 0.5,
  nsim = 499L,
  alpha = 0.1,
  min_cases = 2,
  seed = 1L
)

FlexZones(coords, w, k = 10)

FlexScan(
  coords,
  cases,
  pop,
  w,
  k = 10,
  ex = NULL,
  kind = "poisson",
  nsim = 499L,
  alpha = 0.1,
  seed = 1L
)

NormalScan(
  coords,
  values,
  pop = NULL,
  ubpop = 0.5,
  direction = "high",
  nsim = 499L,
  seed = 1L
)

CuzickEdwards(coords, case, k = 1, nsim = 999L, seed = 1L)

LawsonWaller(cases, expected, exposure, conditional = TRUE)

FixedCircleScan(
  coords,
  cases,
  pop,
  radii,
  overlap = 0.2,
  method = "gam",
  alpha = 0.002,
  nsim = 99L,
  seed = 1L
)

Arguments

coords

Two-column coordinates.

cases

Case counts (or indicators for CuzickEdwards).

pop

Populations.

ex

Expected counts (default proportional to pop).

ubpop

Maximum population share of a zone.

shape

Ellipse shapes (ratio of axes).

nangle

Number of angles per shape.

a

Eccentricity penalty exponent.

nsim

Monte Carlo replicates.

alpha

Significance level.

min_cases

Minimum cases in a zone.

seed

Philox seed.

w

Adjacency matrix.

k

Number of nearest neighbours.

kind

"poisson" or "binomial".

values

Continuous outcome, one per location.

direction

"high", "low" or "both".

case

Case indicator (1 case, 0 control).

expected

Expected counts.

exposure

Exposure covariate \(c_i\).

conditional

Condition on the total number of cases.

radii

Circle radii.

overlap

Grid spacing as a fraction of the radius.

method

"gam" or "rushton_lolonis".

Value

List.

References

Kulldorff, M., Huang, L., Pickle, L. and Duczmal, L. (2006). An elliptic spatial scan statistic. Statistics in Medicine 25, 3929-3943.

Tango, T. and Takahashi, K. (2005). A flexibly shaped spatial scan statistic for detecting clusters. International Journal of Health Geographics 4, 11.

Kulldorff, M., Huang, L. and Konty, K. (2009). A scan statistic for continuous data based on the normal probability model. International Journal of Health Geographics 8, 58.

Cuzick, J. and Edwards, R. (1990). Spatial clustering for inhomogeneous populations. Journal of the Royal Statistical Society B 52, 73-104.

Waller, L. A., Turnbull, B. W., Clark, L. C. and Nasca, P. (1992). Chronic disease surveillance and testing of clustering of disease and exposure. Environmetrics 3, 281-300.

Openshaw, S., Charlton, M., Wymer, C. and Craft, A. (1987). A Mark 1 Geographical Analysis Machine for the automated analysis of point data sets. International Journal of Geographical Information Systems 1, 335-358.

Rushton, G. and Lolonis, P. (1996). Exploratory spatial analysis of birth defect rates in an urban population. Statistics in Medicine 15, 717-726.

Examples

LawsonWaller(c(4, 2, 1, 1), rep(2, 4), c(1, 0.5, 0.25, 0.25))$U
#> [1] 1.5
P <- cbind(0:4, 0)
W <- 1 * (abs(outer(1:5, 1:5, `-`)) == 1)
FlexScan(P, c(8, 7, 1, 1, 1), rep(10, 5), W, k = 3, nsim = 0)$clusters[[1]]$zone
#> [1] 1 2