The function to apply local Geary statistics

local_geary(
  w,
  df,
  permutations = 999,
  permutation_method = "complete",
  significance_cutoff = 0.05,
  cpu_threads = 6,
  seed = 123456789
)

Arguments

w

An instance of Weight object

df

A data frame with selected variable only. E.g. guerry["Crm_prs"]

permutations

(optional) The number of permutations for the LISA computation

permutation_method

(optional) The permutation method used for the LISA computation. Options are ('complete', 'lookup'). Default is 'complete'.

significance_cutoff

(optional) A cutoff value for significance p-values to filter not-significant clusters

cpu_threads

(optional) The number of cpu threads used for parallel LISA computation

seed

(optional) The seed for random number generator

Value

An instance of LISA-class

Examples

library(sf)
guerry_path <- system.file("extdata", "Guerry.shp", package = "rgeoda")
guerry <- st_read(guerry_path)
#> Reading layer `Guerry' from data source 
#>   `/Users/runner/work/_temp/Library/rgeoda/extdata/Guerry.shp' 
#>   using driver `ESRI Shapefile'
#> Simple feature collection with 85 features and 29 fields
#> Geometry type: MULTIPOLYGON
#> Dimension:     XY
#> Bounding box:  xmin: 47680 ymin: 1703258 xmax: 1031401 ymax: 2677441
#> Projected CRS: NTF (Paris) / Lambert zone II
queen_w <- queen_weights(guerry)
lisa <- local_geary(queen_w, guerry["Crm_prs"])
lms <- lisa_values(lisa)
lms
#>  [1] 0.987725319 0.838345145 0.702801925 0.100402310 0.244977901 1.353310326
#>  [7] 3.623634688 1.536196129 0.861013426 0.725268063 0.571428163 0.001151306
#> [13] 1.912088100 1.140906230 1.007912947 0.303683489 1.214635190 1.920535316
#> [19] 1.610359805 0.446973853 5.156798989 0.919215466 3.107530093 0.230533117
#> [25] 1.349244911 1.067920103 0.418377023 0.208541175 0.788634381 0.248262048
#> [31] 0.364299667 0.136623420 0.708692856 3.108893756 1.981523756 0.922565985
#> [37] 1.044173246 0.332298593 0.940330887 1.904654615 0.936064027 0.628686757
#> [43] 0.390598000 2.689756388 1.278289774 0.793948353 1.683658729 1.301187948
#> [49] 2.342671020 0.832225668 0.296215805 2.268056379 0.876680843 0.414701945
#> [55] 1.979054136 0.561171709 0.378238452 1.849165484 1.207382342 1.157149740
#> [61] 1.848857476 0.155525055 0.642205848 0.749419937 1.283938081 1.470817990
#> [67] 1.263739703 0.964844188 0.338990398 1.924872243 0.659890869 2.135743520
#> [73] 0.710008255 1.424041460 0.706001903 1.774528303 0.242422537 0.694451670
#> [79] 0.001874143 0.055356016 0.428128655 2.024633135 2.497611820 1.048741881
#> [85] 1.026405574