Learn R Programming

OasisR (version 3.1.0)

ordinalseg: A function to compute Reardon multi-group ordinal segregation indices

Description

A function to compute Reardon (2009) ordinal indices

Usage

ordinalseg(x)

Value

A vector with Reardon multi-group ordinal segregation indices: Lambda1 - ordinal generalization of the information theory index Lambda2 - ordinal generalization of the variation ratio index Lambda3 - ordinal square root index Lambda4 - ordinal absolute difference index

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. The rows represent the nominal categories (spatial units) and the columns the ordinal categories.

References

Reardon S. F. (2009) Measures of ordinal segregation. Research on Economic Inequality, 17, pp. 129-155.

See Also

rankorderseg

Examples

Run this code
x <- GreHSize@data[ ,3:5]
ordinalseg(x) 

x1 <- matrix(nrow = 4, ncol = 3)
x1[1,] <- c(0, 0, 30)
x1[2,] <- c(0, 20, 10)
x1[3,] <- c(10, 20 ,0)
x1[4,] <- c(30, 0 ,0)

x2 <- matrix(nrow = 4, ncol = 3)
x2[1,] <- c(0, 30, 0)
x2[2,] <- c(0, 10, 20)
x2[3,] <- c(10, 0, 20)
x2[4,] <- c(30, 0, 0)

ordinalseg(x1)
ordinalseg(x2)

Run the code above in your browser using DataLab