Skip to contents

R parity of morie.mrm_kulldorff.mrm_tps_kulldorff_scan(). Implements Kulldorff's 1997 Poisson log-likelihood-ratio space-time scan with a Monte-Carlo permutation test for significance.

Value

mrm_tps_kulldorff_scan() returns a named list with the most likely cluster, its Poisson log-likelihood-ratio statistic, the Monte-Carlo permutation p-value, and a plain-language interpretation.

Details

The scan iterates over (centre, radius, time-window) tuples, computing the Poisson LRT against \(H_0\) (events uniformly distributed in space and time). The maximum LRT is the test statistic; permutations of event timestamps generate the null.

References

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

Examples

if (FALSE) {
  tps <- morie_sample("tps_assault")
  mrm_tps_kulldorff_scan(tps, n_permutations = 49)
}