> For the complete documentation index, see [llms.txt](https://xunli.gitbook.io/jsgeoda/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://xunli.gitbook.io/jsgeoda/local-spatial-autocorrelation-multivariate/bivariate-local-join-count.md).

# Bivariate Local Join Count

Bivariate or no-colocation local join count ([2019](https://geodacenter.github.io/workbook/6d_local_discrete/lab6d.html#ref-AnselinLi:18)) only works when two events cannot happen in the same location (e.g., a zoning classification, or a case-control design). It can be used to identify *negative* spatial autocorrelation, i.e., evidence of spatial outliers. For more information, please read [http://geodacenter.github.io/workbook/6a\_local\_auto/lab6a.html](https://geodacenter.github.io/workbook/6d_local_discrete/lab6d.html#bivariate-local-join-count-statistic)

## localBiJoinCount()

```sql
function localBiJoinCount(
    WeightResult w,
    Array val1,
    Array val2,
    Number permutations, 
    String permutation_method,
    NUmber significance_cutoff, 
    Number seed)
```

### Arguments

| Name                 | Type           | Description                                                                                                |
| -------------------- | -------------- | ---------------------------------------------------------------------------------------------------------- |
| w                    | *WeightResult* | the WeightResult object created from weights function                                                      |
| val1                 | Array          | the first numeric variable that contains the values for LISA statistics                                    |
| val1                 | Array          | the second numeric variable that contains the values 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/6lisamultivariate-4w3hk>" %}
