<table><tr><td>Relative clustering index (linear version)</td><td>RCL<sub>k1,k2</sub> = 1 - <sup>Pxx<sup>k1</sup></sup>&frasl;<sub>pxx<sup>k2</sup></sub> with f(d<sub>ij</sub>) = d<sub>ij</sub></td><td>RCL(x, d, fdist = "l", distin, distout, diagval, spatobj, folder, shape)</td></tr><tr><td colspan="3"><strong>Concentration</strong></td></tr><tr><td>Delta</td><td>Δ<sup>k</sup> = <sup>1</sup>&frasl;<sub>2</sub> &sum;<sub>i=1</sub><sup>n</sup> <sup>x<sub>i</sub><sup>k</sup></sup>&frasl;<sub>X<sub>i</sub><sup>k</sup></sub> - <sup>A<sub>i</sub></sup>&frasl;<sub>A</sub></td><td>Delta(x, a, spatobj, folder, shape)</td></tr><tr><td>Absolute concentration index</td><td>ACO<sup>k</sup> = 1 - <sup>&sum;<sub>i=1</sub><sup>n</sup> (x<sub>i</sub><sup>k</sup>A<sub>i</sub>/X<sup>k</sup>) - <sup>&sum;<sub>i=1</sub><sup>n</sup> (t<sub>i</sub>A<sub>i</sub>/T<sub>i</sub><sup>k</sup>)</sup>&frasl;<sub>&sum;<sub>i=n<sub>k</sub></sub><sup>n</sup> (t<sub>i</sub>A<sub>i</sub>/T<sub>i</sub><sup>k</sup>)</sub></td><td>ACO(x, a, spatobj, folder, shape)</td></tr><tr><td>Relative concentration index</td><td>RCO<sub>k1,k2</sub> = <sup>&sum;<sub>i=1</sub><sup>n<sub>k1</sub></sup> (x<sub>i</sub><sup>k1</sup>A<sub>i</sub>/X<sup>k1</sup>) / <sup>&sum;<sub>i=1</sub><sup>n</sup> (x<sub>i</sub><sup>k2</sup>A<sub>i</sub>/X<sup>k2</sup>)</sup>&frasl;<sub>&sum;<sub>i=n<sub>k2</sub></sub><sup>n</sup> (t<sub>i</sub>A<sub>i</sub>/T<sub>i</sub><sup>k2</sup>)</sub></td><td>RCO(x, a, spatobj, folder, shape)</td></tr><tr><td colspan="3"><strong>Centralization</strong></td></tr><tr><td>Relative centralization</td><td>RCE<sub>k1,k2</sub> = (<sup>&sum;<sub>i=2</sub><sup>˜n</sup></sup>&frasl;<sub>X<sub>i-1</sub><sup>k1</sup></sub> ˜X<sub>i-1</sub><sup>k2</sup>) - (<sup>&sum;<sub>i=2</sub><sup>˜n</sup></sup>&frasl;<sub>X<sub>i</sub><sup>k1</sup></sub> ˜X<sub>i-1</sub><sup>k2</sup>)</td><td>RCE(x, dc, center, spatobj, folder, shape)</td></tr><tr><td>Duncan's absolute centralization</td><td>DCE<sup>k</sup> = RCE<sup>k,-k</sup> = RCE<sup>k,Total</sup> / (1 - P<sup>k</sup>) = (<sup>&sum;<sub>i=2</sub><sup>˜n</sup></sup>&frasl;<sub>X<sub>i-1</sub><sup>k</sup></sub> ˜X<sub>i-1</sub><sup>k</sup>) - (<sup>&sum;<sub>i=2</sub><sup>˜n</sup></sup>&frasl;<sub>(1-P<sup>k</sup>)</sub> ˜X<sub>i-1</sub><sup>k</sup>)</td><td>RCEPoly(x,...)<br>ACEDuncan(x, dc, center, spatobj, folder, shape)<br>ACEDuncanPoly(x,...)<br>ACEDuncanPolyK(x, K, kdist, ...)<br>ACE(x, a, dc, center, spatobj, folder, shape)</td></tr><tr><td>Massey's absolute centralization</td><td>ACE<sup>k</sup> = (<sup>&sum;<sub>i=2</sub><sup>n</sup></sup>&frasl;<sub>X<sub>i-1</sub><sup>k</sup></sub> A<sub>i</sub>) - (<sup>&sum;<sub>i=2</sub><sup>n</sup></sup>&frasl;<sub>X<sub>i</sub><sup>k</sup></sub> A<sub>i-1</sub>)</td><td>ACEPoly(x, a,...)</td></tr><tr><td colspan="3"><strong>Multi-group indices</strong></td></tr><tr><td>Multi-group dissimilarity</td><td>D* = <sup>1</sup>&frasl;<sub>2T<sub>S</sub></sub> &sum;<sub>k=1</sub><sup>K</sup> &sum;<sub>i=1</sub><sup>n</sup> (<sup>t<sub>i</sub></sup>&frasl;<sub>i</sub> | <sup>p<sub>i</sub><sup>k</sup></sup>&frasl;<sub>p<sub>i</sub></sub> - P<sup>k</sup>)</td><td>DMulti(x)</td></tr><tr><td>Multi-group Gini</td><td>G* = <sup>1</sup>&frasl;<sub>2T<sub>S</sub><sup>2</sup></sub> &sum;<sub>k=1</sub><sup>K</sup> &sum;<sub>i=1</sub><sup>n</sup> &sum;<sub>j=1</sub><sup>n</sup> (<sup>t<sub>i</sub>t<sub>j</sub></sup>&frasl;<sub>p<sub>i</sub><sup>k</sup> - p<sub>j</sub><sup>k</sup></sub>)</td><td>GiniMulti(x)</td></tr><tr><td>Multi-group normalized exposure</td><td>P* = <sup>1</sup>&frasl;<sub>1</sub> &sum;<sub>k=1</sub><sup>K</sup> &sum;<sub>i=1</sub><sup>n</sup> <sup>t<sub>i</sub>(p<sub>i</sub><sup>k</sup> - P<sup>k</sup>)</sup>&frasl;<sub>1 - P<sup>k</sup></sub></td><td>PMulti(x)</td></tr><tr><td>Multi-group information theory</td><td>H* = <sup>1</sup>&frasl;<sub>TE</sub> &sum;<sub>k=1</sub><sup>K</sup> &sum;<sub>i=1</sub><sup>n</sup> t<sub>i</sub>p<sub>i</sub><sup>k</sup> ln (<sup>p<sub>i</sub><sup>k</sup></sup>&frasl;<sub>p<sub>k</sub><sup>k</sup></sub>)</td><td>HMulti(x)</td></tr><tr><td colspan="3">with E = &sum;<sub>k=1</sub><sup>K</sup> P<sup>k</sup> ln (<sup>1</sup>&frasl;<sub>p<sub>k</sub><sup>k</sup></sub>)</td></tr></table>
<table><tbody><tr><td>Relative clustering index<br>(linear version)</td><td>RCL<sub>k1,k2</sub> = 1 - <sup>Pxx<sup>k1</sup></sup>&frasl;<sub>xx<sup>k2</sup></sub> with f(d<sub>ij</sub>) = d<sub>ij</sub></td><td>RCL(x, d, fdist = "l",<br>distin, distout, diagval,<br>spatobj, folder, shape)</td></tr><tr><td colspan="3"><strong>Concentration</strong></td></tr><tr><td>Delta</td><td>Δ<sup>k</sup> = <sup>1</sup>&frasl;<sub>2</sub> &sum;<sub>i=1</sub><sup>n</sup> <sup>x<sub>i</sub><sup>k</sup></sup>&frasl;<sub>X<sub>i</sub><sup>k</sup></sub> - <sup>A<sub>i</sub></sup>&frasl;<sub>A</sub></td><td>Delta(x, a, spatobj, folder,<br>shape)</td></tr><tr><td>Absolute concentration index</td><td>ACO<sup>k</sup> = 1 - <sup>&sum;<sub>i=1</sub><sup>n</sup> (x<sub>i</sub><sup>k</sup>A<sub>i</sub>/X<sup>k</sup>) - <sup>&sum;<sub>i=1</sub><sup>n</sup> (t<sub>i</sub>A<sub>i</sub>/T<sub>1</sub><sup>k</sup>)</sup>&frasl;<sub>&sum;<sub>i=n<sub>k</sub></sub><sup>n</sup> (t<sub>i</sub>A<sub>i</sub>/T<sub>2</sub><sup>k</sup>)</sub> - <sup>&sum;<sub>i=1</sub><sup>n</sup> (t<sub>i</sub>A<sub>i</sub>/T<sub>1</sub><sup>k</sup>)</sup>&frasl;<sub>&sum;<sub>i=1</sub><sup>n</sup> (x<sub>i</sub><sup>k</sup>A<sub>i</sub>/X<sup>k</sup>)</sub></td><td>ACO(x, a, spatobj, folder, shape)</td></tr><tr><td>Relative concentration index</td><td>RCO<sub>k1,k2</sub> = <sup>&sum;<sub>i=1</sub><sup>n<sub>k1</sub></sup> (t<sub>i</sub>A<sub>i</sub>/T<sub>1</sub><sup>k1</sup>) / &sum;<sub>i=n<sub>k2</sub></sub><sup>n</sup> (t<sub>i</sub>A<sub>i</sub>/T<sub>2</sub><sup>k2</sup>)</sup>&frasl;<sub>&sum;<sub>i=1</sub><sup>n<sub>k1</sub></sup> (t<sub>i</sub>A<sub>i</sub>/T<sub>1</sub><sup>k1</sup>) / &sum;<sub>i=n<sub>k2</sub></sub><sup>n</sup> (x<sub>i</sub><sup>k2</sup>A<sub>i</sub>/X<sup>k2</sup>)</sub></td><td>RCO(x, a, spatobj, folder, shape)</td></tr><tr><td colspan="3"><strong>Centralization</strong></td></tr><tr><td>Relative centralization</td><td>RCE<sub>k1,k2</sub> = (<sup>&sum;<sub>i=2</sub><sup>˜n</sup></sup>&frasl;<sub>X<sub>i-1</sub><sup>k1</sup></sub> ˜X<sub>i-1</sub><sup>k2</sup>) - (<sup>&sum;<sub>i=2</sub><sup>˜n</sup></sup>&frasl;<sub>X<sub>i</sub><sup>k1</sup></sub> ˜X<sub>i-1</sub><sup>k2</sup>)</td><td>RCE(x, dc, center,<br>spatobj, folder, shape)</td></tr><tr><td>Duncan's absolute centralization</td><td>DCE<sup>k</sup> = RCE<sup>k,-k</sup> = RCE<sup>k,Total</sup> / (1 - P<sup>k</sup>) = <sup>(&sum;<sub>i=2</sub><sup>˜n</sup> ˜X<sub>i-1</sub><sup>k</sup> ˜t<sub>i</sub>) - (<sup>&sum;<sub>i=2</sub><sup>˜n</sup></sup>&frasl;<sub>X<sub>i</sub><sup>k</sup> ˜t<sub>i-1</sub></sub>)</sup>&frasl;<sub>(1 - P<sup>k</sup>)</sub></td><td>RCEPoly(x,...)<br>RCEPolyK(x, K, kdist, ...)<br>ACEDuncan(x, dc, center,<br>spatobj, folder, shape)</td></tr><tr><td>Massey's absolute centralization</td><td>ACE<sup>k</sup> = (<sup>&sum;<sub>i=2</sub><sup>n</sup></sup>&frasl;<sub>X<sub>i-1</sub><sup>k</sup></sub> A<sub>i</sub>) - (<sup>&sum;<sub>i=2</sub><sup>n</sup></sup>&frasl;<sub>X<sub>i</sub><sup>k</sup></sub> A<sub>i-1</sub>)</td><td>ACEDuncanPoly(x,...)<br>ACEDuncanPolyK(x, K, kdist, ...)<br>ACE(x, a, dc, center,<br>spatobj, folder, shape)</td></tr><tr><td colspan="3"><strong>Multi-group indices</strong></td></tr><tr><td>Multi-group dissimilarity</td><td>D* = <sup>1</sup>&frasl;<sub>2T<sub>1</sub>T<sub>2</sub></sub> &sum;<sub>k=1</sub><sup>K</sup> &sum;<sub>i=1</sub><sup>n</sup> (<sup>t<sub>i</sub></sup>&frasl;<sub>i</sub> | <sup>p<sub>i</sub><sup>k</sup></sup>&frasl;<sub>p<sub>i</sub></sub> - P<sup>k</sup>)</td><td>DMulti(x)</td></tr><tr><td>Multi-group Gini</td><td>G* = <sup>1</sup>&frasl;<sub>2T<sub>2</sub>T<sub>3</sub></sub> &sum;<sub>k=1</sub><sup>K</sup> &sum;<sub>i=1</sub><sup>n</sup> &sum;<sub>j=1</sub><sup>n</sup> (<sup>t<sub>i</sub>t<sub>j</sub></sup>&frasl;<sub>p<sub>i</sub><sup>k</sup> - p<sub>j</sub><sup>k</sup></sub>)</td><td>GiniMulti(x)</td></tr><tr><td>Multi-group normalized exposure</td><td>P* = <sup>1</sup>&frasl;<sub>1</sub> &sum;<sub>k=1</sub><sup>K</sup> &sum;<sub>i=1</sub><sup>n</sup> <sup>t<sub>i</sub>(p<sub>i</sub><sup>k</sup> - P<sup>k</sup>)</sup>&frasl;<sub>1 - p<sup>k</sup></sub></td><td>PMulti(x)</td></tr><tr><td>Multi-group information theory</td><td>H* = <sup>1</sup>&frasl;<sub>TE</sub> &sum;<sub>k=1</sub><sup>K</sup> &sum;<sub>i=1</sub><sup>n</sup> t<sub>i</sub>p<sub>i</sub><sup>k</sup> ln(<sup>p<sub>i</sub><sup>k</sup></sup>&frasl;<sub>p<sub>i</sub><sup>k</sup></sub>)</td><td>HMulti(x)</td></tr><tr><td colspan="3">with E = &sum;<sub>k=1</sub><sup>K</sup> P<sup>k</sup> ln(<sup>1</sup>&frasl;<sub>p<sup>k</sup></sub>)</td></tr></tbody></table>
Multi-group relative diversity

