Skip to contents

Segregation indices

dissimilarity()
Calculates Index of Dissimilarity
exposure()
Calculates pairwise exposure indices
isolation()
Calculates isolation indices
mutual_total()
Calculates the Mutual Information Index M and Theil's Entropy Index H
mutual_total_nested()
Calculates a nested decomposition of segregation for M and H
mutual_within()
Calculates detailed within-category segregation scores for M and H
mutual_local()
Calculates local segregation scores based on M

Visualizing segregation

segcurve()
A visual representation of two-group segregation
segplot()
A visual representation of segregation

Debiasing

mutual_expected()
Calculates expected values when true segregation is zero
dissimilarity_expected()
Calculates expected values when true segregation is zero

Comparing differences

mutual_difference()
Decomposes the difference between two M indices
ipf()
Adjustment of marginal distributions using iterative proportional fitting

Compressing segregation

compress()
Compresses a data matrix based on mutual information (segregation)
merge_units()
Creates a compressed dataset
get_crosswalk()
Create crosswalk after compression
scree_plot()
Scree plot for segregation compression

Datasets

school_ses
Student-level data including SES status
schools00
Ethnic/racial composition of schools for 2000/2001
schools05
Ethnic/racial composition of schools for 2005/2006

Helper functions

entropy()
Calculates the entropy of a distribution
matrix_to_long()
Turns a contingency table into long format