tango.test | R Documentation |
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)
cases |
The number of cases observed in each region. |
pop |
The population size associated with each region. |
w |
An |
nsim |
The number of simulations for which to
perform a Monto Carlo test of significance. Counts are
simulated according to a multinomial distribution with
|
The dweights
function can be used to
construct a weights matrix w
using the method of
Tango (1995), Rogerson (1999), or a basic style.
Returns a list of class tango
with
elements:
tstat |
Tango's index |
tstat.chisq |
The approximately chi-squared
statistic proposed by Tango that is derived from
|
dfc |
The degrees of freedom of
|
pvalue.chisq |
The p-value
associated with |
tstat.sim |
The vector of test statistics from the
simulated data if |
pvalue.sim |
The p-value associated with the Monte
Carlo test of significance when |
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).
Joshua French
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.