The function to apply Getis-Ord's local G* statistics
local_gstar(
w,
df,
permutations = 999,
permutation_method = "complete",
significance_cutoff = 0.05,
cpu_threads = 6,
seed = 123456789
)
An instance of LISA-class
An instance of Weight object
A data frame with selected variable only. E.g. guerry["Crm_prs"]
(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
library(sf)
guerry_path <- system.file("extdata", "Guerry.shp", package = "rgeoda")
guerry <- st_read(guerry_path)
queen_w <- queen_weights(guerry)
lisa <- local_gstar(queen_w, guerry["Crm_prs"])
lms <- lisa_values(lisa)
lms
Run the code above in your browser using DataLab