tango.test
performs a test for clustering proposed
by Tango (1995). The test uses Tango's chi-square
approximation for significance testing by default, but
also uses Monto Carlo simulation when nsim > 0
.
tango.test(cases, pop, w, nsim = 0)
Returns a list of class tango
with
elements:
Tango's index
The approximately chi-squared
statistic proposed by Tango that is derived from
tstat
The degrees of freedom of
tstat.chisq
The p-value
associated with tstat.chisq
The vector of test statistics from the
simulated data if nsim > 0
The p-value associated with the Monte
Carlo test of significance when nsim > 0
Additionally, the goodness-of-fit gof
and
spatial autocorrelation sa
components of the
Tango's index are provided (and for the simulated data
sets also, if appropriate).
The number of cases observed in each region.
The population size associated with each region.
An \(n \times n\) weights matrix.
The number of simulations for which to
perform a Monto Carlo test of significance. Counts are
simulated according to a multinomial distribution with
sum(cases)
total cases and class probabilities
pop/sum(pop)
. sum(cases)
.
Joshua French
The dweights
function can be used to
construct a weights matrix w
using the method of
Tango (1995), Rogerson (1999), or a basic style.
Tango, T. (1995) A class of tests for detecting "general" and "focused" clustering of rare diseases. Statistics in Medicine. 14, 2323-2334.
Rogerson, P. (1999) The Detection of Clusters Using A Spatial Version of the Chi-Square Goodness-of-fit Test. Geographical Analysis. 31, 130-147
Tango, T. (2010) Statistical Methods for Disease Clustering. Springer.
Waller, L.A. and Gotway, C.A. (2005). Applied Spatial Statistics for Public Health Data. Hoboken, NJ: Wiley.
dweights
data(nydf)
coords <- as.matrix(nydf[, c("x", "y")])
w <- dweights(coords, kappa = 1)
results <- tango.test(nydf$cases, nydf$pop, w, nsim = 49)
Run the code above in your browser using DataLab