segregation.rankorder.RankOrderVarianceRatio¶
- class segregation.rankorder.RankOrderVarianceRatio(data, groups, degree=4, w=None, network=None, distance=None, decay='linear', function='triangular', precompute=False, **kwargs)[source]¶
Rank-Order Variance Ratio 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 Variance Ratio 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.CorrelationRthe pairwise index integrated here.
Notes
Reardon’s \(R^R\), the variance ratio (correlation ratio) index integrated across the thresholds of an ordered variable using the weight \(I(p) = 4p(1 - p)\). Of the three rank-order indices this one weights thresholds most evenly across the distribution.
The pairwise index is
segregation.singlegroup.CorrelationR, which is algebraically identical to the variance ratio \(\sum_j t_j (p_j - P)^2 / (T P (1 - P))\).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.