Skip to contents

Estimates a quantile-based share ratio (QBSR) for measuring inequality from simple or complex survey data.

Usage

share_ratio(
  y,
  weights = NULL,
  type = 6,
  na.rm = TRUE,
  prob_numerator = 0.8,
  prob_denominator = 0.2
)

Arguments

y

A numeric vector of strictly positive values (e.g. income, wealth).

weights

A numeric vector of sampling weights. If NULL, all observations are equally weighted.

type

Quantile estimation type: integer 49 or "HD" for Harrell–Davis (default: 6). See csquantile.

na.rm

Logical; remove missing values before computing? Default: TRUE.

prob_numerator

Numeric in \((0,1)\); quantile order for the numerator (default: 0.80, corresponding to the QSR top share).

prob_denominator

Numeric in \((0,1)\); quantile order for the denominator (default: 0.20, corresponding to the QSR bottom share).

Value

A scalar numeric value representing the estimated share ratio.

Details

Consider a random sample \(s\) of size \(n\), and let \(y_j\) and \(w_j\), \(j \in s\), define the observed value and the sampling weight associated to the \(j\)-th individual. Define \(p_n\) and \(p_d\) as the orders of the numerator and denominator quantiles, respectively. The QBSR estimator is defined as:

$$ \widehat{QBSR} = \frac{ \sum_{j \in s} w_j y_j \mathbf{1}\left\{ y_j \geq \widehat{Q}(p_n) \right\} }{ \sum_{j \in s} w_j y_j \mathbf{1}\left\{ y_j \leq \widehat{Q}(p_d) \right\} } $$

where \(\widehat{Q}(p)\) is computed via csquantile, which accounts for sampling weights and the specified quantile type.

The most well-known special cases are the quintile share ratio (QSR; Langel and Tillé (2011) ), obtained with \(p_n = 0.80\) and \(p_d = 0.20\), and the Palma index (Palma (2006) ; Palma (2011) ), obtained with \(p_n = 0.90\) and \(p_d = 0.40\).

References

Langel M, Tillé Y (2011). “Statistical inference for the quintile share ratio.” Journal of Statistical Planning and Inference, 141, 2976–2985.

Palma JG (2006). “Globalizing Inequality: ‘Centrifugal’ and ‘Centripetal’ Forces at Work.” United Nations, Department of Economics and Social Affairs.

Palma JG (2011). “Homogeneous middles vs. heterogeneous tails, and the end of the ‘inverted-U’: It's all about the share of the rich.” Development and Change, 42, 87–153.

See also

csquantile for quantile estimation

Other inequality indicators based on quantiles: inequantiles(), plot_inequality_curve(), qri(), ratio_quantiles(), superpop_qri()

Examples

data(synthouse)
eq <- synthouse$eq_income
w  <- synthouse$weight

# QSR (default: top 20% vs bottom 20%)
share_ratio(y = eq, weights = w)
#> [1] 7.016053

# Palma index (top 10% vs bottom 40%)
share_ratio(y = eq, weights = w, prob_numerator = 0.90, prob_denominator = 0.40)
#> [1] 1.578739

# Compare across macro-regions (NUTS1)
tapply(1:nrow(synthouse), synthouse$NUTS1, function(idx) {
  share_ratio(y = synthouse$eq_income[idx],
              weights = synthouse$weight[idx])
})
#>        C        N       NE       NO        S 
#> 7.329234 6.892276 7.127548 7.746556 6.530128