spscan.test {smacpod} | R Documentation |
Spatial Scan Test
Description
spscan.test
performs the spatial scan test of Kulldorf (1997) for
case/control point data.
Usage
spscan.test(
x,
case = 2,
nsim = 499,
alpha = 0.1,
maxd = NULL,
cl = NULL,
longlat = FALSE
)
Arguments
x |
A |
case |
The name of the desired "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 signficant. 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 ( |
Details
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.
Value
Returns a list of length two of class
scan
. The first element (clusters) is a list
containing the significant, non-overlapping 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. |
Various additional pieces of information are included for plotting, printing
Author(s)
Joshua French
References
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.
Examples
data(grave)
# apply scan method
out = spscan.test(grave, case = "affected", nsim = 99)
# print scan object
out
print(out, extra = TRUE)
# summarize results
summary(out)
# plot results
plot(out, chars = c(1, 20), main = "most likely cluster")
# extract clusters from out
# each element of the list gives the location index of the events in each cluster
clusters(out)
# get warning if no significant cluster
out2 = spscan.test(grave, case = 2, alpha = 0.001, nsim = 99)