segregation.rankorder.RankOrderInfoTheory

class segregation.rankorder.RankOrderInfoTheory(data, groups, degree=4, w=None, network=None, distance=None, decay='linear', function='triangular', precompute=False, **kwargs)[source]

Rank-Order Information Theory Index.

Parameters:
datapandas.DataFrame or geopandas.GeoDataFrame, required

dataframe or geodataframe if spatial index holding data for location of interest

groupslist, required

columns on dataframe holding population counts for each category of an ordered variable, listed from the lowest category to the highest. The categories must partition the population; the total for each unit is the sum across these columns.

degreeint

degree of the polynomial fit through the segregation profile, by default 4

wlibpysal.weights.KernelW, optional

lipysal spatial kernel weights object used to define an egohood

networkpandarm.Network

pandarm Network object representing the study area

distanceint

Maximum distance (in units of geodataframe CRS) to consider the extent of the egohood

decaystr

type of decay function to apply. Options include

precomputebool

Whether to precompute the pandarm Network object

Attributes:
statisticfloat

Rank-Order Information Theory Index

core_dataa pandas DataFrame

A pandas DataFrame that contains the columns used to perform the estimate.

profilepandas.DataFrame

Segregation profile with one row per usable threshold, holding the threshold column name, the population share at or below it (p), and the pairwise index there (statistic)

coefficientsnumpy.ndarray

Fitted polynomial coefficients, lowest order first

deltasnumpy.ndarray

Reardon’s delta coefficients for the fitted polynomial degree

degreeint

Degree of the fitted polynomial

standard_errorfloat

Delta-method standard error of the statistic

r_squaredfloat

Weighted R-squared of the polynomial fit

modelstatsmodels results

The fitted weighted least squares model, for further diagnostics

See also

segregation.singlegroup.Entropy

the pairwise index integrated here.

Notes

Reardon’s \(H^R\), the information theory index integrated across the thresholds of an ordered variable using the entropy weight \(E(p) = -2[p \ln p + (1 - p)\ln(1 - p)]\), which is moderately sensitive to the extremes of the distribution.

When a spatial argument is passed, every ordered category column is converted into an egohood count before the thresholds are computed, so the profile describes segregation between spatially-smoothed populations.

Based on Reardon, Sean F. “Measures of income segregation.” Working paper, Stanford Center for Education Policy Analysis (2011).

Reference: [].

__init__(data, groups, degree=4, w=None, network=None, distance=None, decay='linear', function='triangular', precompute=False, **kwargs)[source]

Init.

Methods

__init__(data, groups[, degree, w, network, ...])

Init.