Learn R Programming

SciencesPo (version 1.3.9)

herfindahl: Herfindahl Index of Concentration

Description

Calculates the Herfindahl Index of concentration.

Usage

herfindahl(x, n = rep(1, length(x)), parameter = 1, na.rm = FALSE, ...)

herfindahl(x, n = rep(1, length(x)), parameter = 1, na.rm = FALSE, ...)

Arguments

x
A vector of data values of non-negative elements.
n
A vector of frequencies of the same length as x.
parameter
A parameter of the concentration measure (if set to NULL the default parameter of the respective measure is used).
na.rm
A logical. Should missing values be removed? The Default is set to na.rm=FALSE.
...
Additional arguements (currently ignored)

encoding

UTF-8

Details

This index is also known as the Simpson Index in ecology, the Herfindahl-Hirschman Index (HHI) in economics, and as the Effective Number of Parties (ENP) in political science.

References

Cowell, F. A. (2000) Measurement of Inequality in Atkinson, A. B. / Bourguignon, F. (Eds): Handbook of Income Distribution. Amsterdam.

Cowell, F. A. (1995) Measuring Inequality Harvester Wheatshef: Prentice Hall.

See Also

atkinson, rosenbluth, politicalDiversity, gini. For more details see the Indices vignette: vignette("Indices", package = "SciencesPo").

Examples

Run this code
# generate a vector (of incomes)
x <- c(778, 815, 857, 888, 925, 930, 965, 990, 1012)

# compute the Herfindahl coefficient with parameter=1
herfindahl(x, parameter=1)

Run the code above in your browser using DataLab