Learn R Programming

OasisR (version 2.0.1)

DIMorrill: A function to compute Morrill's dissimilarity index

Description

Morrill's dissimilarity index is a development of DIDuncan's index which takes into account the interactions between spatial units (contiguity). The function can be used in two ways: to provide a contiguity matrix or a external geographic information source (spatial object or shape file).

Usage

DIMorrill(x, c = NULL, queen = TRUE, 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 population group, within spatial units. The number of columns should be greater than 1 (at least 2 population groups are required). You should not include a column with total population in each unit, because this will be interpreted as a group.

c

- a standard binary contiguity (adjacency) symmetric matrix where each element Cij equals 1 if i-th and j-th spatial units are adjacent, and 0 otherwise.

queen

- logical parameter difining criteria used for contiguity matrix computation, TRUE (by default) for queen , FALSE for rook

spatobj

- a spatial object (SpatialPolygonsDataFrame) containing geographic information

folder

- a character vector with the folder (directory) name indicating where the shapefile with the geographic information is located.

shape

- a character vector with the name of the shapefile (without the .shp extension) which contains the geographic information

Value

a matrix with Morrill's dissimilarity index values

References

Morrill B. (1991) On the measure of geographic segregation. Geography research forum, 11, pp. 25-36.

See Also

Other one-group evenness indices: ISDuncan, Gini, Gorard, Atkinson, HTheil, ISWong, ISMorrill

Between groups dissimilarity indices: DIDuncan, DIWong

Examples

Run this code
# NOT RUN {
x <- segdata@data[ ,1:2]
contiguity <- contig(segdata)
foldername <- system.file('extdata', package = 'OasisR')
shapename <- 'segdata'

DIMorrill(x, c = contiguity) 

DIMorrill(x, spatobj = segdata, queen = FALSE)

DIMorrill(x, folder = foldername, shape = shapename) 
# }

Run the code above in your browser using DataLab