Squared coefficient of variation

Spatial multi-group dissimilarity

See Reardon and O'Sullivan (2004) for details

Spatial multi-group relative diversity

See Reardon and O'Sullivan (2004) for details

Spatial multi-group information theory

See Reardon and O'Sullivan (2004) for details

Ordinal segregation indices

$\Lambda_1$ - ordinal information theory index

$\Lambda_2$ - ordinal variation ratio index

$\Lambda_3$ - ordinal square root index

$\Lambda_4$ - ordinal absolute difference index

See Reardon (2009) for details

Rank-order segregation indices

$\Lambda_1^R = H^R$ - rank-order information theory index

$\Lambda_2^R = R^R$ - rank-order variation ratio index

$\Lambda_3^R = S^R$ - rank-order square root index

See Reardon (2011) for details

Social diversity indices

Diversity index

Normalized diversity

Simpson's

$$H_{SW} = - \sum_{k=1}^{K} P^k \ln P^k$$

$$\bar{H}_{SW} = - \sum_{k=1}^{K} \frac{P^k \ln P^k}{\ln K}$$

$$I_S = \sum_{k=1}^{K} P^k \left(1 - P^k\right)$$

HShannon(x)

NShannon(x)

ISimpson(x)

$$RD^* = \frac{1}{TIS} \sum_{k=1}^{K} \sum_{i=1}^{n} \sum_{k=1}^{n} t_i \left( p_i^k - P^k \right)^2$$

