View source: R/md_compute_dist_stats.R
md_compute_dist_stats | R Documentation |
Given a vector of weights and welfare, this functions computes the various distributional statistics.
md_compute_dist_stats(
welfare,
weight,
mean = NULL,
nbins = 10,
lorenz = NULL,
n_quantile = 10
)
welfare |
numeric: A vector of income or consumption values |
mean |
numeric: A value with the mean. Optional. |
nbins |
numeric: number of points on the Lorenz curve. Optional. Only
used if |
lorenz |
data.frame: A table with points on the Lorenz curve. Output of
|
n_quantile |
numeric: Number of quantiles for which share of total income is desired. It can't be larger that the total number of percentiles in the Lorenz curve provided by the user. Default is 10. |
data.frame
wbpip:::md_compute_dist_stats(welfare = 1:2000, weight = rep(1, 2000))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.