| Type: | Package |
| Title: | Market Structure, Concentration and Inequality Measures |
| Version: | 0.2.1 |
| Description: | Based on individual market shares of all participants in a market or space, the package offers a set of different structural and concentration measures frequently - and not so frequently - used in research and in practice. Measures can be calculated in groups or individually. The calculated measure or the resulting vector in table format should help practitioners make more informed decisions. Methods used in this package are from: 1. Chang, E. J., Guerra, S. M., de Souza Penaloza, R. A. & Tabak, B. M. (2005) "Banking concentration: the Brazilian case". 2. Cobham, A. and A. Summer (2013). "Is It All About the Tails? The Palma Measure of Income Inequality". 3. Garcia Alba Idunate, P. (1994). "Un Indice de dominancia para el analisis de la estructura de los mercados". 4. Ginevicius, R. and S. Cirba (2009). "Additive measurement of market concentration" <doi:10.3846/1611-1699.2009.10.191-198>. 5. Herfindahl, O. C. (1950), "Concentration in the steel industry" (PhD thesis). 6. Hirschmann, A. O. (1945), "National power and structure of foreign trade". 7. Melnik, A., O. Shy, and R. Stenbacka (2008), "Assessing market dominance" <doi:10.1016/j.jebo.2008.03.010>. 8. Palma, J. G. (2006). "Globalizing Inequality: 'Centrifugal' and 'Centripetal' Forces at Work". 9. Shannon, C. E. (1948). "A Mathematical Theory of Communication". 10. Simpson, E. H. (1949). "Measurement of Diversity" <doi:10.1038/163688a0>. |
| License: | GPL (≥ 3) |
| URL: | https://github.com/ropensci/concstats/, https://docs.ropensci.org/concstats/ (website) |
| BugReports: | https://github.com/ropensci/concstats/issues/ |
| Depends: | R (≥ 4.1.0) |
| Imports: | checkmate, stats, tibble |
| Suggests: | rmarkdown, knitr, dplyr, devtools, kableExtra, ggplot2, testthat (≥ 3.0.0), covr |
| VignetteBuilder: | knitr, rmarkdown |
| Encoding: | UTF-8 |
| Language: | en-US |
| LazyData: | true |
| Config/testthat/edition: | 3 |
| Config/roxygen2/version: | 8.1.1 |
| NeedsCompilation: | no |
| Packaged: | 2026-10-12 12:08:38 UTC; Acer |
| Author: | Andreas Schneider |
| Maintainer: | Andreas Schneider <schneiderconsultingpy@gmail.com> |
| Repository: | CRAN |
| Date/Publication: | 2026-10-12 12:50:02 UTC |
concstats: Market Structure, Concentration, and Inequality Measures
Description
Based on individual market shares of all participants in a market or space, the package offers a set of different structural and concentration measures frequently - and not so frequently - used in research and in practice. Measures can be calculated in groups or individually. The calculated measure or the resulting vector of measures in table format should help practitioners make more informed decisions. To learn more about how to use concstats, see the vignettes at https://docs.ropensci.org/concstats/ or using the following code in your console:
browseVignettes(package = "concstats")
This package provides a set of functions for calculating measures to get insights of a given market. Measures are, e.g. the Herfindahl-Hirschmann Index (HHI) or its dual, Entropy, Gini or Palmer measure, as well as the Top market performer (by shares). Monitoring markets is particularly useful for government agencies, but also used in research or even on firm level. While all functions rely on individual shares provided by the user, the user might use a helper function to convert variables to shares.
Author(s)
Andreas Schneider schneiderconsultingpy@gmail.com
See Also
Useful links:
-
https://docs.ropensci.org/concstats/ (website)
Report bugs at https://github.com/ropensci/concstats/issues/
A wrapper for the proposed concentration measures
Description
A wrapper for the proposed concentration measures
Usage
concstats_all_comp(x, normalized = FALSE, na.rm = TRUE, digits = NULL)
Arguments
x |
A non-negative numeric vector. The computation yields |
normalized |
Logical. Argument specifying whether or not a normalized
value is required. Must be either |
na.rm |
A logical vector that indicates whether |
digits |
An optional value for digits. Specifies the minimum number of significant digits to be printed in values. |
Details
concstats_all_comp returns all proposed group measures in a one step
procedure with default settings if not otherwise specified.
Value
A data.frame.
See Also
concstats_all_mstruct(), concstats_all_inequ()
Other Competition/Concentration measures:
concstats_comp(),
concstats_dom(),
concstats_hhi(),
concstats_hhi_d(),
concstats_hhi_min(),
concstats_sten()
Examples
# a vector of market shares
x <- c(0.35, 0.4, 0.05, 0.1, 0.06, 0.04)
concstats_all_comp(x, digits = 2)
A wrapper for the proposed inequality measures
Description
A wrapper for the proposed inequality measures
Usage
concstats_all_inequ(x, normalized = TRUE, na.rm = TRUE, digits = NULL)
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 |
digits |
An optional value for digits. Specifies the minimum number of
significant digits to be printed in values. The default is |
Details
concstats_all_inequ returns all proposed group measures in a one step
procedure with default settings if not otherwise specified.
Value
A data.frame.
See Also
concstats_all_mstruct(), concstats_all_comp()
Other Concentration and inequality measures:
concstats_entropy(),
concstats_gini(),
concstats_grs(),
concstats_inequ(),
concstats_palma(),
concstats_simpson()
Examples
# a vector of market shares
x <- c(0.35, 0.4, 0.05, 0.1, 0.06, 0.04)
concstats_all_inequ(x, digits = 2)
A wrapper for the proposed structural measures
Description
A wrapper for the proposed structural measures
Usage
concstats_all_mstruct(x, na.rm = TRUE, digits = NULL)
Arguments
x |
A non-negative numeric vector. |
na.rm |
A logical vector that indicates whether |
digits |
An optional value for digits. Specifies the minimum number of
significant digits to be printed in values. The default is |
Details
concstats_all_mstruct returns all proposed group measures in a
one step procedure with default settings if not otherwise specified.
Value
A data.frame.
See Also
concstats_all_comp(), concstats_all_inequ()
Other Market structure measures:
concstats_firm(),
concstats_mstruct(),
concstats_nrs_eq(),
concstats_top(),
concstats_top3(),
concstats_top3_df(),
concstats_top5(),
concstats_top5_df(),
concstats_top_df()
Examples
# a vector of market shares
x <- c(0.4, 0.2, 0.25, 0.1, 0.05)
concstats_all_mstruct(x, digits = 2)
Group of Concentration Measures
Description
A set of different concentration and competition 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 |
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 |
digits |
A non-null value for digits specifies the minimum number of
significant digits to be printed in values. The default is |
Details
-
concstats_compis a wrapper for the proposed concentration measures. All measures can be accessed individually. -
concstats_hhi()returns the Herfindahl-Hirschman index (HHI).concstats_hhi, can be calculated individually as a normalized measure changing the default setting toTRUE. -
concstats_hhi_d()returns the dual of the HHI. -
concstats_hhi_min()calculates the minimum of the HHI index. -
concstats_dom()calculates the dominance index. -
concstats_sten()calculates the stenbacka index. -
concstats_all_comp()is a wrapper that computes all measures in a one step procedure. For more details or references please see the help page of the respective function.
Value
A single numeric measure in decimal form or data frame.
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.
Alternatively, the user might use concstats_shares() to converting raw
variables, e.g. loans or sales into shares.
See Also
concstats_concstats(), concstats_mstruct(), concstats_inequ()
Other Competition/Concentration measures:
concstats_all_comp(),
concstats_dom(),
concstats_hhi(),
concstats_hhi_d(),
concstats_hhi_min(),
concstats_sten()
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")
# individual measure
concstats_sten(x)
# complete group measures
concstats_comp(x, type = "all", digits = 2)
A set of Market Structure, Concentration, and Inequality Measures
Description
A convenience function which calculates a selected set of different market structure, inequality and concentration measures more or less commonly used, e.g. k-firm ratios, Entropy, HHI, Palma ratio, and others in a one step procedure to provide a first overview.
Usage
concstats_concstats(x, na.rm = TRUE, digits = NULL)
Arguments
x |
A non-negative numeric vector. |
na.rm |
A logical vector that indicates whether |
digits |
A non-null value for digits specifies the minimum number of
significant digits to be printed in values. The default is |
Details
concstats_concstats computes a set of different and selected
structural, inequality, and concentration measures in a one step procedure.
The resulting data frame contains eight measures: number of firms with
market share, numbers equivalent, the cumulative share of the top
(top 3 and top 5) firm(s) in percentage, the hhi index, the entropy index,
and the palma ratio. However, all measures can be computed individually or
in groups.
Value
A data frame of numeric measures with default settings from
the respective individual measure.
Note
The vector of market shares should be in a decimal form corresponding to the total share of individual firms/units. The vector should sum up to 1, otherwise a numeric vector will be converted into decimal form.
See Also
concstats_mstruct(), concstats_comp(), concstats_inequ()
Examples
# a vector of market shares
x <- c(0.35, 0.4, 0.05, 0.1, 0.06, 0.04)
# a selected set of different structural, concentration, and inequality
# measures
concstats_concstats(x, digits = 2)
Dominance Index
Description
An alternative measure which can be used in case of mergers.
Usage
concstats_dom(x, na.rm = TRUE, digits = NULL)
Arguments
x |
A non-negative numeric vector. |
na.rm |
A logical vector that indicates whether |
digits |
An optional value for digits. Specifies the minimum number of
significant digits to be printed in values. The default is |
Details
concstats_dom calculates a dominance index, which measures the
concentration within the Herfindahl-Hirschman index, that is, the
concentration within the concentration.
Value
A single numeric measure in decimal form or, if NAs are present, with a warning.
References
Garcia Alba Idunate, P. (1994). "Un Indice de dominancia para el analisis de la estructura de los mercados". El Trimestre Economico, 61: 499-524.
See Also
Other Competition/Concentration measures:
concstats_all_comp(),
concstats_comp(),
concstats_hhi(),
concstats_hhi_d(),
concstats_hhi_min(),
concstats_sten()
Examples
# a vector of market shares
x <- c(0.35, 0.4, 0.05, 0.1, 0.06, 0.04)
concstats_dom(x, na.rm = FALSE, digits = 2)
# a vector with NA values
x <- c(0.4, 0.2, 0.25, 0.1, 0.05, NA)
concstats_dom(x, digits = 2)
Shannon Entropy
Description
Shannon Entropy
Usage
concstats_entropy(x, normalized = TRUE, na.rm = TRUE, digits = NULL)
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 |
digits |
An optional value for digits. Specifies the minimum number of
significant digits to be printed in values. The default is |
Value
A single numeric measure.
References
Shannon, C. E. (1948). "A Mathematical Theory of Communication", The Bell System Technical Journal (Nokia Bell Labs).
See Also
Other Concentration and inequality measures:
concstats_all_inequ(),
concstats_gini(),
concstats_grs(),
concstats_inequ(),
concstats_palma(),
concstats_simpson()
Examples
# a vector of market shares
x <- c(0.4, 0.2, 0.25, 0.1, 0.05)
concstats_entropy(x, normalized = TRUE)
# a vector with NA values
x <- c(0.4, 0.2, 0.25, 0.1, 0.05, NA)
concstats_entropy(x, na.rm = TRUE, digits = 2)
Number of firms
Description
Number of firms
Usage
concstats_firm(x, na.rm = TRUE)
Arguments
x |
A non-negative numeric vector. |
na.rm |
A logical vector that indicates whether |
Value
A positive integer.
See Also
Other Market structure measures:
concstats_all_mstruct(),
concstats_mstruct(),
concstats_nrs_eq(),
concstats_top(),
concstats_top3(),
concstats_top3_df(),
concstats_top5(),
concstats_top5_df(),
concstats_top_df()
Examples
# a vector of market shares
x <- c(0.4, 0.2, 0.25, 0.1, 0.05)
concstats_firm(x)
Gini coefficient
Description
Gini coefficient
Usage
concstats_gini(x, normalized = TRUE, na.rm = TRUE, digits = NULL)
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 |
digits |
An optional value for digits. Specifies the minimum number of
significant digits to be printed in values. The default is |
Value
A single numeric value.
See Also
Other Concentration and inequality measures:
concstats_all_inequ(),
concstats_entropy(),
concstats_grs(),
concstats_inequ(),
concstats_palma(),
concstats_simpson()
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 = TRUE, digits = 2)
GRS measure
Description
GRS measure
Usage
concstats_grs(x, na.rm = TRUE, digits = NULL)
Arguments
x |
A non-negative numeric vector. |
na.rm |
A logical vector that indicates whether |
digits |
An optional value for digits. Specifies the minimum number of
significant digits to be printed in values. The default is |
Value
A single numeric value.
References
Ginevicius, R. and S. Cirba (2009). "Additive measurement of market concentration", Journal of Business Economics and Management, 10(3), 191-198.
See Also
Other Concentration and inequality measures:
concstats_all_inequ(),
concstats_entropy(),
concstats_gini(),
concstats_inequ(),
concstats_palma(),
concstats_simpson()
Examples
# a vector of market shares
x <- c(0.4, 0.3, 0.2, 0.1)
concstats_grs(x, digits = 3)
#[1] 0.398
# a vector with NA values
x <- c(0.4, 0.2, 0.25, 0.1, 0.05, NA)
concstats_grs(x, na.rm = FALSE)
Herfindahl-Hirschman Index
Description
A measure of industry concentration and widely used in merger control.
Usage
concstats_hhi(x, normalized = FALSE, na.rm = TRUE, digits = NULL)
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 |
digits |
A non-null value for digits specifies the minimum number of
significant digits to be printed in values. The default is |
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.
Hirschman, A. O. (1945), "National power and structure of foreign trade". Berkeley, CA: University of California Press.
See Also
Other Competition/Concentration measures:
concstats_all_comp(),
concstats_comp(),
concstats_dom(),
concstats_hhi_d(),
concstats_hhi_min(),
concstats_sten()
Examples
# a vector of market shares
x <- c(0.35, 0.4, 0.05, 0.1, 0.06, 0.04)
concstats_hhi(x, digits = 2)
# a vector with NA values
x <- c(0.4, 0.2, 0.25, 0.1, 0.05, NA)
concstats_hhi(x, na.rm = TRUE)
Dual of the Herfindahl-Hirschman Index
Description
The dual of the HHI reflects the fraction of participants that do have market participation.
Usage
concstats_hhi_d(x, na.rm = TRUE, digits = NULL)
Arguments
x |
A non-negative numeric vector. |
na.rm |
A logical vector that indicates whether |
digits |
A non-null value for digits specifies the minimum number of
significant digits to be printed in values. The default is |
Details
concstats_hhi_d is the dual of the HHI index, which indicates
the percentage which represents the fraction of the banks that do not have
market participation.
Value
A single numeric value.
References
Chang, E. J., Guerra, S. M., de Souza Penaloza, R. A. & Tabak, B. M. (2005) Banking concentration: the Brazilian case. In Financial Stability Report. Brasilia: Banco Central do Brasil, 4: 109-129.
See Also
Other Competition/Concentration measures:
concstats_all_comp(),
concstats_comp(),
concstats_dom(),
concstats_hhi(),
concstats_hhi_min(),
concstats_sten()
Examples
# a vector of market shares
x <- c(0.35, 0.4, 0.05, 0.1, 0.06, 0.04)
concstats_hhi_d(x)
# a vector with NA values
x <- c(0.4, 0.2, 0.25, 0.1, 0.05, NA)
concstats_hhi_d(x, na.rm = TRUE, digits = 2)
Minimum of Herfindahl-Hirschman Index
Description
Minimum of Herfindahl-Hirschman Index
Usage
concstats_hhi_min(x, na.rm = TRUE, digits = NULL)
Arguments
x |
A non-negative numeric vector. |
na.rm |
A logical vector that indicates whether |
digits |
A non-null value for digits specifies the minimum number of
significant digits to be printed in values. The default is |
Details
Calculates the minimum of the Herfindahl-Hirschman index, that is, the equivalent of all participants in the market with equal market shares.
Value
A single numeric measure in decimal form.
See Also
Other Competition/Concentration measures:
concstats_all_comp(),
concstats_comp(),
concstats_dom(),
concstats_hhi(),
concstats_hhi_d(),
concstats_sten()
Examples
# a vector of market shares
x <- c(0.35, 0.4, 0.05, 0.1, 0.06, 0.04)
concstats_hhi_min(x, digits = 2)
# a vector with NA values
x <- c(0.4, 0.2, 0.25, 0.1, 0.05, NA)
concstats_hhi_min(x, na.rm = FALSE)
Inequality and Diversity Measures
Description
A set of different inequality and diversity measures.
Usage
concstats_inequ(x, normalized = TRUE, type = c("entropy", "gini",
"simpson", "palma", "grs", "all"), na.rm = TRUE, digits = NULL)
Arguments
x |
A non-negative numeric vector. |
normalized |
Logical. Argument of the functions
|
type |
A character string of the measure to be calculated, defaults to
|
na.rm |
A logical vector that indicates whether |
digits |
A non-null value for digits specifies the minimum number of
significant digits to be printed in values. The default is |
Details
-
concstats_inequis a wrapper for the proposed inequality measures. All measures can be accessed individually. -
concstats_entropy()returns the Shannon entropy.concstats_entropyYou can normalize the entropy measures by settingnormalized = TRUE. -
concstats_gini()calculates the gini coefficient.concstats_giniYou can normalize the gini measures by settingnormalized = TRUE. -
concstats_simpson()calculates the gini-simpson index. -
concstats_palma()calculates the palma ratio of inequality. -
concstats_grs()calculates an alternative concentration measure. -
concstats_all_inequ()returns all measures in a one step procedure. For more details or references please see the help page of the respective function.
Value
The calculated numeric measure or a data frame
See Also
concstats_concstats(),concstats_mstruct(),concstats_comp()
Other Concentration and inequality measures:
concstats_all_inequ(),
concstats_entropy(),
concstats_gini(),
concstats_grs(),
concstats_palma(),
concstats_simpson()
Examples
# a vector of market shares
x <- c(0.4, 0.2, 0.25, 0.1, 0.05)
# Calculate the Palma ratio
concstats_inequ(x, type = "palma")
# Calculate the entropy measure directly
concstats_inequ(x, normalized = TRUE, type = "entropy")
# Calculate the group measures
concstats_inequ(x, type = "all", digits = 2)
Market Structure Measures
Description
Set of different market structure measures to reflect a given market structure.
Usage
concstats_mstruct(x, type = c("firm", "nrs_eq", "top", "top3", "top5",
"all"), na.rm = TRUE, digits = NULL)
Arguments
x |
A non-negative numeric vector. |
type |
A character string of the measure to be calculated, can be abbreviated with the first letter. Defaults to "firm". Input is not case-sensitive. |
na.rm |
A logical vector that indicates whether |
digits |
A non-null value for digits specifies the minimum number
of significant digits to be printed in values. The default is
|
Details
-
concstats_mstructis a wrapper for the proposed structural measures. -
concstats_firm(), returns the number of firms with a given market share. -
concstats_nrs_eq()computes the reciprocal of the HHI, which indicates the equivalent number of firms of the same size. -
concstats_top(),concstats_top3(), andconcstats_top5()calculate the cumulative share of the top (top 3 and top 5) firm(s) and returns the value in percentage. -
concstats_all_mstruct()computes all measures in a one step procedure. All measures can be computed individually. -
concstats_top_df(),concstats_top3_df(), andconcstats_top5_df()are slight variations. Firm id or ranking might be of interest. In this case an additional id or firm variable is needed. The functions will return a data frame. These functions are just individually accessible.
Value
A single calculated numeric measure or data frame.
Note
The vector of market shares should be in a decimal form
corresponding to total shares of individual firms/units. The sum of
the vector should sum up to 1. Alternatively, the user might use
concstats_shares() to converting raw variables, e.g. loans or sales
into shares.
See Also
concstats_concstats(),concstats_comp(),concstats_inequ()
Other Market structure measures:
concstats_all_mstruct(),
concstats_firm(),
concstats_nrs_eq(),
concstats_top(),
concstats_top3(),
concstats_top3_df(),
concstats_top5(),
concstats_top5_df(),
concstats_top_df()
Examples
# a vector of market shares
x <- c(0.35, 0.4, 0.05, 0.1, 0.06, 0.04)
concstats_mstruct(x, type = "firm", digits = 1)
# Calculate the market structure group measures
concstats_mstruct(x, type = "all", digits = 2)
Numbers equivalent
Description
Numbers equivalent
Usage
concstats_nrs_eq(x, na.rm = TRUE, digits = NULL)
Arguments
x |
A non-negative numeric vector. |
na.rm |
A logical vector that indicates whether |
digits |
An optional value for digits. Specifies the minimum number of
significant digits to be printed in values. The default is |
Value
A positive numeric value, rounded to the second decimal place.
See Also
Other Market structure measures:
concstats_all_mstruct(),
concstats_firm(),
concstats_mstruct(),
concstats_top(),
concstats_top3(),
concstats_top3_df(),
concstats_top5(),
concstats_top5_df(),
concstats_top_df()
Examples
# a vector of market shares
x <- c(0.4, 0.2, 0.25, 0.1, 0.05)
concstats_nrs_eq(x, digits = 2)
Palma ratio
Description
The Palma ratio is an alternative to the Gini index. The ratio focuses on the differences between those in the top and bottom income brackets.
Usage
concstats_palma(x, na.rm = TRUE, digits = NULL)
Arguments
x |
A non-negative numeric vector. |
na.rm |
A logical vector that indicates whether |
digits |
An optional value for digits. Specifies the minimum number of
significant digits to be printed in values. The default is |
Details
concstats_palma measures the ratio of inequality (normally used with
income inequality) of the top 10 percent to the bottom 40 percent.
Value
A single numeric measure.
References
Palma, J. G. (2006). "Globalizing Inequality: 'Centrifugal' and 'Centripetal' Forces at Work", DESA Working Paper No. 35.
See Also
Other Concentration and inequality measures:
concstats_all_inequ(),
concstats_entropy(),
concstats_gini(),
concstats_grs(),
concstats_inequ(),
concstats_simpson()
Examples
# a vector of market shares
x <- c(0.4, 0.2, 0.25, 0.1, 0.05)
concstats_palma(x)
concstats_palma(x, digits = 2)
# a vector with NA values
x <- c(0.4, 0.2, 0.25, 0.1, 0.05, NA)
concstats_palma(x, na.rm = FALSE)
shares
Description
The concstats_shares function is a helper function making it easier
to convert numeric variable into individual shares. This might be convenient
for larger vectors.
Usage
concstats_shares(x, na.rm = TRUE, digits = NULL)
Arguments
x |
A non-negative numeric vector. |
na.rm |
A logical vector that indicates whether |
digits |
An optional value for digits. Specifies the minimum number of
significant digits to be printed in values. The default is |
Details
concstats_shares is a helper function. The user can manually
convert or provide numerical vectors of shares or use
constats_shares.
Value
A numeric vector in decimal form.
Examples
# a vector of loans (without special characters, e.g. currency symbols)
x <- c(538572286.08, 481096.77, 161914143.03, 128796268.59, 69055940.72)
concstats_shares(x)
# a vector with NA values
x2 <- c(538572286.08, 481096.77, 161914143.03, 128796268.59, 69055940.72, NA)
concstats_shares(x2, na.rm = TRUE, digits = 3)
Gini-Simpson Index
Description
Gini-Simpson Index
Usage
concstats_simpson(x, na.rm = TRUE, digits = NULL)
Arguments
x |
A non-negative numeric vector. |
na.rm |
A logical vector that indicates whether |
digits |
An optional value for digits. Specifies the minimum
number of significant digits to be printed in values. The default is
|
Details
concstats_simpson is the Gini-Simpson index, also
known as the Gini impurity (Gini's diversity index) in Machine
Learning, Gibbs-Martin index or Blau index in sociology and management
studies. This index ranges from {0, 1}.
Value
A single numeric value in decimal form.
References
Simpson, E. H. (1949). "Measurement of Diversity", Nature, 163, 688.
Jost, L. (2006). "Entropy and Diversity". Oikos, 113(2), 363-375.
See Also
Other Concentration and inequality measures:
concstats_all_inequ(),
concstats_entropy(),
concstats_gini(),
concstats_grs(),
concstats_inequ(),
concstats_palma()
Examples
# a vector of market shares
x <- c(0.4, 0.2, 0.25, 0.1, 0.05)
concstats_simpson(x)
concstats_simpson(x, digits = 2)
# a vector with NA values
x <- c(0.4, 0.2, 0.25, 0.1, 0.05, NA)
concstats_simpson(x, na.rm = TRUE)
Stenbacka Index
Description
The measure suggests an approach that classifies when an individual firm has a dominant position and therefore assesses market dominance.
Usage
concstats_sten(x, na.rm = TRUE, digits = NULL)
Arguments
x |
A non-negative numeric vector. |
na.rm |
A logical vector that indicates whether |
digits |
An optional value for digits. Specifies the minimum
number of significant digits to be printed in values. The default is
|
Details
concstats_sten calculates the Stenbacka index,
which indicates the market share of a dominant position.
Value
A single numeric measure in decimal form.
References
Melnik, A., Shy, Oz, Stenbacka, R., (2008), "Assessing market dominance", Journal of Economic Behavior and Organization, 68: pp. 63-72.
See Also
Other Competition/Concentration measures:
concstats_all_comp(),
concstats_comp(),
concstats_dom(),
concstats_hhi(),
concstats_hhi_d(),
concstats_hhi_min()
Examples
# a vector of market shares
x <- c(0.35, 0.4, 0.05, 0.1, 0.06, 0.04)
concstats_sten(x, digits = 2)
concstats_sten(x, digits = 3)
# a vector with NA values
x <- c(0.4, 0.2, 0.25, 0.1, 0.05, NA)
concstats_sten(x, na.rm = TRUE)
Top market share
Description
Top market share
Usage
concstats_top(x, na.rm = TRUE, digits = NULL)
Arguments
x |
A non-negative numeric vector. |
na.rm |
A logical vector that indicates whether |
digits |
An optional value for digits. Specifies the minimum number of
significant digits to be printed in values. The default is |
Value
A positive numeric value, which indicates the top market share in percent.
See Also
Other Market structure measures:
concstats_all_mstruct(),
concstats_firm(),
concstats_mstruct(),
concstats_nrs_eq(),
concstats_top3(),
concstats_top3_df(),
concstats_top5(),
concstats_top5_df(),
concstats_top_df()
Examples
# a vector of market shares
x <- c(0.4, 0.2, 0.25, 0.1, 0.05)
concstats_top(x, digits = 2)
Top 3 market share
Description
Top 3 market share
Usage
concstats_top3(x, na.rm = TRUE, digits = NULL)
Arguments
x |
A non-negative numeric vector. |
na.rm |
A logical vector that indicates whether |
digits |
An optional value for digits. Specifies the minimum number of
significant digits to be printed in values. The default is |
Value
A positive numeric value, which indicates the cumulative sum of the top 3 market shares as a percentage.
See Also
Other Market structure measures:
concstats_all_mstruct(),
concstats_firm(),
concstats_mstruct(),
concstats_nrs_eq(),
concstats_top(),
concstats_top3_df(),
concstats_top5(),
concstats_top5_df(),
concstats_top_df()
Examples
# a vector of market shares
x <- c(0.4, 0.2, 0.25, 0.1, 0.05)
concstats_top3(x, digits = 2)
Top market share data frame
Description
Top market share data frame
Usage
concstats_top3_df(x, y, digits = NULL)
Arguments
x |
A data frame or tibble. |
y |
A non-negative vector of shares. All integers (e.g. sales) are converted to relative decimal numbers. |
digits |
An optional value for digits. Specifies the minimum number of
significant digits to be printed in values. The default is |
Value
A data frame.
Note
Note that the first column in your data frame will be the index and values should be unique.
See Also
Other Market structure measures:
concstats_all_mstruct(),
concstats_firm(),
concstats_mstruct(),
concstats_nrs_eq(),
concstats_top(),
concstats_top3(),
concstats_top5(),
concstats_top5_df(),
concstats_top_df()
Examples
x <- data.frame(
firm = c("A", "B", "C", "D", "E"),
share = c(0.2,0.25,0.1,0.05,0.4)
)
concstats_top3_df(x, "share", digits = 2)
Top 5 market share
Description
Top 5 market share
Usage
concstats_top5(x, na.rm = TRUE, digits = NULL)
Arguments
x |
A non-negative numeric vector. |
na.rm |
A logical vector that indicates whether |
digits |
An optional value for digits. Specifies the minimum number of
significant digits to be printed in values. The default is |
Value
A positive numeric value, which indicates the cumulative sum of the top 5 market shares as a percentage.
See Also
Other Market structure measures:
concstats_all_mstruct(),
concstats_firm(),
concstats_mstruct(),
concstats_nrs_eq(),
concstats_top(),
concstats_top3(),
concstats_top3_df(),
concstats_top5_df(),
concstats_top_df()
Examples
# a vector of market shares
x <- c(0.4, 0.2, 0.25, 0.1, 0.05)
concstats_top5(x, digits = 2)
Top 5 market shares data frame
Description
Top 5 market shares data frame
Usage
concstats_top5_df(x, y, digits = NULL)
Arguments
x |
A data frame or tibble. |
y |
A non-negative vector of shares. All integers (e.g. sales) are converted to relative decimal numbers. |
digits |
An optional value for digits. Specifies the minimum number of
significant digits to be printed in values. The default is |
Value
A data frame.
Note
Note that the first column in your data frame will be the index and values should be unique.
See Also
Other Market structure measures:
concstats_all_mstruct(),
concstats_firm(),
concstats_mstruct(),
concstats_nrs_eq(),
concstats_top(),
concstats_top3(),
concstats_top3_df(),
concstats_top5(),
concstats_top_df()
Examples
x <- data.frame(
firm = c("A", "B", "C", "D", "E"),
share = c(0.2,0.25,0.1,0.05,0.4)
)
concstats_top5_df(x, "share", digits = 2)
Top market share data frame
Description
Top market share data frame
Usage
concstats_top_df(x, y, digits = NULL)
Arguments
x |
A data frame or tibble. |
y |
A non-negative vector of shares. All integers (e.g. sales) are converted to relative decimal numbers. |
digits |
An optional value for digits. Specifies the minimum number of
significant digits to be printed in values. The default is |
Value
A data frame.
Note
Note that the first column in your data frame will be the index and values should be unique.
See Also
Other Market structure measures:
concstats_all_mstruct(),
concstats_firm(),
concstats_mstruct(),
concstats_nrs_eq(),
concstats_top(),
concstats_top3(),
concstats_top3_df(),
concstats_top5(),
concstats_top5_df()
Examples
x <- data.frame(
firm = c("A", "B", "C", "D", "E"),
share = c(0.2,0.25,0.1,0.05,0.4)
)
concstats_top_df(x, "share", digits = 2)
Creditcoops
Description
data set with 22 paired Paraguayan credit cooperatives (2016, 2018)
Usage
data(creditcoops)
Format
A data frame with 44 rows and 5 variables:
coop_iddouble, ID of the credit cooperative
yearinteger, sample year
total_loansdouble, total loans granted (USD) per year and cooperative
pairedinteger, paires of cooperatives
total_loans_logdouble, the natural log of total loans
Note
real names of the cooperatives have been purposely omitted, but are available on request.
Author(s)
Andreas Schneider
Source
Examples
data("creditcoops")
head(creditcoops)