Augments a data frame with the unit-level means of the time-varying numeric
covariates in formula, and returns the augmented formula and data. Fitting
any of the package's estimators on the result implements the Mundlak /
correlated-random-effects specification: the coefficients on the original
covariates recover the within-unit (fixed-effects-consistent) effects, while
the coefficients on the unit means capture (and test) the correlation between
the covariates and the unit effect. It is a lighter, between-variation-preserving
alternative to full fixed effects, and it is model-agnostic — the same device
feeds cpb(), gec(), or count_reg().
Value
A list with formula (the augmented formula), data (the augmented
data frame), and added (the names of the unit-mean columns).