View source: R/belief_trajectory.R
| herfindahl_index | R Documentation |
Computes the Herfindahl-Hirschman index on the normalized per-step
contributions. A robustness check / alternative concentration measure to
concentration_index. Ranges from 1/T (uniform) to
1 (single-step dominance).
herfindahl_index(weights)
weights |
Numeric vector of per-step contributions. |
H(w) = \sum_{k=1}^T p_k^2, \qquad p_k = \frac{|w_k|}{\sum_j |w_j|}
Unlike concentration_index (which depends only on the
maximum and the sum), Herfindahl depends on the full distribution of
weights and is therefore more sensitive to "second-tier" contributors.
Numeric scalar in [1/T, 1]. Returns 0 if all weights
are zero.
concentration_index,
shannon_concentration.
herfindahl_index(rep(1, 10)) # 0.1
herfindahl_index(c(10, rep(0.1, 9))) # ~0.92
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.