powered by
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, ...)
global_jc_test(fx, nb, wt, alternative = "greater", allow_zero = NULL, ...)
tally_jc(fx, nb, wt, allow_zero = TRUE, ...)
an object of class jclist which is a list where each element is of class htest and mc.sim.
jclist
htest
mc.sim
a factor or character vector of the same length as nb.
a neighbor list object for example as created by st_contiguity().
st_contiguity()
a weights list as created by st_weights().
st_weights()
default "two.sided". Should be one of "greater", "less", or "two.sided" to specify the alternative hypothesis.
"two.sided"
"greater"
"less"
number of simulations to run.
If TRUE, assigns zero as lagged value to zone without neighbors.
TRUE
additional arguments passed to methods
global_jc_perm() implements the monte-carlo based join count using spdep::joincount.mc()
global_jc_perm()
spdep::joincount.mc()
global_jc_test() implements the traditional BB join count statistic using spdep::joincount.test()
global_jc_test()
spdep::joincount.test()
tally_jc() calculated join counts for a variable fx and returns a data.frame using spdep::joincount.multi()
tally_jc()
fx
spdep::joincount.multi()
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)
Run the code above in your browser using DataLab