powered by
Computes the average affluence gap in subpopulation.
r.med.sub(x.sub, x, weight.sub, weight, k)
the gap value
income vector of subpopulation
income vector of population
weight vector of subpopulation
weight vector of population
multiple of the median income
Alicja Wolny-Dominiak
Medeiros M. (2006) The rich and the poor: the construction of an affluence line from the poverty line. Social Indicators Research, 78, pp. 1-18.
r.med
data(affluence) affluence$weight <- rep(1, nrow(affluence)) aff.sub <- subset(affluence, education == 2) r.med.sub(aff.sub$income, affluence$income, aff.sub$weight, affluence$weight, 2)
Run the code above in your browser using DataLab