tango.stat | R Documentation |
tango.stat
computes Tango's index (Tango, 1995),
including both the goodness-of-fit and spatial
autocorrelation components. See Waller and Gotway
(2005).
tango.stat(cases, pop, w)
cases |
The number of cases observed in each region. |
pop |
The population size associated with each region. |
w |
An |
Returns a list with the test statistic
(tstat
), the goodness-of-fit component
(gof
), and the spatial autocorrelation component
(sa
).
Joshua French
Tango, T. (1995) A class of tests for detecting "general" and "focused" clustering of rare diseases. Statistics in Medicine. 14:2323-2334.
Waller, L.A. and Gotway, C.A. (2005). Applied Spatial Statistics for Public Health Data. Hoboken, NJ: Wiley.
data(nydf)
coords <- as.matrix(nydf[, c("longitude", "latitude")])
w <- dweights(coords, kappa = 1, type = "tango", longlat = TRUE)
tango.stat(nydf$cases, nydf$pop, w)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.