morancr.test | R Documentation |
morancr.test
performs a test of clustering using the constant-risk
version of the Moran's I statistic proposed by Walter (1992) under the
constant risk hypothesis.
morancr.test(
cases,
pop,
w,
ex = sum(cases)/sum(pop) * pop,
nsim = 499,
alternative = "greater"
)
cases |
The number of cases observed in each region. |
pop |
The population size associated with each region. |
w |
A binary spatial adjacency matrix for the regions. |
ex |
The expected number of cases for each region. The default is calculated under the constant risk hypothesis. |
nsim |
The number of simulations from which to compute the p-value. |
alternative |
a character string specifying the alternative hypothesis, must be one of "greater" (default), "two.sided", or "less". You can specify just the initial letter. |
Returns a smerc_similarity_test
.
Joshua French
Walter, S. D. (1992). The analysis of regional patterns in health data: I. Distributional considerations. American Journal of Epidemiology, 136(6), 730-741.
morancr.stat
data(nydf)
data(nyw)
morancr.test(cases = nydf$cases, pop = nydf$pop, w = nyw, nsim = 9)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.