3.5 Quantile LISA

Quantile LISA (2019) is quantile local spatial autocorrelation that applies local join count statistics to quantiles of a continuous variable by converting the continuous variable to a binary variable that takes the value of 1 for a specific quantile. For more information, please read https://geodacenter.github.io/workbook/6d_local_discrete/lab6d.html#quantile-lisa

quantile_lisa()

quantile_lisa() is a PostgreSQL WINDOW function. Please call it with an OVER clause.

Synopsis

Short version:

float[] quantile_lisa(integer k, integer q, numeric val,  bytea weights)

Full version:

float[] quantile_lisa(integer k, integer q, numeric val,  bytea weights,
    integer permutations, 
    character varying permutation_method,
    float significance_cutoff, 
    integer cpu_threads, 
    integer seed)

Arguments

Name

Type

Description

k

integer

the number of quantiles

q

integer

the index of which quantile is used in local join count statistics

val

numeric

the numeric column that contains the values for LISA statistics

weights

bytea

the bytea column that stores the spatial weights information

permutations

integer

the number of permutations for the LISA computation. Default: 999.

permutation_method

character varying

the permutation method used for the LISA computation. Options are 'complete', 'lookup'. Default: 'lookup'.

significance_cutoff

float

the cutoff value for significance p-values to filter not-significant clusters. Default: 0.05.

cpu_threads

integer

the number of CPU threads used for parallel LISA computation. Default: 6.

seed

integer

the seed for random number generator used in LISA statistics. Default: 123456789.

Return

Type

Description

float[]

an array contains 3 values, which are {'local join count', 'pseudo-p value', 'number of neighbors'}

The results of local join count do NOT have 'category indicator'.

Examples

Apply quantile lisa statistics on the variable "hr60" (homicide rate 1960), the 1st quantile of 10 quantiles, using queen contiguity weights "queen_w":

SELECT quantile_lisa(10, 1, hr60, queen_w) OVER() FROM natregimes;

 local_quantilelisa 
--------------------
 {0,-1,3}
 {0,-1,3}
 {0,-1,4}
 {0,-1,7}
 {0,-1,4}
 {0,-1,3}
 {0,-1,4}
 {0,-1,9}
 {1,0.492,3}
 {0,-1,3}
 ...

Last updated