concstats_hhi {concstats}R Documentation

Herfindahl-Hirschman Index

Description

Herfindahl-Hirschman Index

Usage

concstats_hhi(x, normalized = FALSE, na.rm = TRUE)

Arguments

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 TRUE or FALSE. The default is FALSE.

na.rm

A logical vector that indicates whether NA values should be excluded or not. Must be either TRUE or FALSE. The default is TRUE. If set to FALSE the computation yields NA if NA values are present.

Details

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.

Value

A single numeric measure in decimal form.

References

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.

Examples

# 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)


[Package concstats version 0.1.6 Index]