scan.stat: Spatial scan statistic

Description Usage Arguments Value Author(s) References Examples

View source: R/scan.stat.R

Description

scan.stat calculates the spatial scan statistic for a zone (a set of spatial regions). The statistic is the log of the likelihood ratio test statistic of the chosen distribution. If type = "poisson" and a is more than zero, this statistic is penalized. See references.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
scan.stat(
  yin,
  ein = NULL,
  eout = NULL,
  ty,
  type = "poisson",
  popin = NULL,
  tpop = NULL,
  a = 0,
  shape = 1,
  yout = NULL,
  popout = NULL
)

stat.poisson(yin, yout, ein, eout, a = 0, shape = 1)

stat.binom(yin, yout, ty, popin, popout, tpop)

Arguments

yin

The total number of cases in the zone.

ein

The expected number of cases in the zone. Conventionally, this is the estimated overall disease risk across the study area, multiplied by the total population size of the zone.

eout

The expected number of cases outside the zone. This should be ty - ein and is computed automatically if not provided.

ty

The total number of cases in the study area.

type

The type of scan statistic to implement. The default choice are "poisson". The other choice is "binomial".

popin

The total population in the zone.

tpop

The total population in the study area.

a

A tuning parameter for the adjusted log-likelihood ratio. See details.

shape

The shape of the ellipse, which is the ratio of the length of the longest and shortest axes of the ellipse. The default is 1, meaning it is a circle.

yout

The observed number of cases outside the zone. This should be ty - yin and is computed automatically if not provided.

popout

The population outside the zone. This should be tpop - popin and is computed automatically if not provided.

Value

A vector of scan statistics.

Author(s)

Joshua French

References

Poisson scan statistic: Kulldorff, M. (1997) A spatial scan statistic. Communications in Statistics - Theory and Methods, 26(6): 1481-1496, <doi:10.1080/03610929708831995>

Penalized Poisson scan statistic: Kulldorff, M., Huang, L., Pickle, L. and Duczmal, L. (2006) An elliptic spatial scan statistic. Statistics in Medicine, 25:3929-3943. <doi:10.1002/sim.2490>

Binomial scan statistic: Duczmal, L. and Assuncao, R. (2004) A simulated annealing strategy for the detection of arbitrarily shaped spatial clusters. Computational Statistics & Data Analysis, 45(2):269-286. <doi:10.1016/S0167-9473(02)00302-X>

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
# New York leukemia data
# total cases
ty = 552
# total population
tpop = 1057673

# poisson example with yin = 106 and ein = 62.13
scan.stat(yin = 106, ty = ty, ein = 62.13)
stat.poisson(yin = 106, yout = 552 - 106,
             ein = 62.13, eout = 552 - 62.13)

# binomial example with yin = 41 and popin = 38999
scan.stat(yin = 41, ty = ty,
          popin = 38999, tpop = tpop, type = "binomial")
stat.binom(41, ty - 41, ty, 38999, tpop - 38999, tpop)

Example output

# This research was partially supported under NSF grant 1463642
[1] 14.78206
[1] 14.78206
[1] 8.478361
[1] 8.478361

smerc documentation built on Oct. 1, 2021, 5:07 p.m.