When working with indices it can be instructive to decompose changes, holding variation components constant. I find this tough when working with indices such as Herfindahl or Simpson's Diversity Index. To illustrate think of the Herfindahl index at time $t$ for sector $M$ being defined as
$$HHI_{M,t} = \left(\frac{x_{j,t}}{\Sigma_{j = 1}^n(x_{j,t})}\right)^2$$
where $x_{j,t}$ is the revenue in company $x$ at time $t$. In other words HHI is simply the "sum of squared shares". If we assume that M is composed of several smaller sub-sectors, $K$. If we wanna decompose changes in M into contribution from sub-sector K, we can defined weights as
$$w_{K,t} = \left(\frac{\Sigma(x_{K,t})}{\Sigma(x_{M,t})} \right)^2 $$
and then we can calculate the contribution from sub-sector $K$ to the change in the HHI of sector $M$ as $cont_{K,M,t} = w_{K,t} HHI_{K,t} - w_{K,t-1} HHI_{K,t-1}$. So far so good. However, what I am really after is the contribution of say the size of one subsector. That is, even if HHI is unchanged in all $K$'s you might have revenue in one has grown more than the others between two years, and thus changes HHI in $M$.
A (naive?) attempt at calculating this is $cont = w_{K,t} HHI_{K,t-1} - w_{K,t-1} HHI_{K,t-1}$. However, if I do the same holding size constant and add the two I do not get the actual change in HHI for M. I assume I am lacking some term, but cannot for the life of me figure out what term that might be.