dissimilarity: Dissimilarity Score

Description Usage Arguments Value Note Source

View source: R/two_group_measures.R

Description

This index measures the evenness with which two mutually exclusive groups are distributed across the geographic units that make up a larger geographic entity; for example, the distribution of blacks and whites across the census tracts that make up a metropolis. Its minimum value is zero and its maximum value is 100.

Usage

1
dissimilarity(group1, group2, population = NA, summed = TRUE, na.rm = TRUE)

Arguments

group1, group2

Numeric vectors representing the proportions of each group in each observation

population

if group1 and group2 are proportions, this parameter gives the population weights. Set to 1 to avoid a warning measure if using population

summed

If TRUE, will return a single summary statistic. (Or one value per group if specifying dplyr::group_by.) If FALSE (default), will return a vector equaling the length of the input vectors. If 'weighted' (only for divergence and information theory), returns a vector as in FALSE, but with pre-weighted values, such that sum(divergence(..., summed = 'weighted)) is equivalent to divergence(..., summed = T).

na.rm

logical. Should missing values (including NaN) be removed? Used only if summed is set to TRUE.

Value

A scalar value, see note.

Note

Setting summed == FALSE will return by-observation measures, but this measure is not meant to be decomposed. These results are for verification purposes only.

Source

Duncan, Otis Dudley, and Beverly Duncan. A Methodological Analysis of Segregation Indexes.” American Sociological Review, vol. 20, no. 2, 1955, pp. 210–217. JSTOR, www.jstor.org/stable/2088328. Accessed 14 Mar. 2020.


arthurgailes/rsegregation documentation built on May 23, 2021, 6:33 a.m.