concstats_inequ {concstats}  R Documentation 
Inequality and Diversity Measures
Description
A set of different inequality and diversity measures.
Usage
concstats_inequ(x, normalized = FALSE, type = c("entropy", "gini",
"simpson", "palma", "grs", "all"), na.rm = TRUE, digits = NULL)
Arguments
x 
A nonnegative 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 nonnull value for digits specifies the minimum number of
significant digits to be printed in values. The default is 
Details
concstats_inequ
is a wrapper for the proposed inequality measures
concstats_entropy()
, concstats_gini()
,concstats_simpson()
,
concstats_palma()
,concstats_grs()
, concstats_all_inequ()
If no measure is specified, concstats_entropy
is the default.
concstats_entropy
returns the Shannon Entropy (Shannon, 1948),
concstats_gini
is the Gini coefficient. You can normalize the
Entropy and Gini measures by setting normalized = TRUE
concstats_palma
measures the ratio of inequality (normally used in
the context of measuring income inequality) of the top 10 percent to the
bottom 40 percent (Palma, 2006).
concstats_grs
is an alternative inequality measure (Ginevicius, 2009)
and
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()
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_entropy(x, normalized = TRUE)
# Calculate the group measures
concstats_inequ(x, type = "all", digits = 2)