xPx: A function to compute Bell's isolation index (xPx)

Description Usage Arguments Value References See Also Examples

View source: R/SegFunctions.R

Description

The isolation index, xPx, is an exposure index that measures the probability that two members of a group share the same spatial unit. This index can be calculated using the approximate or the exact method (see Bell, 1954).

Usage

1
xPx(x, exact = FALSE)

Arguments

x

- an object of class matrix (or which can be coerced to that class), where each column represents the distribution of a group within spatial units. The number of columns should be greater than 1 (at least 2 groups are required). You should not include a column with total population, because this will be interpreted as a group.

exact

- a logical variable to specifiy the index version: exact = FALSE (by default) for the approximate version of the index, and exact = TRUE for the exact version

Value

a numeric vector containing the isolation index value for each group

References

Bell W. (1954) A probability model for the measurement of ecological segregation. Social Forces 32(4), pp. 357-364

See Also

Isolation indices: Eta2, DPxx

Interaction indices: xPy, DPxy

Examples

1
2
3
x <- segdata@data[ ,7:8]
xPx(x) 
xPx(x, exact = TRUE)

Example output

[1] 0.7500 0.9211
[1] 0.7475 0.9203

OasisR documentation built on July 2, 2020, 3:14 a.m.

Related to xPx in OasisR...