cepp.weights | R Documentation |
cepp.test
Compute region weights for cepp.test
cepp.weights(nn, pop, nstar)
nn |
A list of nearest neighbors produced by
|
pop |
The population size associated with each region. |
nstar |
The size of the at-risk population in each window. |
A list with elements related to the weight each nearest neighbor region will have in the corresponding weighted sum used to compute the test statistic
data(nydf)
coords <- with(nydf, cbind(x, y))
pop <- nydf$pop
# intercentroid distances
d <- gedist(coords)
# find smallest windows with cumulative population of
# at least n* = 1000
nn <- casewin(d, pop, 1000)
# compute weights
w <- cepp.weights(nn, pop, 1000)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.