DIMorrill: A function to compute Morrill's dissimilarity index

Description Usage Arguments Value References See Also Examples

View source: R/SegFunctions.R

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

1
DIMorrill(x, c = NULL, queen = FALSE, 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.

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

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

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) .

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, ISMorrillK

Between groups dissimilarity indices: DIDuncan, DIMorrillK, DIWong

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
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) 

Example output

       [,1]   [,2]
[1,] 0.0000 0.9444
[2,] 0.9444 0.0000
       [,1]   [,2]
[1,] 0.0000 0.9444
[2,] 0.9444 0.0000
OGR data source with driver: ESRI Shapefile 
Source: "/usr/lib/R/site-library/OasisR/extdata", layer: "segdata"
with 100 features
It has 19 fields
       [,1]   [,2]
[1,] 0.0000 0.9444
[2,] 0.9444 0.0000

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

Related to DIMorrill in OasisR...