Day 9: GMM and DPD

Robert W. Walker

2026-07-30

Outline for Day 9

  1. Motivation — Why dynamic panel models?
  2. GMM Foundations — Moments, weighting, and overidentification
  3. Anderson-Hsiao — The baseline IV approach
  4. Arellano-Bond — Difference GMM
  5. System GMM — Arellano-Bover / Blundell-Bond
  6. Specification Testing — Sargan, Hansen, AR tests, and diagnostics
  7. Bias-Corrected LSDV — Kiviet and Bruno corrections
  8. Extensions — Unbalanced panels, Panel VAR, and software
  9. Applied Example — UK manufacturing employment
  10. Practical Guidance and Philosophy

Why Dynamic Models?

Many social processes are inherently persistent — the past directly shapes the present

  • State dependence: employment, conflict onset, regime type, trade agreements
  • Habit formation: consumption, party identification, welfare participation
  • Path dependence: institutional arrangements, development trajectories
  • Partial adjustment: firms, governments, and voters adjust slowly toward targets

A static panel model that assumes \text{Cov}(y_{i,t-1},\,\epsilon_{it}) = 0 is misspecified for these processes

The autoregressive parameter \gamma quantifies the degree of persistence and the speed of adjustment:

\text{Speed of adjustment} = 1 - \gamma; \quad \text{Long-run multiplier} = \frac{\beta}{1-\gamma}

Models that ignore dynamics misattribute persistence to contemporaneous covariates — a serious source of omitted variable bias

The DPD Model

y_{it} = \gamma\, y_{i,t-1} + \mathbf{X}_{it}\boldsymbol{\beta} + \alpha_i + \epsilon_{it}

  • i = 1,\ldots,N units (large); t = 1,\ldots,T periods (fixed and small)
  • \gamma — autoregressive parameter; |\gamma| < 1 required for stationarity
  • \mathbf{X}_{it} — time-varying covariates; may be strictly exogenous, predetermined, or endogenous
  • \alpha_i — unobserved unit-specific effect, constant over time; correlated with y_{i,t-1} by construction
  • \epsilon_{it} — idiosyncratic error; assumed IID(0,\sigma^2_\epsilon) across i and t

The core problem: since y_{i,t-1} = f(\alpha_i, \epsilon_{i,t-1}, \ldots), the lagged dependent variable is correlated with both \alpha_i and past errors. Every standard panel estimator fails for a different reason.

The dataset is characterized by large N and fixed (small) T — the short panel setting

Within and Between Variation

For any variable x_{it}, total variance decomposes as:

\underbrace{\text{Var}(x_{it})}_{\text{Total}} = \underbrace{\text{Var}(\bar{x}_i)}_{\text{Between}} + \underbrace{\text{Var}(x_{it}-\bar{x}_i)}_{\text{Within}}

This decomposition matters enormously for identification:

  • Between variation — variation across units (exploited by pooled OLS, RE)
  • Within variation — variation within units over time (exploited by FE/within estimator)

For the DPD model with large N and fixed T:

  • Even within variation is contaminated: y_{i,t-1} - \bar{y}_i is correlated with \epsilon_{it} - \bar{\epsilon}_i
  • The share of within vs. between variation in the covariates determines identification strength
EmplUK: Variance decomposition of log-transformed variables
n w k ys
Grand mean 1.0560 3.1430 -0.4416 4.6380
S.D. 1.3415 0.2630 1.5141 0.0940
TSS 1853.6288 71.2484 2361.3727 9.0936
Between S.D. 1.3392 0.2440 1.5093 0.0393
BSS 1814.6304 64.1296 2313.3335 1.5628
Within S.D. 0.1946 0.0831 0.2160 0.0855
WSS 38.9984 7.1188 48.0392 7.5308
% Within 0.0210 0.0999 0.0203 0.8281

Naïve Approaches and Why They Fail

Pooled OLS: regress y_{it} on y_{i,t-1} and \mathbf{X}_{it}

  • \alpha_i enters the composite error; \text{Cov}(y_{i,t-1},\alpha_i) > 0 \Rightarrow upward bias in \hat{\gamma}

Fixed Effects (Within estimator): subtract unit means to remove \alpha_i

  • \widetilde{y}_{i,t-1} = y_{i,t-1} - \bar{y}_i is correlated with \widetilde{\epsilon}_{it} = \epsilon_{it} - \bar{\epsilon}_i because \bar{\epsilon}_i contains \epsilon_{i,t-1}
  • Downward (Nickell) bias — opposite direction from pooled OLS

Random Effects: assumes \text{Cov}(\alpha_i, y_{i,t-1}) = 0

  • Violated by construction whenever the unit effect drives the autoregressive process

First-differencing alone: removes \alpha_i but creates a new endogeneity problem (treated next)

A useful diagnostic: the FE and pooled OLS estimates bracket the true \gamma

Nickell / Hurwicz Bias

The within-group estimator is inconsistent with fixed T, even as N \to \infty

Nickell (1981) derives the approximate bias:

\text{Bias}(\hat{\gamma}_{FE}) \approx -\frac{1+\gamma}{T-1}\cdot\left[1 + \frac{2\gamma(1-\gamma^T)}{T(1-\gamma)}\right]^{-1}

Key implications:

  • Bias is of order O(1/T) — negligible only for large T (e.g. T > 30)
  • Negative sign: FE under-estimates persistence — the opposite direction from OLS
  • Magnitude grows as \gamma \to 1: near-unit-root processes suffer worst
  • With \gamma = 0.8 and T = 5: the formula gives -0.45 / 2.076 \approx -0.22; FE reports \approx 0.58

Practical upshot: for the short panels typical in cross-national or firm-level data (T = 515), FE estimates of dynamic models are substantially distorted. GMM is needed.

GMM Foundations

The Method of Moments

Classical method of moments: set population moments equal to their sample analogs and solve

For OLS the identifying condition is \mathbb{E}[\mathbf{X}'\boldsymbol{\epsilon}] = 0:

\frac{1}{N}\mathbf{X}'\hat{\boldsymbol{\epsilon}} = \mathbf{0} \quad \Rightarrow \quad \hat{\boldsymbol{\beta}}_{OLS} = (\mathbf{X}'\mathbf{X})^{-1}\mathbf{X}'\mathbf{y}

With K regressors and K conditions this is exactly identified — one unique solution

Instrumental variables replace \mathbf{X} with instruments \mathbf{Z} satisfying:

