powered by
Calculate the local Geary statistic for a given variable.
local_g(x, nb, wt, alternative = "two.sided", ...)local_g_perm(x, nb, wt, nsim = 499, alternative = "two.sided", ...)
local_g_perm(x, nb, wt, nsim = 499, alternative = "two.sided", ...)
a data.frame with columns:
data.frame
gi: the observed statistic
gi
cluster: factor variable with two levels classification high or low
cluster
e_gi: the permutation sample mean
e_gi
var_gi: the permutation sample variance
var_gi
std_dev: standard deviation of the Gi statistic
std_dev
p_value: the p-value using sample mean and standard deviation
p_value
p_folded_sim: p-value based on the implementation of Pysal which always assumes a two-sided test taking the minimum possible p-value
p_folded_sim
skewness: sample skewness
skewness
kurtosis: sample kurtosis
kurtosis
A numeric vector.
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"
methods passed to spdep::localG() or spdep::localG_perm()
spdep::localG()
spdep::localG_perm()
The number of simulations to run.
x <- guerry$crime_pers nb <- st_contiguity(guerry) wt <- st_weights(nb) res <- local_g_perm(x, nb, wt) head(res)
Run the code above in your browser using DataLab