I know there is a package called survey
doing similar things. I do not know if there is any code or way to compute percentile ratio in R.
What I would like to get is the relative net worth held by top x% of households. So it will be the ratio:
- (Top x percentile household's total wealth (0.99 quantile to max) / (total wealth in the economy)*
I found svrqsr
in survey
package but it gives me relative share, compared with lower 20 percentile households.
Any suggestion, or code reference that I can use?