Skip to contents

add_quantile_interval() function calculates weighted income quantiles and classifies households according to these.

Usage

add_quantile_interval(
  df,
  vars,
  cut_offs = c(0, 0.2, 0.4, 0.6, 0.8, 1),
  weight = NULL
)

Arguments

df

A dataframe.

vars

The variable or variables with income integer values.

cut_offs

The cut-offs for computaton of quantiles. The default corresponds to the quantiles of the distribution, based on the weighted median.

weight

The sampling weights.