A set of different concentration measures.
Usage
concstats_comp(x, normalized = FALSE, type = c("hhi", "hhi_d", "hhi_min",
"dom", "sten", "all"), na.rm = TRUE, digits = NULL)
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
orFALSE
. The default isFALSE
.- type
A character string of the measure to be calculated, can be abbreviated with the first letter. Defaults to "hhi". Input is not case-sensitive.
- na.rm
A logical vector that indicates whether
NA
values should be excluded or not. If set toFALSE
the computation yieldsNA
if vector containsNA
values. Must be eitherTRUE
orFALSE
. Defaults toTRUE
.- digits
A non-null value for digits specifies the minimum number of significant digits to be printed in values. The default is
NULL
and will use base R print option. Significant digits defaults to 7.
Details
concstats_comp
is a wrapper for the proposed concentration measures
concstats_hhi()
, concstats_hhi_d()
, concstats_dom()
,
concstats_hhi_min()
, concstats_sten()
, concstats_all_comp()
.
If no measure is specified "hhi" will be the default.
concstats_hhi
, can be calculated individually as a normalized
measure changing the default setting to TRUE
.
concstats_all_comp
computes all measures in a one step procedure.
For more details or references please see the help page of the respective
function.
Note
The vector of market shares should be in a decimal form corresponding to total shares of individual firms/units. The vector should sum up to 1.
Examples
# a vector of market shares
x <- c(0.35, 0.4, 0.05, 0.1, 0.06, 0.04)
# the Herfindahl-Hirschman index of the vector
concstats_comp(x, type = "hhi")
#> [1] 0.3002
# individual measure
concstats_sten(x)
#> [1] 48.125
# complete group measures
concstats_comp(x, type = "all", digits = 2)
#> Measure Value
#> 1 HHI 0.30
#> 2 HHI(min) 0.17
#> 3 HHI(dual) 0.44
#> 4 Dominance 0.45
#> 5 Stenbacka(%) 48.12