Title

xtdynestimb -- Dynamic linear panel-data estimators robust to
structural breaks, long-T overidentification, and error cross-sectional
dependence

Syntax

xtdynestimb subcommand depvar [indepvars] [if] [in]
[, options]

where subcommand is one of:

subcommand

dd Difference / System / Double-D GMM,
robust to structural breaks (Chowdhury & Russell 2017)

csdgmm CSD-robust GMM via time-demeaning +
partial instruments (Sarafidis 2009)

ablasso Arellano-Bond LASSO for long-T
panels, with cross-fitting (Chernozhukov et al. 2024)

dabss Debiased Arellano-Bond via split-panel
jackknife (Chen, Chernozhukov & Fernandez-Val 2019)

breaks Bai-Perron structural-break / regime
detection (Chowdhury-Russell Table A1 step)

table Journal-style comparison table across
estimators (Chowdhury-Russell Table 7 layout)

graph Coefficient plot after estimation

depvar is the dependent variable. indepvars (optional) are treated as
strictly exogenous additional regressors. The lagged dependent variable is
generated automatically from lags(); do not include it in
indepvars. The data must be xtset.

Description

xtdynestimb estimates the dynamic linear panel-data model

y_it = a_1 y_i,t-1 + ... + a_p y_i,t-p +
x_it' b + eta_i [+ f_t] + v_it

with three modern estimators that each address a different failure of the
textbook Arellano-Bond / Blundell-Bond GMM estimator:

o Structural breaks. Mean shifts in the fixed effects invalidate the
standard difference and system moment conditions. dd
adds the break-robust double-difference moment conditions of Chowdhury &
Russell (2017) (both the instruments and the equation are in
differences) and offers five nested estimators.

o Error cross-sectional dependence. Common factors make the lagged-level
instruments invalid. csdgmm removes the common
factors by cross-sectional (time) demeaning and, optionally, restricts the
instrument set to the regressors only (Sarafidis 2009).

o Long-T overidentification bias. When T is large the number of
AB moment conditions grows like T^2, biasing the estimator.
ablasso uses period-by-period LASSO to keep only the
most informative instruments and cross-fitting to remove the over-fitting bias
(Chernozhukov, Fernandez-Val, Huang & Wang 2024).

All three are estimation commands: they post e(b) and e(V), so
you can use test, lincom, nlcom (e.g. for long-run
effects), estimates, predict and the companion specification
tests in xtdyntest. The engine is self-contained Mata; no other package
is required.

Subcommands (click for full help)

xtdynestimb dd -- Difference, System and
Double-D GMM under structural breaks; variant() selects
difference, system, ddback, ddforward or full;
compare estimates all five side by side.

xtdynestimb csdgmm -- CSD-robust GMM;
time-demeaning on by default; partial uses regressor-only instruments.

xtdynestimb ablasso -- Arellano-Bond
LASSO; crossfit turns on sample-splitting / cross-fitting (AB-LASSO-SS).

Options common to the GMM subcommands (dd, csdgmm)

