gini_income_elasticity {GiniDecompLY}R Documentation

Gini income elasticity

Description

This function computes the elasticity of Gini index associated with a percentage change in the mean income (for each income source). It provides a set of indicators :

Usage

gini_income_elasticity(.data, ..., .by = NULL, .wgt = NULL)

Arguments

.data

A data frame, or data frame extension (e.g. a tibble)

...

One or more unquoted expressions separated by commas indicating income sources to consider in the decomposition. Variable names can be used as if they were positions in the data frame.

.by

A column to group the calculations by.

.wgt

an optional vector of weights to apply in computation. Should be NULL or a numeric vector.

Value

An object of class data.frame containing all the calculated indicators. The data.frame is grouped by the columns passed into .by argument.

Examples


sample_income_data %>%
  gini_income_elasticity(wage, self_employment_rev, farming_rev, other_rev,
  .by = region)

gini_income_elasticity(sample_income_data, 3:6, .by = region, .wgt = sample_wgt)

[Package GiniDecompLY version 1.0.0 Index]