Skip to contents

Computes the linearized variable (influence function) for the quantile-based share ratio (QBSR) using the linearization approach of Deville (1999) and the derivation in Langel and Tillé (2011) .

Usage

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

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.

prob_numerator

Numeric in \((0,1)\); quantile order for the numerator (default: 0.80).

prob_denominator

Numeric in \((0,1)\); quantile order for the denominator (default: 0.20).

na.rm

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

Value

A numeric vector of the same length as y containing the linearized variable \(\widehat{z}_k\) for each observation.

Details

Langel and Tillé (2011) derived the influence function for the quintile share ratio, which generalises to any QBSR. Define \(p_n\) and \(p_d\) as the quantile orders for the numerator and denominator, respectively. The linearized variable is:

$$ {I}(\widehat{QBSR})_{k} = \frac{y_k - {I}(\widehat{Y}_{p_n})_k}{\widehat{Y}_{p_d}} - \frac{(\widehat{Y} - \widehat{Y}_{p_n})\, {I}(\widehat{Y}_{p_d})_k}{\widehat{Y}_{p_d}^2} $$

where the influence function of the partial total \(\widehat{Y}_p = \sum_{j \in s} w_j y_j \mathbf{1}(y_j \leq \widehat{Q}(p))\) is:

$$ {I}(\widehat{Y}_p)_k = p\,\widehat{Q}(p) - \bigl(\widehat{Q}(p) - y_k\bigr) \mathbf{1}(y_k \leq \widehat{Q}(p)) $$

and \(\widehat{Y} = \sum_{j \in s} w_j y_j\) is the estimated total.

References

Deville J (1999). “Variance estimation for complex statistics and estimators: linearization and residual techniques.” Survey methodology, 25, 193–204. Langel M, Tillé Y (2011). “Statistical inference for the quintile share ratio.” Journal of Statistical Planning and Inference, 141, 2976–2985.

See also

share_ratio, csquantile

Other influence functions: if_gini(), if_qri(), if_quantile(), if_ratio_quantiles()

Examples

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

# QSR influence function (default: p_n = 0.80, p_d = 0.20)
z <- if_share_ratio(eq, weights = w)

# Palma influence function (p_n = 0.90, p_d = 0.40)
z_palma <- if_share_ratio(eq, weights = w,
                           prob_numerator = 0.90, prob_denominator = 0.40)