Dynamic Panels

Python · from-scratch GMM  ·  R · plm::pgmm  ·  Arellano & Bond, 140 UK firms

One Term That Breaks Both Workhorses

The previous page ended on an estimator that disagreed with itself: first differences and fixed effects, both consistent under the same assumption, returned opposite signs. One standard reason for that is a lagged dependent variable — when last period's outcome drives this period's, which is true of employment, debt, health and most things that adjust slowly.

yit=ρyi,t1+βXit+αi+εity_{it} = \rho\,y_{i,t-1} + \beta'X_{it} + \alpha_i + \varepsilon_{it}

That single term breaks both workhorses, and it breaks them in opposite directions. Pooled OLS leaves the firm effect αi\alpha_i in the error, where it correlates with the lag, biasing persistence upward. The within transformation removes αi\alpha_i but induces a mechanical correlation between the demeaned lag and the demeaned error — the Nickell bias, of order 1/T1/T, which pushes it downward.

It is worth being concrete about what the number means before comparing estimates of it. ρ\rho is how much of a firm's employment carries over from one year to the next: at ρ=0.93\rho = 0.93 almost all of it does and a shock takes decades to fade, while at ρ=0.51\rho = 0.51 half the level washes out each year. Those are not two estimates of the same quantity with different error bars — they are different accounts of how firms behave. Neither is consistent, but the pair is useful anyway. On Arellano & Bond's own data — 140 UK firms, 1976–1984, 1,031 firm-years of log employment — pooled OLS gives 0.932 and fixed effects 0.514. With no known truth, Bond's bracket is the real-data stand-in: a consistent estimate must land between them.

Instrumenting the Differenced Lag

First-differencing removes αi\alpha_i, but Δyi,t1\Delta y_{i,t-1} still correlates with Δεit\Delta\varepsilon_{it} since both contain εi,t1\varepsilon_{i,t-1}. Lagged levels fix that: they move the differenced lag while staying uncorrelated with the differenced error. Anderson–Hsiao uses a single one and lands at 0.584, inside the bracket. Arellano–Bond difference GMM uses every available lag and lands at 0.336below the downward-biased fixed-effects estimate.

estimatorpersistence ρreading
pooled OLS0.932biased up — firm effect left in the error
fixed effects0.514biased down — Nickell bias, order 1/T
Bond bracket: a consistent estimate must lie in [0.51, 0.93]
Anderson–Hsiao IV0.584single lag instrument — inside the bracket
Arellano–Bond difference GMM0.336below FE — overshoots the bias it corrects
Blundell–Bond system GMM0.635restored inside; pgmm gives 0.658

That is a red flag, not a result. An estimator built to correct a downward bias should not overshoot past the biased estimate it was correcting. The cause is the persistence itself: when ρ\rho approaches 1 the series is nearly a random walk, and distant levels barely predict the current difference. The instruments go weak exactly when the model needs them most — which is the panel-data face of the pathology the weak-instrument page quantified.

Blundell & Bond's system GMM augments the moment set rather than replacing it, stacking the differenced equation with a levels equation instrumented by lagged differences. Those stay informative as ρ1\rho \to 1, and they restore the estimate to 0.635 — back inside the bracket, and matching plm::pgmm's 0.658.

The Diagnostics That Do Not Cooperate

Then the diagnostics, which do not all cooperate. The AR(2) test is clean: second-order correlation in the differenced residuals would invalidate the lagged-level instruments, and it is nowhere near significant. But the Sargan over-identification test rejects at p=0.003p = 0.003. The model uses more instruments than it strictly needs, and that surplus is what makes the assumption testable at all: if every instrument is valid, they should all point at the same coefficient. Sargan asks whether they do.

diagnosticresultverdict
AR(1) in differenced residualsp = 0.007rejects — expected and fine
AR(2) in differenced residualsp = 0.623 0.670 in Rdoes not reject — good
instrument count42 against 140 firmswithin the usual rule of thumb
Sargan over-identificationp = 0.003rejects

The Sargan test is computed in the R companion, whose specification requests every available lag and so carries many more instruments than the 42 used by the from-scratch model.

Two readings, and neither rescues the other. Taken at face value the rejection says some moment conditions are invalid, which would undercut the estimate the section just restored. But Sargan over-rejects badly when instruments proliferate, and the R specification requests every available lag while the from-scratch model here uses 42 moment columns against 140 firms. So the test fails, and cannot be trusted to have failed for the right reason.

What that leaves is a weaker claim than "system GMM fixes it": the estimate is back inside the bracket and the lagged-level instruments are not obviously invalid, but the over-identifying restrictions are unconfirmed. The standard remedy — collapse the instrument set or cap the lag depth and check that ρ\rho survives — is the honest next step rather than a footnote.

The pattern across the four estimators is the useful takeaway. Each one is biased in a knowable direction, and the discipline is to use that structure rather than to trust any single number: OLS above, FE below, difference GMM below FE when the series is persistent, system GMM back inside. A dynamic panel estimate that lands outside its own bracket is telling you something, and the notebook's diff-GMM result is the demonstration.

Where this sits

The weak-instrument failure here is the panel-data form of the weak-instrument problem in IV — lagged levels are instruments, and persistence is what makes them weak. The within transformation and clustered inference come from Panel Data & Fixed Effects. And the many-moment GMM machinery is the same orthogonality-condition apparatus that reappears, with cross-fitting, in double machine learning.

Notebooks

Downloads

References