% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/panel_utils.R
\name{.lag_panel}
\alias{.lag_panel}
\title{Panel-aware lag}
\usage{
.lag_panel(panel, vars, k = 1L)
}
\arguments{
\item{panel}{A panel data.frame from \code{.make_panel()}.}

\item{vars}{Character vector of column names to lag.}

\item{k}{Integer lag order (positive = lag, negative = lead).}
}
\value{
A data.frame (or vector if single var) of lagged values, same
length as \code{nrow(panel)}.
}
\description{
Computes lagged values within each cross-sectional unit. Returns \code{NA} for
the first \code{k} observations of each unit to avoid cross-unit contamination.
}
\keyword{internal}
