| concstats_gini | R Documentation |
Gini coefficient
concstats_gini(x, normalized = TRUE, na.rm = TRUE, digits = NULL)
x |
A non-negative numeric vector. |
normalized |
Logical. Argument specifying whether or not a normalized
value is required. Must be either |
na.rm |
A logical vector that indicates whether |
digits |
An optional value for digits. Specifies the minimum number of
significant digits to be printed in values. The default is |
A single numeric value.
Other Concentration and inequality measures:
concstats_all_inequ(),
concstats_entropy(),
concstats_grs(),
concstats_inequ(),
concstats_palma(),
concstats_simpson()
# a vector of market shares
x <- c(0.4, 0.2, 0.25, 0.1, 0.05)
concstats_gini(x, normalized = TRUE)
# a vector with NA values
x <- c(0.4, 0.2, 0.25, 0.1, 0.05, NA)
concstats_gini(x, na.rm = TRUE, digits = 2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.