\underbrace{\mathbb{E}[\mathbf{Z}'\boldsymbol{\epsilon}] = \mathbf{0}}_{\text{orthogonality/exclusion}} \qquad \underbrace{\text{Cov}(\mathbf{Z},\mathbf{X}) \neq \mathbf{0}}_{\text{relevance/first stage}}

With L = K instruments: 2SLS solves \frac{1}{N}\mathbf{Z}'\hat{\boldsymbol{\epsilon}} = \mathbf{0} exactly

With L > K instruments: overidentified — cannot satisfy all L conditions simultaneously \Rightarrow need GMM

In the dynamic panel context, the panel structure generates many valid moment conditions for free — far more than parameters to estimate

From MM to GMM: Overidentification and the J-Test

With L > K valid moment conditions, define the sample moment vector:

g_N(\boldsymbol{\theta}) = \frac{1}{N}\sum_{i=1}^{N}\mathbf{Z}_i'\boldsymbol{\epsilon}_i(\boldsymbol{\theta})

GMM finds \hat{\boldsymbol{\theta}} that brings g_N(\boldsymbol{\theta}) as close to zero as possible:

\hat{\boldsymbol{\theta}}_{GMM} = \arg\min_{\boldsymbol{\theta}}\; g_N(\boldsymbol{\theta})'\,\mathbf{W}_N\, g_N(\boldsymbol{\theta})

where \mathbf{W}_N is a positive-definite weighting matrix — choice of \mathbf{W}_N determines efficiency

The L - K overidentifying restrictions are testable via the Sargan/Hansen J-statistic:

J = N\cdot g_N(\hat{\boldsymbol{\theta}})'\hat{\mathbf{W}}_N\, g_N(\hat{\boldsymbol{\theta}}) \xrightarrow{d} \chi^2(L-K)

Warning

With many instruments, the Hansen test has very low power and will often fail to reject even when instruments are invalid. A p-value > 0.95 signals too many instruments, not good identification.

One-Step, Two-Step, and Windmeijer (2005)

One-step GMM: use a fixed, non-data-dependent weighting matrix

  • Common choice: \mathbf{W}_N = (\mathbf{Z}'\mathbf{H}\mathbf{Z})^{-1} under homoskedasticity
  • Robust under weaker assumptions; but not asymptotically efficient

Two-step GMM: estimate the optimal weight matrix from first-step residuals

\hat{\mathbf{W}}_N^{(2)} = \left(\frac{1}{N}\sum_i \mathbf{Z}_i'\hat{\boldsymbol{\epsilon}}_i^{(1)}\hat{\boldsymbol{\epsilon}}_i^{(1)'}\mathbf{Z}_i\right)^{-1}

Asymptotically efficient — but finite-sample standard errors are severely downward biased, especially with many instruments

Windmeijer (2005) derives an analytic bias correction to the two-step VCE accounting for the fact that \hat{\mathbf{W}}^{(2)} is itself estimated

Step R (pgmm) Stata
One-step model = "onestep" default
Two-step + Windmeijer model = "twosteps", summary(..., robust=TRUE) twostep vce(robust)

Always use Windmeijer-corrected SEs with two-step GMM. The Sargan test is unavailable after robust; use the Hansen J-test instead.

GMM-Type Instruments and Sequential Moment Conditions

The DPD instrument set combines two types of moment conditions:

Standard (IV-type): from strictly exogenous variables x_{it}

\mathbb{E}[x_{is}\,\Delta\epsilon_{it}] = 0 \;\; \forall\, s,t \quad \Rightarrow \quad \text{instrument using } \Delta x_{it}

GMM-type (sequential): from the lagged dependent variable (and predetermined regressors)

\mathbb{E}[y_{i,t-s}\,\Delta\epsilon_{it}] = 0 \;\; \text{for } s \geq 2 \quad \Rightarrow \quad \text{instrument using } y_{i,t-2}, y_{i,t-3},\ldots

These accumulate: at period t, all levels y_{i1}, \ldots, y_{i,t-2} are valid instruments

In pgmm syntax:

  • Left of |: covariates entering the model (with desired lag structure)
  • Right of |: instruments; wrap GMM-type ones in lag(var, from:to)

The distinction between strictly exogenous, predetermined, and endogenous regressors controls how deep into the lag structure instruments are drawn — will reemerge shortly.

The Anderson-Hsiao Estimator

First Differencing: Removing \alpha_i and the New Problem

Take first differences of the DPD model to eliminate the unit effect:

\Delta y_{it} = \gamma\,\Delta y_{i,t-1} + \Delta\mathbf{X}_{it}\boldsymbol{\beta} + \Delta\epsilon_{it}

where \Delta y_{it} = y_{it} - y_{i,t-1} and \Delta\alpha_i = 0the fixed effect is gone

However a new endogeneity problem arises immediately:

\Delta y_{i,t-1} = y_{i,t-1} - y_{i,t-2}

Since y_{i,t-1} is a function of \epsilon_{i,t-1}, and \epsilon_{i,t-1} appears in \Delta\epsilon_{it} = \epsilon_{it} - \epsilon_{i,t-1}:

\text{Cov}\!\left(\Delta y_{i,t-1},\,\Delta\epsilon_{it}\right) = -\text{Var}(\epsilon_{i,t-1}) \neq 0

We need instruments for \Delta y_{i,t-1} that satisfy: (1) relevance — correlated with \Delta y_{i,t-1}; (2) exogeneity — uncorrelated with \Delta\epsilon_{it}

Under IID \epsilon_{it}: y_{i,t-2} and \Delta y_{i,t-2} are both valid — they are correlated with \Delta y_{i,t-1} but predetermined relative to \Delta\epsilon_{it}

Anderson and Hsiao (1981)

Two 2SLS strategies using observations at t \geq 3:

Strategy 1 — Instrument with \Delta y_{i,t-2} (lagged differences):

\text{Cov}(\Delta y_{i,t-2},\,\Delta\epsilon_{it}) = \text{Cov}(y_{i,t-2} - y_{i,t-3},\;\epsilon_{it} - \epsilon_{i,t-1}) = 0 \;\; \checkmark

Strategy 2 — Instrument with y_{i,t-2} (lagged levels):

\text{Cov}(y_{i,t-2},\,\Delta\epsilon_{it}) = 0 \;\; \checkmark \quad \text{and typically stronger first stage}

Wawro (2002) and Beck: The AH estimator performs poorly in finite samples. Econometricians agree.

Fundamental inefficiency: AH uses exactly one instrument per time period, leaving all deeper lags on the table. There are \frac{(T-2)(T-1)}{2} valid lagged-level instruments — AH uses only T-2 of them.

Arellano and Bond (1991) recast AH as a GMM problem, using all valid lagged levels simultaneously and weighting them optimally.

Arellano-Bond: Difference GMM

The Arellano-Bond Idea

Holtz-Eakin, Newey, and Rosen (1988) and Arellano and Bond (1991) recognized:

At each time period t, every level y_{i,s} with s \leq t-2 is a valid instrument for \Delta y_{i,t-1}

The instrument set grows with t:

Period t Equation Valid level instruments for \Delta y_{i,t-1}
3 \Delta y_{i3} y_{i1}
4 \Delta y_{i4} y_{i1},\; y_{i2}
5 \Delta y_{i5} y_{i1},\; y_{i2},\; y_{i3}
T \Delta y_{iT} y_{i1},\ldots,\; y_{i,T-2}

Total GMM instruments from the DV — for a 1-lag AR(p=1) model:

\sum_{t=3}^{T}(t-2) = 1 + 2 + \cdots + (T-2) = \frac{(T-2)(T-1)}{2}

This grows quadratically in T; with p lags the first valid instrument shifts to t=p+2, giving \frac{(T-p-1)(T-p)}{2} (see the Proliferation slide)

All are used simultaneously via GMM; the weighting matrix handles the fact that they are not all equally informative

For strictly exogenous covariates, \Delta X_{it} contributes additional standard instruments at each period

Building the Instrument Matrix

The instrument matrix \mathbf{Z}_i^{AB} for unit i has a block-diagonal triangular structure:

\mathbf{Z}_i^{AB} = \begin{pmatrix} y_{i1} & & & \\ & y_{i1} & y_{i2} & \\ & & y_{i1} & y_{i2} & y_{i3} \\ & & & & \ddots \end{pmatrix}

Each row corresponds to one first-differenced observation (t = 3, 4, \ldots, T)

The complete orthogonality condition:

\mathbb{E}\!\left[\mathbf{Z}_i^{AB\prime}\,\Delta\boldsymbol{\epsilon}_i\right] = \mathbf{0}

This is a system of \frac{(T-2)(T-1)}{2} moment conditions (for a 1-lag model) for one parameter \gammaheavily overidentified, and GMM is needed to optimally combine them

Crucial: the moment conditions are derived from lagged levels, not from outside the panel. The panel structure itself provides identification for free.

The T=3 Case: Wawro’s Worked Example

True model: y_{it} = \gamma y_{i,t-1} + \alpha_i + u_{it}. Substituting y_{i2} into the t=3 equation:

\Delta_{3,2}y_i = \underbrace{\gamma[\overbrace{\gamma y_{i1}+\alpha_i+u_{i2}}^{y_{i2}}]+\alpha_i+u_{i3}}_{y_{i3}} - \underbrace{\gamma y_{i1}+\alpha_i+u_{i2}}_{y_{i2}}

= (\gamma^2-\gamma)y_{i1} + \underbrace{\gamma\alpha_i}_{\delta_i} + \underbrace{u_{i3}+(\gamma-1)u_{i2}}_{u^*_{\Delta(3,2)}}

This is an estimating equation without an observable regressor — we need both differences

For \Delta_{2,1}y_i, treating the initial condition as fixed:

\Delta_{2,1}y_i = (\gamma-1)y_{i1} + \alpha_i + u_{i2}

Because u_{i1} and u_{i2} are independent under IID errors, y_{i1} is a valid instrument for \Delta_{2,1}y_i. Under normality the differenced errors are normal and independent — the AH and AB conditions hold.

Strict Exogeneity, Predetermined, and Endogenous Regressors

The treatment of \mathbf{X}_{it} in the instrument matrix depends on the assumed feedback:

Strictly exogenous: \mathbb{E}[x_{it}\,\epsilon_{is}] = 0\;\;\forall\, s,t

  • No feedback in any direction; all periods valid as instruments
  • Enter the instrument matrix as differences: \Delta x_{it}

Predetermined (weakly exogenous): \mathbb{E}[x_{it}\,\epsilon_{is}] \neq 0 if s < t; = 0 if s \geq t

  • Backward feedback allowed (past outcome affects x), no contemporaneous/future feedback
  • Instrument with x_{i,t-1},\; x_{i,t-2},\ldots — levels at t-1 and before

Endogenous: \mathbb{E}[x_{it}\,\epsilon_{is}] \neq 0 for s \leq t

  • Contemporaneous correlation; instrument with x_{i,t-2},\; x_{i,t-3},\ldots

Misclassifying a predetermined regressor as strictly exogenous will use invalid instruments and produce inconsistent estimates. The Sargan/Hansen test may or may not catch this.

Instrument Proliferation and Collapsing

For a model with p lags of y, the first valid GMM instrument appears at t = p+2 (period t must pre-date both endogenous terms). Total instruments from the DV:

\frac{(T-p-1)(T-p)}{2}

This is a quadratic function of T — for p=1: (T-2)(T-1)/2; for p=2: (T-3)(T-2)/2

T p=1 lag: (T-2)(T-1)/2 p=2 lags: (T-3)(T-2)/2
5 6 3
7 15 10
10 36 28
15 91 78

The AB Table 4(a1) replication uses p=2, so the instrument counts in the right column apply. Note: additional predetermined covariates each contribute further columns with the same triangular structure — instrument count escalates rapidly.

Consequences (Roodman 2009): overfits the first stage; Hansen p-values cluster near 1.0; estimates biased toward FE. Rule of thumb: instruments \leq groups.

Remedy 1 — Limit lag depth: lag(log(emp), 2:4) instead of lag(log(emp), 2:99)

Remedy 2 — Collapse the instrument matrix (Roodman): one column per lag depth rather than one column per lag-period combination; reduces instruments from O(T^2) to O(T)

* In xtabond2 (Stata)
xtabond2 n L.n L(0/1).w, gmm(L.n, lag(2 4) collapse) iv(L(0/1).w) twostep robust

Report both collapsed and uncollapsed results as a sensitivity check

The Arellano-Bond Serial Correlation Tests

In the differenced model, \Delta\epsilon_{it} = \epsilon_{it} - \epsilon_{i,t-1}

AR(1) testH_0: \text{Cov}(\Delta\epsilon_{it},\;\Delta\epsilon_{i,t-1}) = 0

  • Even under IID levels errors, \text{Cov}(\Delta\epsilon_{it},\;\Delta\epsilon_{i,t-1}) = -\sigma^2_\epsilon \neq 0
  • Should reject — mechanical from the differencing transformation; failure to reject is the surprise

AR(2) testH_0: \text{Cov}(\Delta\epsilon_{it},\;\Delta\epsilon_{i,t-2}) = 0

  • Under IID levels errors: \text{Cov}(\Delta\epsilon_{it},\;\Delta\epsilon_{i,t-2}) = 0should NOT reject
  • Rejection implies \text{Cov}(\epsilon_{it},\;\epsilon_{i,t-2}) \neq 0 in levels — this invalidates y_{i,t-2} as an instrument

If AR(2) rejects:

  • Use y_{i,t-3} and deeper lags as instruments (sacrifice some efficiency)
  • Add further lags of y to the RHS to absorb the serial correlation
  • Check AR(3) — how deep does the serial dependence extend?

In R: mtest(model, order=2) from plm; in Stata: estat abond

One-Step Arellano-Bond: Code and Results

Replicating Arellano and Bond (1991), Table 4(a1):

library(plm)
data(EmplUK)

Table4.a1 <- pgmm(
  log(emp) ~ lag(log(emp), 1:2) +
             lag(log(wage), 0:1) +
             lag(log(capital), 0:2) +
             lag(log(output), 0:2) |
             lag(log(emp), 2:99),
  data   = EmplUK,
  effect = "twoways",
  model  = "onestep"
)
summary(Table4.a1)
use abdata, clear

* One-step difference GMM — Table 4(a1)
xtabond n L(0/1).w L(0/2).(k ys) yr1980-yr1984, ///
    lags(2) vce(robust)

estat abond   /* Arellano-Bond AR tests */
estat sargan  /* Sargan overidentification test */
Twoways effects One-step model Difference GMM 

Call:
pgmm(formula = log(emp) ~ lag(log(emp), 1:2) + lag(log(wage), 
    0:1) + lag(log(capital), 0:2) + lag(log(output), 0:2) | lag(log(emp), 
    2:99), data = EmplUK, effect = "twoways", model = "onestep")

Unbalanced Panel: n = 140, T = 7-9, N = 1031

Number of Observations Used: 611
Residuals:
      Min.    1st Qu.     Median       Mean    3rd Qu.       Max. 
-0.6006508 -0.0299498  0.0000000 -0.0001193  0.0311461  0.5693264 

Coefficients:
                         Estimate Std. Error z-value  Pr(>|z|)    
lag(log(emp), 1:2)1      0.686226   0.144594  4.7459 2.076e-06 ***
lag(log(emp), 1:2)2     -0.085358   0.056016 -1.5238 0.1275510    
lag(log(wage), 0:1)0    -0.607821   0.178205 -3.4108 0.0006478 ***
lag(log(wage), 0:1)1     0.392623   0.167993  2.3371 0.0194319 *  
lag(log(capital), 0:2)0  0.356846   0.059020  6.0462 1.483e-09 ***
lag(log(capital), 0:2)1 -0.058001   0.073180 -0.7926 0.4280206    
lag(log(capital), 0:2)2 -0.019948   0.032713 -0.6098 0.5420065    
lag(log(output), 0:2)0   0.608506   0.172531  3.5269 0.0004204 ***
lag(log(output), 0:2)1  -0.711164   0.231716 -3.0691 0.0021469 ** 
lag(log(output), 0:2)2   0.105798   0.141202  0.7493 0.4536974    
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

Sargan test: chisq(25) = 48.74983 (p-value = 0.0030295)
Autocorrelation test (1): normal = -3.599593 (p-value = 0.00031872)
Autocorrelation test (2): normal = -0.5160282 (p-value = 0.60583)
Wald test for coefficients: chisq(10) = 408.2859 (p-value = < 2.22e-16)
Wald test for time dummies: chisq(6) = 11.57904 (p-value = 0.072046)

Two-Step AB with Windmeijer Correction: Code and Results

Replicating Arellano and Bond (1991), Table 4(b):

Table4.b <- pgmm(
  log(emp) ~ lag(log(emp), 1:2) +
             lag(log(wage), 0:1) +
             log(capital) +
             lag(log(output), 0:1) |
             lag(log(emp), 2:99),
  data   = EmplUK,
  effect = "twoways",
  model  = "twosteps"
)

summary(Table4.b, robust = FALSE)  # Without Windmeijer (matches Stata non-robust)
summary(Table4.b, robust = TRUE)   # With Windmeijer correction — always prefer this
* Two-step difference GMM — Table 4(b)
xtabond n L(0/1).w k L(0/1).ys yr1980-yr1984, ///
    lags(2) twostep vce(robust)

estat abond
estat sargan
Twoways effects Two-steps model Difference GMM 

Call:
pgmm(formula = log(emp) ~ lag(log(emp), 1:2) + lag(log(wage), 
    0:1) + log(capital) + lag(log(output), 0:1) | lag(log(emp), 
    2:99), data = EmplUK, effect = "twoways", model = "twosteps")

Unbalanced Panel: n = 140, T = 7-9, N = 1031

Number of Observations Used: 611
Residuals:
      Min.    1st Qu.     Median       Mean    3rd Qu.       Max. 
-0.6190677 -0.0255683  0.0000000 -0.0001339  0.0332013  0.6410272 

Coefficients:
                        Estimate Std. Error z-value  Pr(>|z|)    
lag(log(emp), 1:2)1     0.474151   0.185398  2.5575 0.0105437 *  
lag(log(emp), 1:2)2    -0.052967   0.051749 -1.0235 0.3060506    
lag(log(wage), 0:1)0   -0.513205   0.145565 -3.5256 0.0004225 ***
lag(log(wage), 0:1)1    0.224640   0.141950  1.5825 0.1135279    
log(capital)            0.292723   0.062627  4.6741 2.953e-06 ***
lag(log(output), 0:1)0  0.609775   0.156263  3.9022 9.530e-05 ***
lag(log(output), 0:1)1 -0.446373   0.217302 -2.0542 0.0399605 *  
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

Sargan test: chisq(25) = 30.11247 (p-value = 0.22011)
Autocorrelation test (1): normal = -1.53845 (p-value = 0.12394)
Autocorrelation test (2): normal = -0.2796829 (p-value = 0.77972)
Wald test for coefficients: chisq(7) = 142.0353 (p-value = < 2.22e-16)
Wald test for time dummies: chisq(6) = 16.97046 (p-value = 0.0093924)

System GMM: Arellano-Bover / Blundell-Bond

The Weak Instruments Problem

Difference GMM works well when \gamma is moderate. Near the unit root, it breaks down.

When \gamma \approx 1:

  • y_{it} is near-nonstationary; \Delta y_{i,t-1} is nearly white noise
  • Lagged levels y_{i,t-2} are very weakly correlated with \Delta y_{i,t-1}weak first stage
  • GMM estimates have large bias and unreliable SEs

Simulation evidence (Blundell and Bond 1998):

  • With \gamma = 0.9 and large \text{Var}(\alpha_i)/\text{Var}(\epsilon_{it}), the AB estimator is severely biased
  • The bias can approach that of the (inconsistent) OLS estimator in magnitude
  • The FE/pooled OLS bracket may be very wide, giving little information

Intuition: when the process is very persistent, there is little variation in y_{i,t-1} conditional on its own lags — the instrument is weak in exactly the same sense as a weak first stage in 2SLS.

This motivates System GMM: augment the difference equation with a levels equation, using lagged differences as additional instruments

System GMM: Arellano-Bover / Blundell-Bond

Arellano and Bover (1995) proposed additional moment conditions from the levels equation:

y_{it} = \gamma\, y_{i,t-1} + \mathbf{X}_{it}\boldsymbol{\beta} + \alpha_i + \epsilon_{it}

Valid instruments for the levels equation: lagged first differences \Delta y_{i,t-1}

\mathbb{E}[\Delta y_{i,t-1}\cdot(\alpha_i + \epsilon_{it})] = 0

This holds under mean stationarity: \mathbb{E}[\Delta y_{i2}\cdot\alpha_i] = 0

i.e., the initial first-difference of y is uncorrelated with the permanent unit effect

Blundell and Bond (1998) show this assumption is plausible when y_{it} is stationary and y_{i0} is drawn from the stationary distribution — reasonable for many economic/social processes

System GMM stacks the differenced and levels equations, exploiting both sets of conditions jointly:

Equation Instruments
Difference Lagged levels y_{i,t-2}, y_{i,t-3},\ldots
Levels Lagged differences \Delta y_{i,t-1}, \Delta y_{i,t-2},\ldots

Difference GMM vs. System GMM

Feature Difference GMM (AB) System GMM (ABB/BB)
Equations Differences only Differences + Levels
DV instruments Lagged levels Lagged levels + Lagged diffs
Key assumption IID \epsilon; no serial correlation + Mean stationarity of y_{i0}
Best suited for \gamma small/moderate \gamma near 1; large \text{Var}(\alpha_i)
Risk Weak instruments if \gamma \approx 1 Invalid if stationarity fails
Diagnostic test AR(2); Sargan/Hansen AR(2); Sargan/Hansen; diff-in-Hansen

The difference-in-Hansen test (available in xtabond2) separately tests the validity of the levels equation instruments — i.e., it tests the mean stationarity assumption

A statistically sensible strategy: estimate both; if estimates are close, prefer System GMM for efficiency. If they differ substantially, investigate why.

System GMM: Code and Results

Replicating Blundell and Bond (1998), Table 4:

Table4.BB <- pgmm(
  log(emp) ~ lag(log(emp), 1) +
             lag(log(wage), 0:1) +
             lag(log(capital), 0:1) |
             lag(log(emp), 2:99) +
             lag(log(wage), 2:99) +
             lag(log(capital), 2:99),
  data           = EmplUK,
  effect         = "twoways",
  model          = "onestep",
  transformation = "ld"   # levels + differences
)
summary(Table4.BB, robust = TRUE)
* System GMM via xtdpdsys
xtdpdsys n L(0/1).w L(0/1).k yr1980-yr1984, ///
    lags(1) twostep vce(robust)

estat abond
estat sargan

* Preferred: xtabond2 (Roodman) — adds diff-in-Hansen, collapse, etc.
xtabond2 n L.n L(0/1).w L(0/1).k yr1980-yr1984, ///
    gmm(L.n, lag(2 .) collapse)                  ///
    iv(L(0/1).w L(0/1).k yr1980-yr1984)           ///
    twostep robust small
Twoways effects One-step model System GMM 

Call:
pgmm(formula = log(emp) ~ lag(log(emp), 1) + lag(log(wage), 0:1) + 
    lag(log(capital), 0:1) | lag(log(emp), 2:99) + lag(log(wage), 
    2:99) + lag(log(capital), 2:99), data = EmplUK, effect = "twoways", 
    model = "onestep", transformation = "ld")

Unbalanced Panel: n = 140, T = 7-9, N = 1031

Number of Observations Used: 1642
Residuals:
      Min.    1st Qu.     Median       Mean    3rd Qu.       Max. 
-0.7530341 -0.0369030  0.0000000  0.0002882  0.0466069  0.6001503 

Coefficients:
                         Estimate Std. Error z-value  Pr(>|z|)    
lag(log(emp), 1)         0.935605   0.026295 35.5810 < 2.2e-16 ***
lag(log(wage), 0:1)0    -0.630976   0.118054 -5.3448 9.050e-08 ***
lag(log(wage), 0:1)1     0.482620   0.136887  3.5257 0.0004224 ***
lag(log(capital), 0:1)0  0.483930   0.053867  8.9838 < 2.2e-16 ***
lag(log(capital), 0:1)1 -0.424393   0.058479 -7.2572 3.952e-13 ***
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

Sargan test: chisq(100) = 118.763 (p-value = 0.097096)
Autocorrelation test (1): normal = -4.808434 (p-value = 1.5212e-06)
Autocorrelation test (2): normal = -0.2800133 (p-value = 0.77947)
Wald test for coefficients: chisq(5) = 11174.82 (p-value = < 2.22e-16)
Wald test for time dummies: chisq(7) = 14.71138 (p-value = 0.039882)

Specification Testing

Sargan/Hansen and the Difference-in-Hansen Test

Sargan test (one-step, non-robust): S = N\cdot g_N'\hat{\mathbf{W}}_N g_N \sim \chi^2(L-K)

Hansen J-test (two-step, robust): same formula using optimal weighting matrix

p-value Interpretation
p < 0.05 Reject H_0 — some instruments likely invalid
0.050.25 Comfortable zone
0.250.95 Acceptable
p > 0.95 Too many instruments — test has no power

Difference-in-Hansen test: \Delta J = J_{system} - J_{difference} \sim \chi^2(L_{extra})

  • Tests the additional moment conditions introduced by the levels equation in System GMM
  • Rejection suggests the mean stationarity assumption underlying System GMM is violated
  • Available in xtabond2 (Stata); not yet in plm::pgmm

Key limitation of all these tests: they are joint tests of all included instruments. A rejection does not identify which moments fail; a non-rejection does not guarantee all moments are valid.

The AB AR Tests in Practice

Recall: \Delta\epsilon_{it} = \epsilon_{it} - \epsilon_{i,t-1}

AR(1) in differences is expected: should reject H_0 of no AR(1)

  • Under correct specification, adjacent differenced residuals share -\epsilon_{i,t-1}
  • Failure to reject is the warning sign — check model specification

AR(2) is the identification-relevant test: should not reject H_0

  • Rejection implies \text{Cov}(\epsilon_{it},\epsilon_{i,t-2}) \neq 0 — violates the identifying assumption that y_{i,t-2} is a valid instrument
  • If AR(2) rejects: exclude t-2 and instrument from t-3 onward

Also check AR(3) in long panels to confirm the serial correlation structure

library(plm)
mtest(Table4.b, order = 1)  # AR(1) test
mtest(Table4.b, order = 2)  # AR(2) test — key test
* After xtabond / xtdpd / xtabond2
estat abond          /* reports AR(1) and AR(2) by default */
estat abond, lags(3) /* also request AR(3)                 */

A Diagnostic Checklist

Step 1 — Check AR(2)

If p < 0.05: serial correlation in levels. Use instruments dated t-3 or later, or extend lag depth.

Step 2 — Check Sargan/Hansen J-test

If p < 0.05: investigate which instrument blocks may be invalid. If p > 0.95: too many instruments — collapse or limit lag depth and retest.

Step 3 — System GMM only: difference-in-Hansen

If p < 0.05: stationarity assumption suspect — prefer Difference GMM.

Step 4 — Count instruments vs. groups

Report L and N; confirm L \leq N (Roodman’s rule of thumb).

Step 5 — Plausibility and brackets

Is \hat{\gamma} \in (0,1)? Does FE < \hat{\gamma}_{AB} < OLS? Are signs of \hat{\boldsymbol{\beta}} consistent with theory? Does the long-run effect \hat{\beta}/(1-\hat{\gamma}) make substantive sense?

Bias-Corrected LSDV

LSDV, Nickell Bias, and the Kiviet/Bruno Correction

LSDV (Least Squares Dummy Variables) = within estimator = FE

Nickell’s (1981) bias approximation as N\to\infty with T fixed:

\text{Bias}(\hat{\gamma}_{LSDV}) \approx -\frac{1+\gamma}{T-1} + O(T^{-2})

Kiviet (1995) derived higher-order analytic approximations to the exact finite-sample bias of LSDV, enabling a bias correction:

\hat{\gamma}_{LSDVC} = \hat{\gamma}_{LSDV} - \hat{B}(\hat{\gamma}_{initial})

where \hat{B} is estimated using a consistent initial estimate of \gamma from AH, AB, or BB

Bruno (2005) extended this to unbalanced panels

Bootstrap standard errors are used since analytic SEs for the corrected estimator are complex

Preferred when: N is small relative to T (e.g. N < 50), where GMM instrument proliferation is especially damaging; or as a robustness check alongside GMM results

LSDVC in R and Stata

# Bias-corrected LSDV is primarily available in Stata
# In R, 'pdynmc' provides related dynamic panel estimators
# install.packages("pdynmc")
library(pdynmc)

# pdynmc estimates linear DPD models with various GMM configurations
# See vignette("pdynmc") for LSDVC-style bias correction options

# As a practical alternative — compare FE to GMM to bracket the true gamma
fe_mod <- plm(
  log(emp) ~ lag(log(emp), 1) + log(wage) + log(capital) + log(output),
  data = EmplUK, model = "within", effect = "twoways"
)
summary(fe_mod)
* Bias-corrected LSDV — Bruno (2005)
* initial() options: ah, ab, or bb
* vcov(B) requests B bootstrap replications for SE

xtlsdvc n L.n L(0/1).w L(0/1).k yr1980-yr1984, ///
    initial(ab) vcov(500) lags(1)

* Compare initializations
foreach init in ah ab bb {
    xtlsdvc n L.n L(0/1).w L(0/1).k yr1980-yr1984, ///
        initial(`init') vcov(200) lags(1)
}

Estimates are typically between the FE (downward biased) and GMM (larger variance) results — a useful triangulation when N is small.

Extensions

Unbalanced Panels and Orthogonal Deviations

First differences and gaps: if y_{i,t-1} is missing, \Delta y_{it} is unavailable. Gaps propagate — one missing period can eliminate adjacent observations.

Orthogonal deviations (Arellano and Bover 1995): express each observation as a deviation from the mean of all future available observations

y_{it}^* = c_{it}\left(y_{it} - \frac{1}{T_{it}}\sum_{s>t}y_{is}\right), \quad c_{it} = \sqrt{\frac{T_{it}}{T_{it}+1}}

where T_{it} = number of future observations for unit i at time t

  • Removes \alpha_i (just as differencing does)
  • Does not propagate missing values: each transformed observation requires only y_{it} and future periods
  • Lagged levels remain valid instruments — same logic as for differences
  • Typically produces more efficient estimates when the panel has gaps

Implementation: xtabond2, orthogonal in Stata; orthogonal deviations not available in plm::pgmm (use xtabond2 via RStata or panelvar for R)

Panel VAR and Software Notes

Panel VAR extends DPD to multivariate systems — all variables treated as jointly endogenous:

\mathbf{Y}_{it} = \mathbf{A}_1\mathbf{Y}_{i,t-1} + \cdots + \alpha_i + \boldsymbol{\epsilon}_{it}

Applications: macro interdependencies, fiscal–monetary interactions, conflict dynamics

library(panelvar)  # install.packages("panelvar")

pvar_mod <- pvargmm(
  dependent_vars     = c("log_emp", "log_wage"),
  lags               = 1,
  transformation     = "fd",         # first differences
  data               = EmplUK,
  panel_identifier   = c("firm", "year"),
  steps              = "twosteps",
  system_instruments = FALSE,
  max_instr_dependent_vars = 4
)
summary(pvar_mod)
girf(pvar_mod, n.ahead = 10, ma_approx_steps = 10) |> plot()
* Panel VAR — Abrigo and Love (2016)
* ssc install pvar

pvar log_emp log_wage, lags(1) fod twostep
pvarirf, oirf mc(500) step(10)
R package Stata command Coverage
plm::pgmm xtabond, xtdpd AB, BB
panelvar xtabond2 AB, BB, collapse, orthog, diff-in-Hansen
pdynmc xtlsdvc LSDVC, extended GMM

Slope Heterogeneity: Testing Before You Pool

All AB/BB estimators assume homogeneous slope vectors \boldsymbol{\beta} — the same \gamma, same wage elasticity, same capital elasticity for every unit. Pesaran and Smith (1995) proved that pooling with heterogeneous slopes yields inconsistent estimates even with no endogeneity, as N, T \to \infty.

Pesaran-Yamagata (2008) \tilde{\Delta} test — run H_0: \boldsymbol{\beta}_i = \boldsymbol{\beta}\;\forall i before deciding to pool:

\tilde{\Delta} = \sqrt{N}\left(\frac{N^{-1}\hat{S} - K}{\sqrt{2K}}\right) \xrightarrow{d} \mathcal{N}(0,1)

where \hat{S} = \sum_i(\hat{\boldsymbol{\beta}}_i - \hat{\boldsymbol{\beta}}_{FGLS})'\hat{\Sigma}_i^{-1}(\hat{\boldsymbol{\beta}}_i - \hat{\boldsymbol{\beta}}_{FGLS})

If H_0 is rejected, choose an estimator that respects heterogeneity:

Estimator Description Use when
Mean Group (MG) (Pesaran-Smith 1995) Average of N unit regressions T large; slopes heterogeneous
Pooled Mean Group (PMG) (Pesaran-Shin-Smith 1999) LR slopes homogeneous; SR heterogeneous Cointegrated panel; theory restricts LR
CCE-MG (Pesaran 2006) MG + cross-sectional means as common-factor proxies Cross-sectional dependence present
Dynamic CCE (xtdcce2, Ditzen 2021) CCE with lagged DV DPD + cross-sectional dependence
library(plm)

# Pesaran CD test for cross-sectional dependence (prerequisite)
ab_fe <- plm(n ~ lag(n,1) + w + k + ys, data=EmplUK,
             model="within", effect="twoways")
pcdtest(ab_fe)             # Pesaran (2015) CD test

# Mean Group estimator (requires sufficient T per unit)
# pmg() in plm
mg_mod  <- pmg(n ~ lag(n,1) + w + k + ys, data=EmplUK,
               model="mg")   # mean group
pmg_mod <- pmg(n ~ lag(n,1) + w + k + ys, data=EmplUK,
               model="pmg")  # pooled mean group

# Hausman-type test: MG vs PMG (tests LR homogeneity)
phtest(mg_mod, pmg_mod)
* Pesaran (2004) CD test
xtcd n             /* cross-sectional dependence test */

* Pesaran-Yamagata slope homogeneity test
xtslope n L.n w k ys   /* ssc install xtslope */

* Mean Group and Pooled Mean Group
xtpmg d.n d.w d.k d.ys, lr(L.n w k ys) ec(ec) full mg
xtpmg d.n d.w d.k d.ys, lr(L.n w k ys) ec(ec) full pmg

* Hausman test: PMG vs MG (tests LR slope homogeneity)
hausman mg_est pmg_est

* Dynamic CCE (handles cross-sectional dependence + lagged DV)
* ssc install xtdcce2
xtdcce2 n L.n w k ys, dcce lr(L.n w k ys)

Extensions to Binary and Count Outcomes

The entire DPD framework so far assumes a continuous outcome. But many social science DVs are discrete:

  • Binary: conflict onset, democratic breakdown, legislation passage, protest occurrence
  • Count: number of protests, trade deals, policy adoptions, fatalities
  • Ordinal: Polity/V-Dem democracy scores, treaty compliance levels

Why linear DPD fails here:

  • Predicted probabilities escape [0,1] (linear probability model)
  • The incidental parameters problem (Neyman and Scott 1948): in nonlinear FE models, \hat{\alpha}_i is estimated from T observations and is inconsistent as T fixed, contaminating \hat{\boldsymbol{\beta}}
  • The Heckman (1981) initial conditions problem: the distribution of y_{i1} depends on \alpha_i, so we cannot simply condition on y_{i1} as observed

Wooldridge (2005, JAE) provides the cleanest solution — correlated random effects (CRE) conditioning:

Model \alpha_i \mid y_{i1},\bar{\mathbf{x}}_i \sim \mathcal{N}(\psi_0 + \psi_1 y_{i1} + \bar{\mathbf{x}}_i\boldsymbol{\psi}_2,\; \sigma^2_a), then integrate out \alpha_i. This yields a standard random-effects probit / Poisson augmented with y_{i1} and unit-means \bar{\mathbf{x}}_i as additional regressors:

P(y_{it}=1 \mid y_{i,t-1}, \mathbf{x}_{it}, y_{i1}, \bar{\mathbf{x}}_i) = \Phi\!\left(\gamma y_{i,t-1} + \mathbf{x}_{it}\boldsymbol{\beta} + \psi_1 y_{i1} + \bar{\mathbf{x}}_i\boldsymbol{\psi}_2\right)

The initial value y_{i1} proxies the distribution of \alpha_i — no numerical integration beyond what RE probit already does.

library(lme4)

# Construct Mundlak/Wooldridge terms
panel_df <- EmplUK |>
  group_by(firm) |>
  mutate(
    n_bin  = as.integer(n > median(n)),  # example binary DV
    n_init = first(n_bin),               # initial value y_{i1}
    w_bar  = mean(w, na.rm = TRUE),      # unit mean of wage
    k_bar  = mean(k, na.rm = TRUE)       # unit mean of capital
  ) |> ungroup()

# Wooldridge (2005) CRE dynamic probit via glmer
mod_cre_probit <- glmer(
  n_bin ~ lag(n_bin) + w + k + n_init + w_bar + k_bar + (1 | firm),
  data = panel_df, family = binomial(link = "probit")
)
summary(mod_cre_probit)

# For counts: CRE Poisson (Blundell-Griffith-Windmeijer 2002)
mod_cre_pois <- glmer(
  emp ~ lag(emp) + w + k + n_init + w_bar + k_bar + (1 | firm),
  data = panel_df, family = poisson
)
* Construct Mundlak/Wooldridge terms
bysort id: gen y_init = y_binary[1]
bysort id: egen w_bar  = mean(w)
bysort id: egen k_bar  = mean(k)

* Wooldridge (2005) CRE dynamic probit
xtprobit y_binary L.y_binary w k y_init w_bar k_bar, re

* Average partial effects (critical for interpretation)
margins, dydx(*) predict(pu0)

* For count outcomes: CRE Poisson
xtpoisson emp L.emp w k y_init w_bar k_bar, re
margins, dydx(*) predict(nu0)

* Test: is the initial condition coefficient significant?
* (psi1 != 0 confirms the initial conditions problem is real)
test y_init

Key interpretation note: coefficients from CRE probit/Poisson are not average partial effects (APEs). Always compute APEs via margins (Stata) or the marginaleffects package (R) and interpret those — not the latent-index coefficients.

Applied Example: UK Manufacturing Employment

The Data: EmplUK / abdata

Based on Layard and Nickell (1986), Unemployment in Britain, Economica 53

Obs: 1,031     140 UK manufacturing firms, 1976–1984 (unbalanced)

Variable   Description
--------   -----------------------------------------------
id / firm  Firm identifier
year       Year (1976–1984)
emp / n    Employment count / log(employment)
wage / w   Real wage / log(real wage)
capital/k  Gross capital stock / log(capital)
output/ys  Industry output / log(industry output)
yr1980–yr1984   Year dummy indicators
library(plm)
data(EmplUK)
EmplUK$n  <- log(EmplUK$emp)
EmplUK$w  <- log(EmplUK$wage)
EmplUK$k  <- log(EmplUK$capital)
EmplUK$ys <- log(EmplUK$output)
use abdata, clear
* Variables n, w, k, ys already in log form in abdata
xtset id year
xtdescribe       /* inspect panel structure */
xtsum n w k ys   /* within/between/overall variance */

Research question: How do wages, capital, and industry output shape firm employment? What is the degree of employment persistence, and how quickly does adjustment occur?

Panel Summary Statistics

Variance decomposition: log employment, wage, capital, output
n w k ys
Grand mean 1.0560 3.1430 -0.4416 4.6380
S.D. 1.3415 0.2630 1.5141 0.0940
TSS 1853.6288 71.2484 2361.3727 9.0936
Between S.D. 1.3392 0.2440 1.5093 0.0393
BSS 1814.6304 64.1296 2313.3335 1.5628
Within S.D. 0.1946 0.0831 0.2160 0.0855
WSS 38.9984 7.1188 48.0392 7.5308
% Within 0.0210 0.0999 0.0203 0.8281

Key observations:

  • Employment (n): roughly 30–40% within — meaningful time-series variation across firms
  • Wage (w) and Capital (k): dominated by between variation — identification concerns for GMM instruments
  • Output (ys): industry-level variable; nearly all variation is between firms — appropriate as a strictly exogenous regressor

Specification Choices

Lag depth for the DV: AB (1991) uses two lags — test if the second is significant; confirm AR(2) is not rejected with this choice

Treatment of covariates:

  • w (wage): predetermined — firms plausibly adjust wages in response to past employment shocks; instrument with levels at t-1 and before
  • k (capital): potentially endogenous — investment and employment may be jointly determined; instrument with levels at t-2 and before
  • ys (output): strictly exogenous — industry output is not set by an individual firm; enter as \Delta ys_{it}

Time fixed effects: effect = "twoways" in pgmm; yr1980-yr1984 dummies in Stata — controls for macroeconomic shocks common to all firms

Instrument discipline: begin with lag(..., 2:99); monitor instrument count and Hansen p-value; re-estimate with 2:4 or collapsed as robustness

Results and Long-Run Interpretation

Selected estimates across estimators
Estimator L.emp L2.emp Wage (contemp.)
Fixed Effects (FE) 0.733 -0.139 -0.560
AB One-Step 0.686 -0.085 -0.608
AB Two-Step (Windmeijer) 0.474 -0.053 -0.513
System GMM (BB) 0.936 -0.631

Key patterns: FE under-estimates persistence (Nickell bias); System GMM yields the highest \hat{\gamma}; AB two-step with Windmeijer SEs is the benchmark for DPD

Long-run effects from AB two-step (Table 4b)

In steady state y^* = \gamma_1 y^* + \gamma_2 y^* + \sum_j \beta_{x,j} x^*, so:

\text{LR effect of } x = \frac{\sum_j \hat{\beta}_{x,j}}{1 - \hat{\gamma}_1 - \hat{\gamma}_2}

Sum all lag coefficients on each x (numerator); subtract the sum of AR coefficients from 1 (denominator).

# Extract AB two-step coefficients by name for transparency
cf <- coef(Table4.b)

g1  <- cf["lag(log(emp), 1:2)1"];   g2  <- cf["lag(log(emp), 1:2)2"]
bw0 <- cf["lag(log(wage), 0:1)0"];  bw1 <- cf["lag(log(wage), 0:1)1"]
bk  <- cf["log(capital)"]                          # only lag-0 in Table 4b spec
by0 <- cf["lag(log(output), 0:1)0"]; by1 <- cf["lag(log(output), 0:1)1"]

adj_speed <- 1 - g1 - g2          # denominator for all LR effects

cat(sprintf("gamma1 = %6.4f   gamma2 = %6.4f\n", g1, g2))
gamma1 = 0.4742   gamma2 = -0.0530
cat(sprintf("sum(gamma)     = %6.4f\n", g1 + g2))
sum(gamma)     = 0.4212
cat(sprintf("Speed of adj.  = 1 - %6.4f = %6.4f  (~%.0f%% per year)\n",
            g1+g2, adj_speed, 100*adj_speed))
Speed of adj.  = 1 - 0.4212 = 0.5788  (~58% per year)
cat(sprintf("\nLR wage  = (bw0 + bw1) / adj  = (%6.4f + %6.4f) / %6.4f = %7.4f\n",
            bw0, bw1, adj_speed, (bw0+bw1)/adj_speed))

LR wage  = (bw0 + bw1) / adj  = (-0.5132 + 0.2246) / 0.5788 = -0.4985
cat(sprintf("LR cap   = bk / adj            = %6.4f          / %6.4f = %7.4f\n",
            bk, adj_speed, bk/adj_speed))
LR cap   = bk / adj            = 0.2927          / 0.5788 =  0.5057
cat(sprintf("LR output= (by0 + by1) / adj   = (%6.4f + %6.4f) / %6.4f = %7.4f\n",
            by0, by1, adj_speed, (by0+by1)/adj_speed))
LR output= (by0 + by1) / adj   = (0.6098 + -0.4464) / 0.5788 =  0.2823

Practical Guidance and A Philosophical Note

Choosing an Estimator

Start here — Is there a lagged DV or outcome-to-covariate feedback?

No → standard FE/RE panel models suffice; stop here

Yes → continue below

Is T large (> 2030)?

Yes → Nickell bias is small; FE or LSDVC may be sufficient with a robustness check

No → proceed to GMM

Is N small (< 50)?

Yes → instrument proliferation is severe; use LSDVC, or limit instruments aggressively before applying GMM

Is \gamma likely near 1 (high persistence)?

Yes → Difference GMM instruments are weak; prefer System GMM; validate with diff-in-Hansen

No → Difference GMM (AB) is appropriate; report System GMM as robustness

Always report alongside any GMM result:

  • Instrument count (L) vs. number of groups (N)
  • AR(1) and AR(2) p-values
  • Sargan/Hansen p-value
  • FE and pooled OLS for bracketing comparison

Common Pitfalls

1. Reporting lag(y, 2:99) without checking instrument count

A Hansen p-value of 0.99 is not good news — it signals the test has no power

2. Treating predetermined covariates as strictly exogenous

Using \Delta x_{it} as an instrument when x_{it} responds to past y introduces invalid moments

3. Ignoring the AR(2) test

If y_{i,t-2} is correlated with the error in levels, it cannot instrument for \Delta y_{i,t-1}

4. Two-step GMM without Windmeijer correction

Naive two-step standard errors are dramatically under-estimated in short panels; always specify robust

5. Forgetting time fixed effects

Without year dummies, common macro shocks enter the error and correlate with all lagged instruments

6. Conflating persistence with long-run elasticity

\hat{\gamma} measures the speed of adjustment — high \hat{\gamma} means slow adjustment, not instability (provided \hat{\gamma} < 1)

Poolers vs. Time-Series Scholars

The core philosophical tension in panel data:

Poolers begin with the presumption that data can be pooled:

  • The composite / population-averaged inference is the target
  • Unit effects are nuisances to control for, not the object of inquiry
  • Pooling is the default; heterogeneity is corrected, not modelled

Time-series scholars begin with deep scepticism of pooling:

  • Units are heterogeneous; pooling requires evidence, not assumption
  • The unit-specific trajectory is often substantively interesting
  • Estimates from short panels with large N describe a fictional average unit

These are priors and proclivities — neither is derived from a general rule

DPD/GMM sits in an uncomfortable middle:

  • Explicitly motivated by the cross-sectional dimension (N large)
  • But identification comes entirely from the time-series dimension of each unit

The practical upshot: theory should drive model choice. The choice of estimator is not neutral — it encodes maintained assumptions about the data-generating process. Report multiple estimators, be transparent about what each assumes, and let substantive interpretation guide, not justify, the choice.

Looking Ahead — GMM-DPD as Causal Claims: The Imai-Kim Connection

GMM-DPD is a consistency-and-identification framework. The causal tradition asks sharper questions: for whom and under what counterfactual does \hat{\gamma} or \hat{\boldsymbol{\beta}} describe a treatment effect?

GMM moment conditions are causal claims in disguise:

  • Strict exogeneity: \mathbb{E}[x_{it}\epsilon_{is}]=0\;\forall s,t = “outcomes never feed back to x” — no-feedback in potential-outcomes language
  • Predetermined: forward feedback forbidden, backward allowed = sequential ignorability given observables
  • Instrument validity \mathbb{E}[y_{i,t-2}\Delta\epsilon_{it}]=0 = an exclusion restriction: y_{i,t-2} affects y_{it} only through \Delta y_{i,t-1}

Imai and Kim (2019, AJPS) show TWFE identifies a causal effect only under two assumptions rarely stated:

Assumption TWFE DPD
No carryover: D_{i,t-s} does not directly affect Y_{it} Maintained silently Partially relaxed via distributed lags
No reverse feedback: Y_{i,t-s} does not affect D_{it} Maintained silently Explicitly modelled — the whole point of the lagged DV

By including y_{i,t-1} and instrumenting it, DPD moves Assumption 2 from the error term into the model. This is the DPD framework’s core contribution to causal thinking about panels. Assumption 1 (no carryover of treatment) remains implicitly maintained in most applications and requires distributed lag structures to relax.

TWFE, ATT(g,t), and the Day 10 Preview

The TWFE problem: Goodman-Bacon (2021) shows standard TWFE with staggered adoption is a weighted average of all 2\times 2 DiD comparisons — including ones where already-treated units serve as controls for later-treated units, generating negative weights when effects are heterogeneous over time or across cohorts.

Wooldridge’s (2021) unifying result: TWFE \equiv two-way Mundlak regression — the Mundlak (1978) correlated-random-effects device we already know from DPD:

y_{it} = \alpha + \tau D_{it} + \underbrace{\bar{y}_i\,\delta + \bar{y}_t\,\phi}_{\text{two-way Mundlak terms}} + u_{it} \;\;\equiv\;\; \text{TWFE}

Extending to cohort\timestime interactions (ETWFE) recovers Callaway and Sant’Anna’s (2021) causal estimand:

\text{ATT}(g,t) = \mathbb{E}\!\left[Y_{it}(g) - Y_{it}(\infty) \;\big|\; G_i = g\right]

the average effect for cohort g at time t using never/not-yet-treated controls — heterogeneity-robust by construction.

The Day 9 → Day 10 handoff: Omitting \hat{\gamma} from a DiD specification is only valid if \gamma = 0 or treatment is independent of past outcomes. When the outcome is genuinely persistent, the untreated potential outcome Y_{it}(0) itself follows an AR process and parallel trends in levels need not hold even when it holds in differences. Day 10 addresses when the \gamma = 0 restriction can be defended and when a hybrid DPD-DiD approach is required.

Estimator Estimand R / Stata
Callaway-Sant’Anna (2021) ATT(g,t) did; csdid
de Chaisemartin-D’Haultfoeuille (2020) ATT for switchers DIDmultiplegt; did_multiplegt
Sun-Abraham (2021) CATT(g,t) fixest::sunab(); eventstudyinteract
Wooldridge (2021, 2023) ATT aggregates (ETWFE) etwfe; jwdid

References

Core DPD and GMM

  • Anderson, T.W. and Hsiao, C. (1981). Estimation of dynamic models with error components. JASA, 76, 598–606.
  • Arellano, M. and Bond, S. (1991). Some tests of specification for panel data. Review of Economic Studies, 58, 277–297.
  • Arellano, M. and Bover, O. (1995). Another look at the instrumental variable estimation of error-components models. Journal of Econometrics, 68, 29–51.
  • Blundell, R. and Bond, S. (1998). Initial conditions and moment restrictions in dynamic panel data models. Journal of Econometrics, 87, 115–143.
  • Bruno, G.S.F. (2005). Approximating the bias of the LSDV estimator for dynamic unbalanced panel data models. Economics Letters, 87, 361–366.
  • Holtz-Eakin, D., Newey, W. and Rosen, H.S. (1988). Estimating vector autoregressions with panel data. Econometrica, 56, 1371–1395.
  • Nickell, S. (1981). Biases in dynamic models with fixed effects. Econometrica, 49, 1417–1426.
  • Roodman, D. (2009). How to do xtabond2. Stata Journal, 9, 86–136.
  • Wawro, G. (2002). Estimating dynamic panel data models in political science. Political Analysis, 10, 25–48.
  • Windmeijer, F. (2005). A finite sample correction for the variance of linear efficient two-step GMM estimators. Journal of Econometrics, 126, 25–51.

Slope Heterogeneity and Cross-Sectional Dependence

  • Ditzen, J. (2021). Estimating long-run effects and the exponent of cross-sectional dependence: an update to xtdcce2. Stata Journal, 21, 687–707.
  • Mundlak, Y. (1978). On the pooling of time series and cross section data. Econometrica, 46, 69–85.
  • Pesaran, M.H. (2006). Estimation and inference in large heterogeneous panels with a multifactor error structure. Econometrica, 74, 967–1012.
  • Pesaran, M.H., Shin, Y. and Smith, R.P. (1999). Pooled mean group estimation of dynamic heterogeneous panels. JASA, 94, 621–634.
  • Pesaran, M.H. and Smith, R.P. (1995). Estimating long-run relationships from dynamic heterogeneous panels. Journal of Econometrics, 68, 79–113.
  • Pesaran, M.H. and Yamagata, T. (2008). Testing slope homogeneity in large panels. Journal of Econometrics, 142, 50–93.

Nonlinear and Limited Dependent Variable DPD

  • Blundell, R., Griffith, R. and Windmeijer, F. (2002). Individual effects and dynamics in count data models. Journal of Econometrics, 108, 113–131.
  • Heckman, J.J. (1981). The incidental parameters problem and the problem of initial conditions. In Manski and McFadden (eds.), Structural Analysis of Discrete Data. MIT Press.
  • Wooldridge, J.M. (2005). Simple solutions to the initial conditions problem in dynamic, nonlinear panel data models with unobserved heterogeneity. Journal of Applied Econometrics, 20, 39–54.
  • Wooldridge, J.M. (2023). Simple approaches to nonlinear difference-in-differences with panel data. Econometrics Journal, 26, C31–C66.

Causal Identification and DiD (Day 10 preview)

  • Callaway, B. and Sant’Anna, P.H.C. (2021). Difference-in-differences with multiple time periods. Journal of Econometrics, 225, 200–230.
  • de Chaisemartin, C. and D’Haultfoeuille, X. (2020). Two-way fixed effects estimators with heterogeneous treatment effects. American Economic Review, 110, 2964–2996.
  • Goodman-Bacon, A. (2021). Difference-in-differences with variation in treatment timing. Journal of Econometrics, 225, 254–277.
  • Imai, K. and Kim, I.S. (2019). When should we use unit fixed effects regression models for causal inference with longitudinal data? American Journal of Political Science, 63, 467–490.
  • Sun, L. and Abraham, S. (2021). Estimating dynamic treatment effects in event studies with heterogeneous treatment effects. Journal of Econometrics, 225, 175–199.
  • Wooldridge, J.M. (2021/2025). Two-way fixed effects, the two-way Mundlak regression, and difference-in-differences estimators. Empirical Economics. SSRN 3906345.