% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/est_csdl.R
\name{.csdl_augment}
\alias{.csdl_augment}
\title{Augment a CS-DL panel with first-difference lags of the regressors}
\usage{
.csdl_augment(panel, y_name, x_names, p_x = 3L)
}
\arguments{
\item{panel}{A panel data.frame with \code{unit_var}/\code{time_var}
attributes.}

\item{y_name}{Character scalar: dependent variable name.}

\item{x_names}{Character vector: base regressor names (levels).}

\item{p_x}{Integer: number of \eqn{\Delta x} lags to include (default 3).}
}
\value{
A list with
\describe{
\item{panel}{Augmented panel with new columns.}
\item{y_diff_name}{Name of the first-difference dependent variable.}
\item{rhs_terms}{Character vector: level x + lagged \eqn{\Delta x}
terms for the CS-DL regression.}
\item{lr_names}{Character vector: column names whose coefficients are
the long-run effects (one per base x).}
}
}
\description{
Given a panel and the list of base regressor names, attach columns for
the first difference of each regressor and its lags 1, ..., \code{p_x},
and also the first difference of the dependent variable (used as the
CS-DL LHS). The returned list contains the augmented panel plus the
vectors of column names that should be used on the LHS and RHS of the
CS-DL regression.
}
\keyword{internal}