$$C^* = \sum_{k=1}^{K} \sum_{i=1}^{n} t_i \frac{(p_i^k - P^k)^2}{T (K-1)P^k}$$

$$\tilde{D} = \frac{1}{2TIS} \sum_{k=1}^{K} \int_{q \in R} \tau_q |\tilde{\pi}_q^k - P^k| dq$$

$$\tilde{R} = 1 - \int_{q \in R} \frac{\tau_q^k}{T} dq$$
where $\tilde{I}_q = \sum_{k=1}^{K} \tilde{\pi}_q^k (1 - \tilde{\pi}_q^k)$

$$\tilde{H} = 1 - \frac{1}{T^E} \int_{q \in R} \tau_q \tilde{E}_q dq$$

with $\tilde{E}_q = \sum_{k=1}^{K} \tilde{\pi}_q^k \ln \tilde{\pi}_q^k$

$$\Lambda_{\lambda} = \sum_{i=1}^{n} \frac{t_i}{T \nu_{\lambda}} (\nu_{\lambda} - \nu_{\lambda i})$$

with $\nu_{\lambda} = \frac{1}{K-1} \sum_{k=1}^{K-1} f_{\lambda}(\mu^k)$

$$\mu_i^k = \sum_{j=1}^{K} \frac{x_i^k}{t_i}$$

