
Decompose aggregate average-compensation growth into within, between, cross, entry, and exit effects (Foster-Haltiwanger-Krizan style)
compute_wage_decomposition.RdTakes the per-group output of compute_growth_decomposition() and answers a different question than that function does: not "why did group i's own wagebill change" but "why did average compensation across ALL groups combined change" – specifically, how much is pay growth within groups versus a shift in headcount share toward higher- or lower-paid groups.
Value
A data.table, one row per ref_date (or per ref_date x group_cols),
with avg_compensation, avg_compensation_lag, within_effect,
between_effect, cross_effect, entry_effect, exit_effect, and total_effect
(which equals avg_compensation - avg_compensation_lag by construction,
except at the panel's first period, which is NA – no lagged baseline).