decomp_groups: Decomposition of inequality index by population subgroups

View source: R/decomp.R

decomp_groupsR Documentation

Decomposition of inequality index by population subgroups

Description

This function decomposes generalized entroy (GE) inequality indices by mutually exclusive population subgroup into a within- and between-group term.

Usage

decomp_groups(
  x,
  w = rep(1, length(x)),
  eta = 2,
  data = NULL,
  ranked = x,
  na.rm = TRUE,
  group = NULL,
  func = "ge",
  ...
)

Arguments

x

a numerical vector whose index is to be estimated, consisting of income less some reference value

w

an optional vector of non-negative integer values weights.

eta

the inequality aversion parameter. Larger value indicate higher aversion, zero inequality neutrality and negative values inequality preference.

data

the data frame where the variables are found.

ranked

the variable by which observations should be ranked (has no meaning for GE based within/between rankings)

na.rm

a logical indicating whether NA's should removed.

group

the (one-way) grouping varaiable

func

the inequality index

Details

None.

Value

a vector with overall inequality, the within and the between term

Author(s)

Markus Jantti markus.jantti@iki.fi

See Also

ge @references Lambert, P. (1993). The distribution and redistribution of income. A mathematical analysis. Manchester University Press, Manchester.

Examples


td <- data.frame(y=exp(rnorm(500)), g=sample(letters[1:4], 500, replace=TRUE))
decomp_groups(y, group=g, data=td)

mjantti/incdist documentation built on Aug. 23, 2023, 5:33 p.m.