$$f_1(\mu) = -[\mu \ln \mu + (1 - \mu) \ln (1 - \mu)]$$

$$f_2(\mu) = 4\mu(1 - \mu)$$

$$f_3(\mu) = 2\sqrt{\mu(1 - \mu)}$$

$$f_4(\mu) = 1 - |2\mu - 1|$$

ordinalseg(x)

RelDivers(x)

CMulti(x)

spatmultiseg(x, spatobj, folder, shape) [1]

spatmultiseg(x, spatobj, folder, shape) [2]

spatmultiseg(x, spatobj, folder, shape) [3]

$$\Lambda_{\lambda}^{R} = \int_{0}^{1} \frac{f(\hat{p})}{\int_{0}^{1} f(\hat{q}) d\hat{q}} \Lambda_{\lambda}(\hat{p}) d\hat{p}$$

rankorderseg(x, polorder, pred)
Multi-group relative diversity

Squared coefficient of variation

Spatial multi-group dissimilarity

See Reardon and O'Sullivan (2004) for details

Spatial multi-group relative diversity

See Reardon and O'Sullivan (2004) for details

Spatial multi-group information theory

See Reardon and O'Sullivan (2004) for details

Ordinal segregation indices

$\Lambda_1$ - ordinal information theory index

$\Lambda_2$ - ordinal variation ratio index

