morancr.sim | R Documentation |
morancr.stat
computes the constant-risk version of the Moran's I
statistic proposed by Walter (1992).
morancr.sim(nsim = 1, cases, w, ex)
nsim |
The number of simulations from which to compute the p-value. |
cases |
The number of cases observed in 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. |
Returns a numeric value.
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.test
data(nydf)
data(nyw)
ex <- sum(nydf$cases) / sum(nydf$pop) * nydf$pop
morancr.sim(nsim = 10, cases = nydf$cases, w = nyw, ex = ex)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.