concstats_hhi {concstats} | R Documentation |
Herfindahl-Hirschman Index
concstats_hhi(x, normalized = FALSE, na.rm = TRUE)
x |
A non-negative numeric vector. |
normalized |
Logical. Argument specifying whether or not a normalized
value is required. Ranges from 0, 1 and often used for comparison over
time. Must be either |
na.rm |
A logical vector that indicates whether |
concstats_hhi
calculates the widely used Herfindahl-Hirschman
Index (Herfindahl, 1950 and Hirschman, 1945). The index is calculated by
squaring the market share of each firm competing in the market and then
summing the resulting numbers.
A single numeric measure in decimal form.
Herfindahl, O. C. (1950), "Concentration in the steel industry" (PhD thesis), Columbia University.
Hirschmann, A. O. (1945), "National power and structure of foreign trade". Berkeley, CA: University of California Press.
# a vector of market shares
x <- c(0.35, 0.4, 0.05, 0.1, 0.06, 0.04)
concstats_hhi(x)
# a vector with NA values
x <- c(0.4, 0.2, 0.25, 0.1, 0.05, NA)
concstats_hhi(x, na.rm = FALSE)