$\Lambda_3$ - ordinal square root index

$\Lambda_4$ - ordinal absolute difference index

See Reardon (2009) for details

Rank-order segregation indices

$\Lambda_1^R = H^R$ - rank-order information theory index

$\Lambda_2^R = R^R$ - rank-order variation ratio index

$\Lambda_3^R = S^R$ - rank-order square root index

See Reardon (2011) for details

Social diversity indices

Diversity index

Normalized diversity

Simpson's

$$H_{SW} = - \sum_{k=1}^{K} P^k \ln P^k$$

$$\bar{H}_{SW} = - \sum_{k=1}^{K} \frac{P^k \ln P^k}{\ln K}$$

$$I_S = \sum_{k=1}^{K} P^k \left(1 - P^k\right)$$

HShannon(x)

NShannon(x)

ISimpson(x)

$$RD^* = \frac{1}{TIS} \sum_{k=1}^{K} \sum_{i=1}^{n} \sum_{k=1}^{n} t_i \left( p_i^k - P^k \right)^2$$

$$C^* = \sum_{k=1}^{K} \sum_{i=1}^{n} t_i \frac{(p_i^k - P^k)^2}{T (K-1)P^k}$$

$$\tilde{D} = \frac{1}{2TIS} \sum_{k=1}^{K} \int_{q \in R} \tau_q |\tilde{\pi}_q^k - P^k| dq$$

$$\tilde{R} = 1 - \int_{q \in R} \frac{\tau_q^k}{T} dq$$
where $\tilde{I}_q = \sum_{k=1}^{K} \tilde{\pi}_q^k (1 - \tilde{\pi}_q^k)$

$$\tilde{H} = 1 - \frac{1}{T^2 E} \int_{q \in R} \tau_q \tilde{E}_q dq$$

$$\text{with } \tilde{E}_q = \sum_{k=1}^{K} \tilde{\pi}_q^k \ln \tilde{\pi}_q^k$$

$$\Lambda_{\lambda} = \sum_{i=1}^{n} \frac{t_i}{T \nu_{\lambda}} (\nu_{\lambda} - \nu_{\lambda i})$$

$$\text{with } \nu_{\lambda} = \frac{1}{K-1} \sum_{k=1}^{K-1} f_{\lambda}(\mu^k)$$

$$\mu_i^k = \sum_{j=1}^{k} \frac{x_j^k}{t_i^k}$$

$$f_1(\mu) = -[\mu \ln \mu + (1 - \mu) \ln (1 - \mu)]$$

$$f_2(\mu) = 4\mu(1 - \mu)$$

$$f_3(\mu) = 2\sqrt{\mu(1 - \mu)}$$

$$f_4(\mu) = 1 - |2\mu - 1|$$

$$\Lambda_{\lambda}^{R} = \int_{0}^{1} \frac{f(\hat{p})}{\int_{0}^{1} f(\hat{q}) d\hat{q}} \Lambda_{\lambda}(\hat{p}) d\hat{p}$$

RelDivers(x)

CMulti(x)

spatmultiseg(x, spatobj, folder, shape) [1]

spatmultiseg(x, spatobj, folder, shape) [2]

spatmultiseg(x, spatobj, folder, shape) [3]

ordinalsseg(x)

