View source: R/global-measures.R
global_jc_perm | R Documentation |
Calculate global join count measure for a categorical variable.
global_jc_perm(
fx,
nb,
wt,
alternative = "greater",
nsim = 499,
allow_zero = FALSE,
...
)
global_jc_test(fx, nb, wt, alternative = "greater", allow_zero = NULL, ...)
tally_jc(fx, nb, wt, allow_zero = TRUE, ...)
fx |
a factor or character vector of the same length as nb. |
nb |
a neighbor list object for example as created by |
wt |
a weights list as created by |
alternative |
default |
nsim |
number of simulations to run. |
allow_zero |
If |
... |
additional arguments passed to methods |
global_jc_perm()
implements the monte-carlo based join count using spdep::joincount.mc()
global_jc_test()
implements the traditional BB join count statistic using spdep::joincount.test()
tally_jc()
calculated join counts for a variable fx
and returns a data.frame using spdep::joincount.multi()
an object of class jclist
which is a list where each element is of class htest
and mc.sim
.
geo <- sf::st_geometry(guerry)
nb <- st_contiguity(geo)
wt <- st_weights(nb, style = "B")
fx <- guerry$region
global_jc_perm(fx, nb, wt)
global_jc_test(fx, nb, wt)
tally_jc(fx, nb, wt)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.