concstats_gini {concstats} | R Documentation |
Gini Index
Description
Gini Index
Usage
concstats_gini(x, normalized = TRUE, na.rm = TRUE)
Arguments
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 |
Value
A single numeric measure.
Examples
# 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 = FALSE)
[Package concstats version 0.1.6 Index]