Computes cross-sectional means using full_panel (a broader sample) and
merges them into panel (the estimation sample). Useful when the estimation
sample is a subset of the available data.
.build_global_csa(panel, full_panel, vars, lags = 0L)panel with CSA columns appended (computed from full_panel).
A panel data.frame (estimation sample).
A panel data.frame (wider sample for computing averages).
Character vector of variable names.
Integer or named integer vector of CSA lags.