lags(#) autoregressive order p; default lags(1)

gmmlags(min max) lag window for the GMM (level) instruments;
default gmmlags(2 .) (all available lags >= 2)

twostep two-step efficient GMM (the default)

onestep one-step GMM with a fully robust variance

nowindmeijer suppress the Windmeijer (2005) finite-sample
correction of the two-step variance

notable suppress the output table

graph draw a coefficient plot (see below)

graphname(name) name for the graph

level(#) confidence level; default level(95)

Subcommand-specific options are documented on each subcommand's help page.

Debiased Arellano-Bond (DAB-SS)

xtdynestimb dabss depvar [indepvars] [if] [in] [,
lags(#) gmmlags(min max) onestep graph] implements the
debiased Arellano-Bond estimator that splits the cross-section in half, estimates
AB on each half, and combines 2*AB(full) - mean of the two halves to remove
the O(T/N) many-moment bias (Chen, Chernozhukov & Fernandez-Val 2019,
applying the split-panel jackknife of Dhaene & Jochmans 2015). This is the
DAB-SS column of the AB-LASSO paper's Table 5.1. (For the fixed-effects /
within version of the split-panel jackknife see the xtspj package.)

. xtdynestimb dabss Y D Cvars, lags(4)

Structural-break / regime detection (Table A1 step)

The empirical workflow of Chowdhury & Russell (2017) has two outputs: first
the structural breaks are detected (their Table A1), then the break-robust
estimators are applied (their Table 7). xtdynestimb breaks performs the
first step:

xtdynestimb breaks depvar [if] [in] [,
maxbreaks(#) minlength(#) notable]

It aggregates depvar cross-sectionally (the mean across panel units at each
period) and applies a Bai & Perron (1998) dynamic-programming multiple-mean-shift
search, choosing the number of breaks by BIC. It reports the regimes, their date
ranges and the mean of depvar in each regime (the Table A1 layout), and
returns r(regimes), r(nbreaks), r(nregimes). Use it to justify
the break-robust estimators. minlength() is the minimum regime length
(default 15% of T); maxbreaks() caps the number of breaks.

. xtdynestimb breaks loangrowth, minlength(5)

Comparison table (empirical-application layout)

xtdynestimb table depvar [indepvars] [if] [in] [,
lags(#) gmmlags(min max) estimators(list)
longrun breaks onestep title(string)] reproduces the
multi-estimator results table of an empirical paper (e.g. Chowdhury & Russell
2017, Table 7): one column per estimator, coefficients with significance stars
and standard errors, followed by a diagnostics block (units, observations,
instruments, Hansen J p-value, and the Arellano-Bond AR(1)/AR(2)
serial-correlation p-values).

longrun reports the long-run coefficients of the regressors,
b_x/(1-Sa), with delta-method standard errors (the lagged-dependent
coefficient is left in short-run form). srlr reports both a short-run
and a long-run row for each regressor (the AB-LASSO paper's Table 5.1 layout).
breaks prepends the Bai-Perron regime table (the Table A1 step) so the full
empirical workflow appears in one call.

estimators() tokens: difference (or ab), system,
ddback, ddforward, full, csdgmm, csdpartial,
dabss, ablasso (plain), and ablassoK for AB-LASSO-SS with
K folds (e.g. ablasso2, ablasso5). To reproduce the AB-LASSO
Table 5.1 use, with lags(4):

. xtdynestimb table Y D Cvars, lags(4) srlr estimators(ablasso2 ablasso5 ab dabss)

estimators() chooses and orders the columns from:
difference, system, ddback, ddforward, full,
csdgmm, csdpartial, ablasso. The default is the five
break-robust GMM estimators
difference system ddback ddforward full. Returns r(coef) and
r(se) (each k x #estimators).

. xtdynestimb table n w k, lags(1) gmmlags(2 5)

. xtdynestimb table n w, estimators(difference system full csdgmm ablasso)

Visualization

Every estimation can produce a dependency-free coefficient plot (point estimates
with confidence intervals):

. xtdynestimb dd y, graph

. xtdynestimb graph (after any xtdynestimb fit)

For dd the compare option additionally draws a
side-by-side comparison of the persistence coefficient across the five variants:

. xtdynestimb dd y, compare graph

Stored results

xtdynestimb is an e-class command. Common results:

Scalars

e(N) observations used

e(N_g) number of panel units used

e(arlags) autoregressive order

e(n_moments) number of moment conditions (GMM)

e(j), e(j_df), e(j_p) Hansen overid. statistic, df, p
(GMM)

e(level) confidence level

Macros

e(cmd) xtdynestimb

e(subcmd) dd, csdgmm or ablasso

e(estimator) long estimator label

e(depvar) , e(indepvars), e(ivar), e(tvar)

Matrices

e(b), e(V) coefficient vector and variance matrix

See each subcommand's page for its full result list.

Examples

Setup

. webuse abdata

. xtset id year

Break-robust Double-D GMM (all five variants compared)

. xtdynestimb dd n, lags(1) compare graph

CSD-robust system GMM with regressor-only instruments

. xtdynestimb csdgmm n w, variant(system) partial

Arellano-Bond LASSO with cross-fitting in a long panel

. xtdynestimb ablasso n, lags(2) crossfit kfold(5) nsplits(5) seed(123)

Long-run effect and a follow-up specification test

. xtdynestimb dd n, lags(1)

. nlcom _b[L1.n]/(1-_b[L1.n])

. predict double e, residuals

. xtdyntest csd, residuals(e)

References

Chowdhury, R. A., and B. Russell. 2017. The Difference, System and
'Double-D' GMM panel estimators in the presence of structural breaks.
Scottish Journal of Political Economy 64(4): 373-395.

Sarafidis, V. 2009. GMM estimation of short dynamic panel data models
with error cross-sectional dependence. MPRA Paper 25176, University of Munich.

Chernozhukov, V., I. Fernandez-Val, C. Huang, and W. Wang. 2024.
Arellano-Bond LASSO estimator for dynamic linear panel models. cemmap working
paper CWP09/24.

Arellano, M., and S. Bond. 1991. Some tests of specification for panel
data. Review of Economic Studies 58: 277-297.

Blundell, R., and S. Bond. 1998. Initial conditions and moment
restrictions in dynamic panel data models. Journal of Econometrics
87: 115-143.

Windmeijer, F. 2005. A finite sample correction for the variance of
linear efficient two-step GMM estimators. Journal of Econometrics
126: 25-51.

Author

Dr Merwan Roudane

merwanroudane920@gmail.com

github.com/merwanroudane

Companion package: xtdyntest (specification tests for dynamic
panel GMM).