[R] conditional weighted quintiles
abakis at gmail.com
Mon Jan 19 05:03:42 CET 2009
I am economist and working on poverty / income inequality. I need descriptive
statitics like the ratio of education expentitures between different income
quintiles where each household has a different weight. After a bit of
google search I found 'Hmisc' and 'quantreg' libraries for weighted quantiles.
The problem is that these packages give me only weighted quintiles; but what
I need is conditional weighted quintiles. The below example illustrates
what I mean.
x <- data.frame("id"=c(1:5),"income"=c(10,10,20,30,50),
I would like to see the expenditure of each quintile conditional on income, i.e.
the education expenditures of the 5th quintile equal to zero.
Thanks in advance,
More information about the R-help