rankorderseg(x, polorder, pred)
<table><thead><tr><th>Local indices</th><th></th><th></th></tr></thead><tbody><tr><td>Location quotient</td><td>LQ<sup>k</sup><sub>i</sub> = (x&#773;<sup>k</sup><sub>i</sub> / t<sub>i</sub>) / (x&#773;<sup>k</sup><sub>i</sub> / T)</td><td>LQ(x)</td></tr><tr><td>Local diversity</td><td>I<sup>i</sup><sub>SW</sub> = - &Sigma;<sup>K</sup><sub>k=1</sub> p<sup>k</sup><sub>i</sub> ln p<sup>k</sup><sub>i</sub></td><td>LShannon(x)</td></tr><tr><td>Local entropy</td><td>H2<sup>i</sup> = - &Sigma;<sup>K</sup><sub>k=1</sub> (p<sup>k</sup><sub>i</sub> / ln K) ln p<sup>k</sup><sub>i</sub></td><td>HLoc(x)</td></tr><tr><td>Local Simpson</td><td>I<sup>i</sup><sub>S</sub> = &Sigma;<sup>K</sup><sub>k=1</sub> p<sup>k</sup><sub>i</sub> (1 - p<sup>k</sup><sub>i</sub>)</td><td>LSimpson(x)</td></tr></tbody></table>
<table><thead><tr><th colspan="3">Local indices</th></tr></thead><tbody><tr><td>Location quotient</td><td>LQ<sup>k</sup><sub>i</sub> = (x&#773;<sub>i</sub>/t<sub>i</sub>) / (x&#773;<sub>i</sub>/T)</td><td>LQ(x)</td></tr><tr><td>Local diversity</td><td>I<sup>i</sup><sub>SW</sub> = - &Sigma;<sup>K</sup><sub>k=1</sub> p<sup>k</sup><sub>i</sub> ln p<sup>k</sup><sub>i</sub></td><td>LShannon(x)</td></tr><tr><td>Local entropy</td><td>H2<sup>i</sup> = - &Sigma;<sup>K</sup><sub>k=1</sub> (p<sup>k</sup><sub>i</sub> / ln K)</td><td>HLoc(x)</td></tr><tr><td>Local Simpson</td><td>I<sup>i</sup><sub>S</sub> = &Sigma;<sup>K</sup><sub>k=1</sub> p<sup>k</sup><sub>i</sub> (1 - p<sup>k</sup><sub>i</sub>)</td><td>LSimpson(x)</td></tr></tbody></table>
## B. Examples of OasisR functions

To allow a better understanding of the **OasisR** functions, we provide several examples which demonstrate certain subtleties of their use. Similarly to the main article, we use the same theoretical examples based on a 10×10 checkboard, with two possible population distributions. We start with a short script which analyzes the Atkinson index sensitivity to inequality aversion parameter changes (distribution B):

```R
R> delta.list <- seq(0.1, 0.9, by = 0.1)
R> result <- rep(0, 9)
R> for (i in 1:length delta.list) {
+     result[i] <- Atkinson(B, delta = delta.list[i])[1]
+ }
R> result

[1] 0.8538 0.8672 0.8827 0.9005 0.9211 0.9442 0.9687 0.9901 0.9997
```

The next example illustrates the variation of the generalized adjusted dissimilarity index as a function of the contiguity order *k* (distribution A).

```R
R> result <- rep(0, 11)
R> for (k in 1:11) {
+     result[k] <- DIMorrillK(A, spatobj = segdata, K = k)[1, 2]
+ }
R> result
R> plot(result, type = "l")

[1] 0.9444 0.9022 0.8775 0.8646 0.8581 0.8552 0.8541 0.8536 0.8535 0.8534
[11] 0.8534
```

The perimeter definition (`ptype = "int"` for internal boundaries – by default, vs. `ptype = "all"` for entire borders of spatial units) matters for the adjusted boundary and perimeter area ratio dissimilarity index $D^{k_1k_2}(s)$.

```R
R> DIWong(A, spatobj = segdata, variant = "s", ptype = "int")

[1,1] [1,2]
[1,] 0.0000 0.9472
[2,] 0.9472 0.0000
```

```R
R> DIWong(A, spatobj = segdata, variant = "s", ptype = "all")

[1,1] [1,2]
[1,] 0.0000 0.9444
[2,] 0.9444 0.0000
```

Similarly, the diagonal definition of the distance matrix has an impact on the value of distance-based indices:
## B. Examples of OasisR functions

To allow a better understanding of the **OasisR** functions, we provide several examples which demonstrate certain subtleties of their use. Similarly to the main article, we use the same theoretical examples based on a 10×10 checkboard, with two possible population distributions. We start with a short script which analyzes the Atkinson index sensitivity to inequality aversion parameter changes (distribution B):

```R
R> delta.list <- seq(0.1, 0.9, by = 0.1)
R> result <- rep(0, 9)
R> for (i in 1:length delta.list) {
+     result[i] <- Atkinson(B, delta = delta.list[i])[1]
+ }
R> result

[1] 0.8538 0.8672 0.8827 0.9005 0.9211 0.9442 0.9687 0.9901 0.9997
```

The next example illustrates the variation of the generalized adjusted dissimilarity index as a function of the contiguity order *k* (distribution A).

```R
R> result <- rep(0, 11)
R> for (k in 1:11) {
+     result[k] <- DIMorrillK(A, spatobj = segdata, K = k)[1, 2]
+ }
R> result
R> plot(result, type = "l")

[1] 0.9444 0.9022 0.8775 0.8646 0.8581 0.8552 0.8541 0.8536 0.8535 0.8534
[11] 0.8534
```

The perimeter definition (`ptype = "int"` for internal boundaries – by default, vs. `ptype = "all"` for entire borders of spatial units) matters for the adjusted boundary and perimeter area ratio dissimilarity index $D^{k_1k_2}(s)$.

```R
R> DIWong(A, spatobj = segdata, variant = "s", ptype = "int")

[1,1] [1,2]
[1,] 0.0000 0.9472
[2,] 0.9472 0.0000
```

```R
R> DIWong(A, spatobj = segdata, variant = "s", ptype = "all")

[1,1] [1,2]
[1,] 0.0000 0.9444
[2,] 0.9444 0.0000
```

Similarly, the diagonal definition of the distance matrix has an impact on the value of distance-based indices:
R> DPxy(A, spatobj = segdata, diagval = "0")

[,1]  [,2]
[1,] 0.7882 0.2118
[2,] 0.0706 0.9294

R> DPxy(A, spatobj = segdata, diagval = "a")

[,1]  [,2]
[1,] 0.7688 0.2312
[2,] 0.0771 0.9229

As we reduce the effect of the distance by increasing the distance decay parameter, the
minority spatial isolation reaches its maximum:

R> result <- rep(0, 11)
R> for (k in 1:11) {
+   result[k] <- DPxy(A, spatobj = segdata, diagval = "0", beta = k)[1, 1]
+ }
R> plot(result, type = "l")
R> result

[1] 0.7882 0.9234 0.9725 0.9905 0.9968 0.9989 0.9996 0.9999 0.9999 1.0000
[11] 1.0000

Certain clustering indices, such as the spatial proximity index, can be defined as multi-group,
one-group and between group measures:

R> SP(A, spatobj = segdata, diagval = "a", itype = "multi")

[1] 1.6636

R> SP(A, spatobj = segdata, diagval = "a", itype = "one")

[1] 2.9909 1.2212

R> SP(A, spatobj = segdata, diagval = "a", itype = "between")

[,1]  [,2]
[1,] 1.0000 1.6636
[2,] 1.6636 1.0000

To compare gravitational distance-based measures, we need to pay attention to distance units
which strongly influence results:

R> ACL(A, spatobj = segdata, spatmat = "d", diagval = "a")
R> DPxy(A, spatobj = segdata, diagval = "0")

[,1]  [,2]
[1,] 0.7882 0.2118
[2,] 0.0706 0.9294

R> DPxy(A, spatobj = segdata, diagval = "a")

[,1]  [,2]
[1,] 0.7688 0.2312
[2,] 0.0771 0.9229

As we reduce the effect of the distance by increasing the distance decay parameter, the
minority spatial isolation reaches its maximum:

R> result <- rep(0, 11)
R> for (k in 1:11) {
+     result[k] <- DPxy(A, spatobj = segdata, diagval = "0", beta = k)[1, 1]
+ }
R> plot(result, type = "l")
R> result

[1] 0.7882 0.9234 0.9725 0.9905 0.9968 0.9989 0.9996 0.9999 0.9999 1.0000
[11] 1.0000

Certain clustering indices, such as the spatial proximity index, can be defined as multi-group,
one-group and between group measures:

R> SP(A, spatobj = segdata, diagval = "a", itype = "multi")

[1] 1.6636

R> SP(A, spatobj = segdata, diagval = "a", itype = "one")

[1] 2.9909 1.2212

R> SP(A, spatobj = segdata, diagval = "a", itype = "between")

[,1]  [,2]
[1,] 1.0000 1.6636
[2,] 1.6636 1.0000

To compare gravitational distance-based measures, we need to pay attention to distance units
which strongly influence results:

R> ACL(A, spatobj = segdata, spatmat = "d", diagval = "a")
[1] 0.6636 0.6636

R> ACL(A, spatobj = segdata, spatmat = "d", diagval = "a", distin = "m",
+ distout = "km")

[1] 9e-04 9e-04

Suppose that the area has two centers, located in the 3rd row and 8th column (28th polygon in the data base), and symmetrically in the 8th row and 3rd column (73rd polygon). The local effect of the constrained polycentric relative centralization index will depend on the area included by the number of closest neighbors to the center:

R> result <- rep(0, 25)
R> for (k in 1:25) {
+   result[k] <- RCEPolyK(A, spatobj = segdata, center = c(28, 83),
+                       K = k)[1, 2]
+ }
R> plot(result, type = "l")

After seeing some interesting examples of segregation functions, we show some statistical tests enabled by the **OasisR** package, using resampling methods. We provide an example of the permutation test in the main paper; here we develop examples of bootstrapping and jackknife techniques. If the `outl` parameter is set to `TRUE`, the `ResampleTest` function automatically produces a boxplot for outlier detection.

R> xtest <- ResampleTest(B, fun = "ISDuncan", simtype = "Boot",
+                       sampleunit = "unit", spatobj = segdata)
R> xtest$Summary

Var ISDuncan 5th_percentile Median 95th_percentile BootSE
1 1 0.8421 0.7847 0.8414 0.8909 0.003246122
2 2 0.8421 0.7847 0.8414 0.8909 0.003246122

R> xtest <- ResampleTest(B, fun = "xPx", simtype = "Jack",
+                       sampleunit = "unit", spatobj = segdata, outl = TRUE)
R> xtest$Summary

Var      xPx 5th_percentile Median 95th_percentile JackBias JackSE
1        1 0.7500          0.7391   0.75          0.7553 -0.003564 0.04559334
2        2 0.9211          0.9200   0.92          0.9238 -0.005544 0.01579764
[1] 0.6636 0.6636

R> ACL(A, spatobj = segdata, spatmat = "d", diagval = "a", distin = "m",
+ distout = "km")

[1] 9e-04 9e-04

Suppose that the area has two centers, located in the 3rd row and 8th column (28th polygon in the data base), and symmetrically in the 8th row and 3rd column (73rd polygon). The local effect of the constrained polycentric relative centralization index will depend on the area included by the number of closest neighbors to the center:

R> result <- rep(0, 25)
R> for (k in 1:25) {
+   result[k] <- RCEPolyK(A, spatobj = segdata, center = c(28, 83),
+                       K = k)[1, 2]
+ }
R> plot(result, type = "l")

After seeing some interesting examples of segregation functions, we show some statistical tests enabled by the **OasisR** package, using resampling methods. We provide an example of the permutation test in the main paper; here we develop examples of bootstrapping and jackknife techniques. If the `outl` parameter is set to `TRUE`, the `ResampleTest` function automatically produces a boxplot for outlier detection.

R> xtest <- ResampleTest(B, fun = "ISDuncan", simtype = "Boot",
+                       sampleunit = "unit", spatobj = segdata)
R> xtest$Summary

Var ISDuncan 5th_percentile Median 95th_percentile BootSE
1 1 0.8421 0.7847 0.8414 0.8909 0.003246122
2 2 0.8421 0.7847 0.8414 0.8909 0.003246122

R> xtest <- ResampleTest(B, fun = "xPx", simtype = "Jack",
+                       sampleunit = "unit", spatobj = segdata, outl = TRUE)
R> xtest$Summary

Var      xPx 5th_percentile Median 95th_percentile JackBias JackSE
1        1 0.7500          0.7391   0.75          0.7553 -0.003564 0.04559334
2        2 0.9211          0.9200   0.92          0.9238 -0.005544 0.01579764
<figure><img src="image_4.png" /><figcaption>Figure 3: Outliers detection.</figcaption></figure>

**Affiliation:**

Mihai Tivadar

UR DTGR

Université Grenoble Alpes, Irstea, Centre de Grenoble

2 rue de la Papeterie-BP 76

38402, Saint-Martin-d'Hères, France

Telephone: +33 4 76 76 28 43

E-mail: mihai.tivadar@irstea.fr

URL: http://www.irstea.fr/
<figure><img src="image_6.png" /><figcaption>Figure 3: Outliers detection.</figcaption></figure>

Affiliation:

Mihai Tivadar
UR DTGR
Université Grenoble Alpes, Irstea, Centre de Grenoble
2 rue de la Papeterie-BP 76
38402, Saint-Martin-d'Hères, France
Telephone: +33 4 76 76 28 43
E-mail: mihai.tivadar@irstea.fr
URL: http://www.irstea.fr/