View source: R/md_compute_gini.R
md_compute_gini | R Documentation |
Compute the Gini coefficient for microdata.
md_compute_gini(welfare, weight)
welfare |
numeric: A vector of income or consumption values |
weight |
numeric: A vector of population weights, optional, a vector of 1s if not specified. |
Given a vector of income or consumption values and their respective weights
md_compute_gini()
computes the Gini coefficient for the distribution.
numeric
md_compute_gini(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.