# Quantile LISA

Quantile LISA ([2019](https://geodacenter.github.io/workbook/6d_local_discrete/lab6d.html#ref-Anselin:19b)) 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>

## quantileLisa()

```sql
function quantileLisa(
    WeightResult w,
    Number k,
    Number quantile,
    Array val,
    Number permutations, 
    String permutation_method,
    NUmber significance_cutoff, 
    Number seed)
```

### Arguments

| Name                 | Type           | Description                                                                                                |
| -------------------- | -------------- | ---------------------------------------------------------------------------------------------------------- |
| w                    | *WeightResult* | the WeightResult object created from weights function                                                      |
| k                    | Number         | the total number of quantiles                                                                              |
| quantile             | Number         | the index of which quantile is used in local join count statistics                                         |
| val                  | Array          | the numeric column that contains the binary values (e.g. 0 and 1) for LISA statistics                      |
| permutations         | Number         | the number of permutations for the LISA computation. Default: 999.                                         |
| permutation\_method  | String         | the permutation method used for the LISA computation. Options are 'complete', 'lookup'. Default: 'lookup'. |
| significance\_cutoff | Number         | the cutoff value for significance p-values to filter not-significant clusters. Default: 0.05.              |
| seed                 | Number         | the seed for random number generator used in LISA statistics. Default: 123456789.                          |

### Return

| Type       | Description                                                                                                                  |
| ---------- | ---------------------------------------------------------------------------------------------------------------------------- |
| LisaResult | The LisaResult object contains the results of LISA computation: *pvalues, clusters, lisa\_values, neighbors, labels, colors* |

**Try it yourself in the playground (jsgeoda + deck.gl):**

{% embed url="<https://codesandbox.io/s/5lisaunivariate-zhhop>" %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://xunli.gitbook.io/jsgeoda/local-spatial-autocorrelation/quantile-lisa.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
