Computes the quintile share ratio (QSR) estimator for measuring inequality on simple and complex sampling data
Value
A scalar numeric value representing the estimated inequality by the quintile share ratio (QSR).
Details
Consider a random sample \(s\) of size \(n\), and let \(w_j\), \(j \in s\), define the sampling weight and \(y_j\) be the observed characteristics (i.e. income) associated to the \(j\)-th individual, \(j = 1, \ldots, n\). The QSR estimator is defined as:
$$\widehat{QSR} = \frac{\sum_{j \in s}w_j y_j \mathds{1}\left\{ y_j \geq \widehat{Q}(0.8)\right\} }{\sum_{j \in s} w_j y_j\mathds{1}\left\{ y_j \leq \widehat{Q}(0.2)\right\} }$$
where the estimated quantiles \(\widehat{Q}(p)\) are computed via the function
csquantile(), which accounts for sampling weights and the specified
quantile type. This allows \(\widehat{QSR}\) to be used both for simple
random samples and for complex survey data with design weights.
See Langel and Tillé (2011) for a complete review of the QSR estimator with complex sampling data.
References
Langel M, Tillé Y (2011). “Statistical inference for the quintile share ratio.” Journal of Statistical Planning and Inference, 141, 2976–2985.
See also
Other inequality indicators based on quantiles:
inequantiles(),
palma_ratio(),
plot_inequality_curve(),
qri(),
ratio_quantiles()
Examples
data(synthouse)
eq <- synthouse$eq_income ### Income data
# Compute unweighted QSR with default type 6 quantile estimator
qsr(y = eq)
#> [1] 6.905899
# Consider the sampling weights and change quantile estimation type
w <- synthouse$weight
qsr(y = eq, weights = w, type = 5)
#> [1] 7.016053
# Compare QSR across macro-regions (NUTS1)
tapply(1:nrow(synthouse), synthouse$NUTS1, function(area) {
qsr(y = synthouse$eq_income[area],
weights = synthouse$weight[area],
type = 6)
})
#> C N NE NO S
#> 7.329234 6.892276 7.127548 7.746556 6.530128