% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/csa_utils.R
\name{.build_global_csa}
\alias{.build_global_csa}
\title{Build cross-sectional averages from a wider sample}
\usage{
.build_global_csa(panel, full_panel, vars, lags = 0L)
}
\arguments{
\item{panel}{A panel data.frame (estimation sample).}

\item{full_panel}{A panel data.frame (wider sample for computing averages).}

\item{vars}{Character vector of variable names.}

\item{lags}{Integer or named integer vector of CSA lags.}
}
\value{
\code{panel} with CSA columns appended (computed from \code{full_panel}).
}
\description{
Computes cross-sectional means using \code{full_panel} (a broader sample) and
merges them into \code{panel} (the estimation sample). Useful when the estimation
sample is a subset of the available data.
}
\keyword{internal}
