| concstats_entropy | R Documentation |
Shannon Entropy
concstats_entropy(x, normalized = TRUE, na.rm = TRUE, digits = NULL)
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 |
A single numeric measure.
Shannon, C. E. (1948). "A Mathematical Theory of Communication", The Bell System Technical Journal (Nokia Bell Labs).
Other Concentration and inequality measures:
concstats_all_inequ(),
concstats_gini(),
concstats_grs(),
concstats_inequ(),
concstats_palma(),
concstats_simpson()
# 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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.