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:
- data
pandas.DataFrameorgeopandas.GeoDataFrame,required dataframe or geodataframe if spatial index holding data for location of interest
- groups
list,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.
- degree
int degree of the polynomial fit through the segregation profile, by default 4
- w
libpysal.weights.KernelW,optional lipysal spatial kernel weights object used to define an egohood
- network
pandarm.Network pandarm Network object representing the study area
- distance
int Maximum distance (in units of geodataframe CRS) to consider the extent of the egohood
- decay
str type of decay function to apply. Options include
- precomputebool
Whether to precompute the pandarm Network object
- data
- Attributes:
- statistic
float Rank-Order Information Theory Index
- core_data
apandasDataFrame A pandas DataFrame that contains the columns used to perform the estimate.
- profile
pandas.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)
- coefficients
numpy.ndarray Fitted polynomial coefficients, lowest order first
- deltas
numpy.ndarray Reardon’s delta coefficients for the fitted polynomial degree
- degree
int Degree of the fitted polynomial
- standard_error
float Delta-method standard error of the statistic
- r_squared
float Weighted R-squared of the polynomial fit
- model
statsmodelsresults The fitted weighted least squares model, for further diagnostics
- statistic
See also
segregation.singlegroup.Entropythe 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.