tango.test: Tango's clustering detection test

View source: R/tango.test.R

tango.testR Documentation

Tango's clustering detection test

Description

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.

Usage

tango.test(cases, pop, w, nsim = 0)

Arguments

cases

The number of cases observed in each region.

pop

The population size associated with each region.

w

An n \times n weights matrix.

nsim

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) .

Details

The dweights function can be used to construct a weights matrix w using the method of Tango (1995), Rogerson (1999), or a basic style.

Value

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 tstat

dfc

The degrees of freedom of tstat.chisq

pvalue.chisq

The p-value associated with tstat.chisq

tstat.sim

The vector of test statistics from the simulated data if nsim > 0

pvalue.sim

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).

Author(s)

Joshua French

References

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.

See Also

dweights

Examples

data(nydf)
coords <- as.matrix(nydf[, c("x", "y")])
w <- dweights(coords, kappa = 1)
results <- tango.test(nydf$cases, nydf$pop, w, nsim = 49)

jfrench/smerc documentation built on Oct. 27, 2024, 5:13 p.m.