Learn R Programming

dcce (version 0.4.2)

.csdl_augment: Augment a CS-DL panel with first-difference lags of the regressors

Description

Given a panel and the list of base regressor names, attach columns for the first difference of each regressor and its lags 1, ..., 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.

Usage

.csdl_augment(panel, y_name, x_names, p_x = 3L)

Value

A list with

panel

Augmented panel with new columns.

y_diff_name

Name of the first-difference dependent variable.

rhs_terms

Character vector: level x + lagged \(\Delta x\) terms for the CS-DL regression.

lr_names

Character vector: column names whose coefficients are the long-run effects (one per base x).

Arguments

panel

A panel data.frame with unit_var/time_var attributes.

y_name

Character scalar: dependent variable name.

x_names

Character vector: base regressor names (levels).

p_x

Integer: number of \(\Delta x\) lags to include (default 3).