Skip to contents

Compute Geary's C

Usage

global_c(x, nb, wt, allow_zero = NULL)

Arguments

x

A numeric vector.

nb

a neighbor list object for example as created by st_contiguity().

wt

a weights list as created by st_weights().

allow_zero

If TRUE, assigns zero as lagged value to zone without neighbors.

Value

a list with two names elements C and K returning the value of Geary's C and sample kurtosis respectively.

See also

Other global_c: global_c_perm(), global_c_test()

Examples

nb <- guerry_nb$nb
wt <- guerry_nb$wt
x <- guerry_nb$crime_pers
global_c(x, nb, wt)
#> $C
#> [1] 0.5645907
#> 
#> $K
#> [1] 2.400641
#>