Learn R Programming

rgeoda (version 0.1.0)

local_quantilelisa: Quantile LISA Statistics

Description

The function to apply quantile LISA statistics

Usage

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

Value

An instance of LISA-class

Arguments

w

An instance of Weight object

df

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

k

A value indicates the number of quantiles. Value range e.g. [1, 10]

q

A value indicates which quantile or interval used in local join count statistics. Value stars from 1.

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

Examples

Run this code
library(sf)
guerry_path <- system.file("extdata", "Guerry.shp", package = "rgeoda")
guerry <- st_read(guerry_path)
queen_w <- queen_weights(guerry)
lisa <- local_quantilelisa(queen_w, guerry["Crm_prs"], k=4, q=1)
clsts <- lisa_clusters(lisa)
clsts

Run the code above in your browser using DataLab