decomp_meanIncomeBySources: Static decomposition of the mean income by sources

Description Usage Arguments Value

View source: R/decomp_meanIncomeBySources.R

Description

Static decomposition of the mean income by sources

Usage

1
2
3
4
5
6
decomp_meanIncomeBySources(
  data,
  incomeSources_vars,
  totalIncome_var,
  weight = NULL
)

Arguments

data

A data.frame with income sources and the total income (and possibliy sample weights) as variables

incomeSources_vars

A character vector with names of the income sources (they must be columns of 'data')

totalIncome_var

A character value naming the variable wich represents the total income (it must be a column of 'data' and for each observation in the data, the income sources must add up to the total income).

weight

(optional) A character values naming the variable wich represents the sample weights

Value

Returns a tibble with the following coluns: - Income Source: name of the income source - Mean: Mean of the income source - Prop. Pop. Recipients: Proportion of the population receiving non-zero income for each source - Mean*Prop. Pop. Recipients: mean times the proportion of recipients. This column must sum up to the global mean of the total income variable.


antrologos/inequalityTools documentation built on May 23, 2021, 11:56 a.m.