Spatial Scan Test
spscan.test
performs the spatial scan test of
Kulldorf (1997) for case/control point data.
spscan.test( x, case = 2, nsim = 499, alpha = 0.1, maxd = NULL, cl = NULL, longlat = FALSE )
x |
A |
case |
The position of the name of the "case" group
in |
nsim |
The number of simulations from which to compute the p-value. A non-negative integer. Default is 499. |
alpha |
The significance level to determine whether a cluster is signficiant. Default is 0.1. |
maxd |
The radius of the largest possible cluster to
consider. Default is |
cl |
A cluster object created by |
longlat |
A logical value indicating whether
Euclidean distance ( |
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 cluster is returned (along with a warning).
Setting cl
to a positive integer MAY speed up
computations on non-Windows computers. However,
parallelization does have overhead cost, and there are
cases where parallelization results in slower
computations.
Returns a list of length two of class
scan
. The first element (clusters) is a list
containing the significant, non-ovlappering clusters,
and has the the following components:
coords |
The centroid of the significant clusters. |
r |
The radius of the window of the clusters. |
pop |
The total population in the cluser window. |
cases |
The observed number of cases in the cluster window. |
expected |
The expected number of cases in the cluster window. |
smr |
Standarized mortaility ratio (observed/expected) in the cluster window. |
rr |
Relative risk in the cluster window. |
propcases |
Proportion of cases in the cluster window. |
loglikrat |
The loglikelihood ratio for the cluster window (i.e., the log of the test statistic). |
pvalue |
The pvalue of the test statistic associated with the cluster window. |
The second element of the list is the centroid coordinates. This is needed for plotting purposes.
Joshua French
Kulldorff M., Nagarwalla N. (1995) Spatial disease clusters: Detection and Inference. Statistics in Medicine 14, 799-810.
Kulldorff, M. (1997) A spatial scan statistic. Communications in Statistics – Theory and Methods 26, 1481-1496.
Waller, L.A. and Gotway, C.A. (2005). Applied Spatial Statistics for Public Health Data. Hoboken, NJ: Wiley.
data(grave) out = spscan.test(grave, nsim = 99) plot(out, chars = c(1, 20), main = "most likely cluster") # get warning if no significant cluster out2 = spscan.test(grave, alpha = 0.001, nsim = 99)
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.