herfindahl_index: Herfindahl-Hirschman concentration of evidence contributions

View source: R/belief_trajectory.R

herfindahl_indexR Documentation

Herfindahl-Hirschman concentration of evidence contributions

Description

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).

Usage

herfindahl_index(weights)

Arguments

weights

Numeric vector of per-step contributions.

Details

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.

Value

Numeric scalar in [1/T, 1]. Returns 0 if all weights are zero.

See Also

concentration_index, shannon_concentration.

Examples

herfindahl_index(rep(1, 10))           # 0.1
herfindahl_index(c(10, rep(0.1, 9)))  # ~0.92


mispitools documentation built on Aug. 26, 2026, 1:08 a.m.