segregation.rankorder.RankOrderSqrt¶
- class segregation.rankorder.RankOrderSqrt(data, groups, degree=4, w=None, network=None, distance=None, decay='linear', function='triangular', precompute=False, **kwargs)[source]¶
Rank-Order Square Root 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 Square Root 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.HutchensSqrtthe pairwise index integrated here.
Notes
Reardon’s \(S^R\), the square root index integrated across the thresholds of an ordered variable using the weight \(V(p) = 2\sqrt{p(1 - p)}\). Of the three rank-order indices this one is most sensitive to the extremes of the distribution, making it useful for studying concentrated poverty and affluence.
The pairwise index is
segregation.singlegroup.HutchensSqrt, which is Hutchens’ square root index; written in unit-share form it is exactly the square root index Reardon integrates.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.