Package: segregation 1.1.0.9000

segregation: Entropy-Based Segregation Indices

Computes segregation indices, including the Index of Dissimilarity, as well as the information-theoretic indices developed by Theil (1971) <isbn:978-0471858454>, namely the Mutual Information Index (M) and Theil's Information Index (H). The M, further described by Mora and Ruiz-Castillo (2011) <doi:10.1111/j.1467-9531.2011.01237.x> and Frankel and Volij (2011) <doi:10.1016/j.jet.2010.10.008>, is a measure of segregation that is highly decomposable. The package provides tools to decompose the index by units and groups (local segregation), and by within and between terms. The package also provides a method to decompose differences in segregation as described by Elbers (2021) <doi:10.1177/0049124121986204>. The package includes standard error estimation by bootstrapping, which also corrects for small sample bias. The package also contains functions for visualizing segregation patterns.

Authors:Benjamin Elbers [aut, cre]

segregation_1.1.0.9000.tar.gz
segregation_1.1.0.9000.zip(r-4.7-x86_64)segregation_1.1.0.9000.zip(r-4.6-x86_64)segregation_1.1.0.9000.zip(r-4.5-x86_64)
segregation_1.1.0.9000.tgz(r-4.6-x86_64)segregation_1.1.0.9000.tgz(r-4.6-arm64)segregation_1.1.0.9000.tgz(r-4.5-x86_64)segregation_1.1.0.9000.tgz(r-4.5-arm64)
segregation_1.1.0.9000.tar.gz(r-4.7-arm64)segregation_1.1.0.9000.tar.gz(r-4.7-x86_64)segregation_1.1.0.9000.tar.gz(r-4.6-arm64)segregation_1.1.0.9000.tar.gz(r-4.6-x86_64)
segregation_1.1.0.9000.tgz(r-4.6-emscripten)
manual.pdf |manual.html
DESCRIPTION |NEWS
card.svg |card.png
segregation/json (API)

# Install 'segregation' in R:
install.packages('segregation', repos = c('https://elbersb.r-universe.dev', 'https://cloud.r-project.org'))

Bug tracker:https://github.com/elbersb/segregation/issues

Pkgdown/docs site:https://elbersb.github.io

Uses libs:
  • c++– GNU Standard C++ Library v3
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

On CRAN:

Conda:

entropysegregationstatisticscpp

7.06 score 36 stars 71 scripts 407 downloads 20 exports 5 dependencies

Last updated from:510a3692c7. Checks:13 OK. Indexed: yes.

TargetResultTimeFilesSyslog
linux-devel-arm64OK161
linux-devel-x86_64OK154
source / vignettesOK268
linux-release-arm64OK156
linux-release-x86_64OK151
macos-release-arm64OK168
macos-release-x86_64OK207
macos-oldrel-arm64OK193
macos-oldrel-x86_64OK368
windows-develOK112
windows-releaseOK118
windows-oldrelOK127
wasm-releaseOK138

Exports:compressdissimilaritydissimilarity_expectedentropyexposureget_crosswalkipfisolationmatrix_to_longmerge_unitsmutual_differencemutual_localmutual_local_expectedmutual_totalmutual_total_expectedmutual_total_nestedmutual_withinscree_plotsegcurvesegplot

Dependencies:backportscheckmatedata.tableRcppRcppProgress

A walkthrough of the segregation package
The basic mathematics | Data format | Computing the M and H indices | Between-Within decomposition | Local segregation | Inference | Decomposing differences in indices | References

Last update: 2025-12-05
Started: 2021-01-10

FAQ
Can index X be added to the package? | How can I compute indices for different areas at once? | How can I use Census data from tidycensus to compute segregation indices? | Can I compute local segregation scores for the H index? | How can I compute margins-adjusted local segregation scores?

Last update: 2024-01-30
Started: 2021-08-21

Visualizing and compressing segregation
Segregation curve | Segplot | Compressing segregation information

Last update: 2023-12-01
Started: 2022-06-29