decomp_groups | R Documentation |
This function decomposes generalized entroy (GE) inequality indices by mutually exclusive population subgroup into a within- and between-group term.
decomp_groups(
x,
w = rep(1, length(x)),
eta = 2,
data = NULL,
ranked = x,
na.rm = TRUE,
group = NULL,
func = "ge",
...
)
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 |
None.
a vector with overall inequality, the within and the between term
Markus Jantti markus.jantti@iki.fi
ge
@references Lambert, P. (1993). The distribution and redistribution
of income. A mathematical analysis. Manchester University Press,
Manchester.
td <- data.frame(y=exp(rnorm(500)), g=sample(letters[1:4], 500, replace=TRUE))
decomp_groups(y, group=g, data=td)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.