spatmultiseg: A function from seg package to compute spatial multi-group...

Description Usage Arguments Value References See Also Examples

View source: R/SegFunctions.R

Description

A function adapted from seg package (Hong et al. 2014) to compute spatial multi-group segregation indices developed by Reardon and O'Sullivan (2004)

Usage

1
spatmultiseg(x, spatobj = NULL, folder = NULL, shape = NULL, ...)

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.

spatobj

- a spatial object (SpatialPolygonsDataFrame) with geographic information

folder

- a character vector with the folder (directory) name indicating where the shapefile is located on the drive

shape

- a character vector with the name of the shapefile (without the .shp extension) .

...

- other parameters of spseg function from seg package.

Value

A vector with Reardon's spatial multi-group segregation indices: D* - spatial multi-group dissimilarity index R* - spatial multi-group relative diversity index H* - spatial multi-group information theory index

References

Reardon, S. F. and O'Sullivan, D. (2004) Measures of spatial segregation. Sociological Methodology, 34, 121-162.

Hong S.Y., O'Sullivan D., Sadahiro Y. (2014) Implementing Spatial Segregation Measures in R'. PLoS ONE, 9(11)

See Also

Multi-group indices: PMulti, GiniMulti, DMulti, HMulti, RelDivers

Social diversity indices: HShannon, NShannon, ISimpson,

Examples

1
2
3
4
5
6
7
x <- segdata@data[ ,1:2]
foldername <- system.file('extdata', package = 'OasisR')
shapename <- 'segdata'

spatmultiseg(x, spatobj = segdata)

spatmultiseg(x, folder = foldername, shape = shapename) 

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

Related to spatmultiseg in OasisR...