| concstats_inequ | R Documentation |
A set of different inequality and diversity measures.
concstats_inequ(x, normalized = TRUE, type = c("entropy", "gini",
"simpson", "palma", "grs", "all"), na.rm = TRUE, digits = NULL)
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 |
concstats_inequ is a wrapper for the proposed inequality measures.
All measures can be accessed individually.
concstats_entropy() returns the Shannon entropy. concstats_entropy
You can normalize the entropy measures by setting normalized = TRUE.
concstats_gini() calculates the gini coefficient. concstats_gini
You can normalize the gini measures by setting normalized = 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.
The calculated numeric measure or a data frame
concstats_concstats(),concstats_mstruct(),concstats_comp()
Other Concentration and inequality measures:
concstats_all_inequ(),
concstats_entropy(),
concstats_gini(),
concstats_grs(),
concstats_palma(),
concstats_simpson()
# 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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.