local_g | R Documentation |
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", ...)
x |
A numeric vector. |
nb |
a neighbor list object for example as created by |
wt |
a weights list as created by |
alternative |
default |
... |
methods passed to |
nsim |
The number of simulations to run. |
a data.frame
with columns:
gi
: the observed statistic
cluster
: factor variable with two levels classification high or low
e_gi
: the permutation sample mean
var_gi
: the permutation sample variance
std_dev
: standard deviation of the Gi statistic
p_value
: the p-value using sample mean and standard deviation
p_folded_sim
: p-value based on the implementation of Pysal which always assumes a two-sided test taking the minimum possible p-value
skewness
: sample skewness
kurtosis
: sample kurtosis
x <- guerry$crime_pers
nb <- st_contiguity(guerry)
wt <- st_weights(nb)
res <- local_g_perm(x, nb, wt)
head(res)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.