
The function to apply local Moran statistics
local_moran(
w,
data,
permutations = 999,
significance_cutoff = 0.05,
cpu_threads = 6,
seed = 123456789
)
An instance of Weight object
A numeric array of selected variable
The number of permutations for the LISA computation
A cutoff value for significance p-values to filter not-significant clusters
The number of cpu threads used for parallel LISA computation
The seed for random number generator
An instance of LISA-class
# NOT RUN {
guerry_path <- system.file("extdata", "Guerry.shp", package = "rgeoda")
guerry <- geoda_open(guerry_path)
queen_w <- queen_weights(guerry)
guerry_df <- as.data.frame(guerry) # use as data.frame
crm_prs <- guerry_df['Crm_prs'][,1] # get values of variable "crm_prs"
lisa <- local_moran(queen_w, crm_prs)
lms <- lisa_values(gda_lisa = lisa)
lms
# }
Run the code above in your browser using DataLab