The function to apply bivariate local Moran statistics
local_bimoran(
w,
df,
permutations = 999,
permutation_method = "complete",
significance_cutoff = 0.05,
cpu_threads = 6,
seed = 123456789
)
An instance of Weight object
A data frame with two selected variable. E.g. guerry[c('Crm_prs','Litercy')]
(optional) The number of permutations for the LISA computation
(optional) The permutation method used for the LISA computation. Options are 'complete', 'lookup'. Default is 'complete'.
(optional) A cutoff value for significance p-values to filter not-significant clusters
(optional) The number of cpu threads used for parallel LISA computation
(optional) The seed for random number generator
An instance of LISA-class
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_bimoran(queen_w, guerry[c('Crm_prs','Litercy')])
lms <- lisa_values(lisa)
lms
#> [1] 0.392663448 0.756136106 -0.878510576 -0.199244815 0.002743424
#> [6] 0.576712627 2.817728780 0.773723986 -0.056577742 0.343779070
#> [11] 0.815903467 0.299021035 -0.134732249 0.249750794 -0.469461086
#> [16] 0.064196998 -0.239924063 0.657549123 1.214759133 -1.436363003
#> [21] -3.302026863 -0.144006800 -1.773094173 -0.126845502 -0.467870578
#> [26] 0.029766618 -1.880162375 0.267608761 0.080923262 0.034283662
#> [31] -0.329523889 0.443178656 -0.273284234 -1.741226823 0.096138276
#> [36] -0.021797060 0.642390841 0.002522658 -0.090383051 -0.743775399
#> [41] 0.373595983 0.084599090 0.007510629 1.601252733 -0.243652571
#> [46] 0.880011648 -0.899730263 -0.339928599 -0.811526079 1.167328497
#> [51] -0.390766959 1.298159864 0.973775923 -0.504644610 -1.586580704
#> [56] -0.186951322 0.471913418 0.690564555 0.155109018 0.132228208
#> [61] 0.374974938 -0.013374715 0.028852768 1.366493286 -1.524816551
#> [66] -2.266518385 0.067834623 0.539284687 0.028501681 -0.728115359
#> [71] -0.749706749 -0.132827757 0.285757157 -0.893442637 0.109672584
#> [76] 0.991750143 0.324093451 0.405301333 -0.063852236 0.157603591
#> [81] -0.050301141 0.504772397 0.503896266 -0.252386250 -0.120728027