Why Stack the Equations?
Difference GMM removes the individual effect by differencing the dynamic-panel equation, then uses lagged levels as instruments. System GMM adds the original level equation and uses lagged differences as instruments for it. The point of stacking is to estimate the common parameter from both sets of equations and moments at once, while preserving the fact that each equation has a different error and a different valid instrument block.
Consider the dynamic panel model
where \(i=1,\ldots,N\) indexes units, \(\eta_i\) is a time-invariant individual effect, and \(\varepsilon_{it}\) is an idiosyncratic error. The parameter \(\rho\) is common across units. For clarity, the derivation below uses this scalar model; with additional regressors, the same construction applies after adding their equation-specific columns to the design and instrument matrices.
The differenced equation at date \(t\) is
For the exposition, use equations \(t=3,\ldots,T\). The standard difference moments use available lagged levels \(y_{is}\), \(s\leq t-2\), as instruments for the differenced equation at \(t\). The level moments use \(\Delta y_{i,t-1}\) as an instrument for the level equation at \(t\). The latter moments require an additional initial-condition restriction: these lagged differences must be uncorrelated with the individual effect as well as with the current idiosyncratic error. Stating the moments explicitly makes clear what the stack assumes.
Building the Two Instrument Blocks
For each unit, there are \(m=T-2\) differenced equations and \(m\) level equations in this setup. Order the equations by time within each block. Let \(Y_i^D\) be the \(m\times1\) vector of differenced outcomes and \(X_i^D\) the \(m\times1\) vector of their lagged differences. Let \(Y_i^L\) be the \(m\times1\) vector of level outcomes, and \(X_i^L\) the \(m\times1\) vector of their lagged levels. Then
where \(u_i^D\) contains \(\Delta\varepsilon_{it}\) and \(u_i^L\) contains \(\eta_i+\varepsilon_{it}\), for \(t=3,\ldots,T\). The difference-instrument matrix \(Z_i^D\) has one column for each selected lagged level and a row for each differenced equation. Its time pattern is triangular: later differenced equations can use more lagged levels. The level-instrument matrix \(Z_i^L\) has rows corresponding to level equations and columns corresponding to selected lagged differences, often one \(\Delta y_{i,t-1}\) instrument for each level equation. Restrictions or collapsing can reduce either block; every retained column must represent a moment condition being maintained.
Worked Example: Constructing the Blocks for Four Dates
Suppose a hypothetical panel has \(T=4\), so the differenced and level equations included here are at \(t=3,4\). Suppose the observed outcome path for one hypothetical unit is \(y_{i1}=2\), \(y_{i2}=3\), \(y_{i3}=4\), and \(y_{i4}=6\). The available differences are \(\Delta y_{i2}=1\) and \(\Delta y_{i3}=1\).
For the difference equation at \(t=3\), the eligible lagged level is \(y_{i1}\). For the equation at \(t=4\), the eligible levels are \(y_{i1}\) and \(y_{i2}\). With one separate column for each equation-specific instrument, the difference block is
The first row belongs to \(t=3\), and the second belongs to \(t=4\). For the level equations, use \(\Delta y_{i2}\) at \(t=3\) and \(\Delta y_{i3}\) at \(t=4\), giving
The two matrices are not interchangeable. Lagged levels instrument differenced equations because they are orthogonal to the differenced error under the difference-moment restrictions. Lagged differences instrument level equations only under the additional level-moment restrictions.
Stack the outcomes, regressors, and errors by placing the differenced block first and the level block second:
The stacked model is \(Y_i=X_i\rho+u_i\). To retain separate instrument blocks, define the combined instrument matrix as block diagonal:
The off-diagonal zero blocks mean that the difference instruments multiply the differenced residuals and the level instruments multiply the level residuals. Multiplying the transpose of the combined matrix by the stacked error gives the unit-level moment vector
where \(\rho_0\) is the true parameter. This vector combines the difference and level moments without asserting that their errors are independent. Their covariance is accounted for in the GMM weighting matrix.
From Moments to the Estimator
The sample analogue of the population moment restriction is the average of the unit-level moment vectors. Write \(q_i(\rho)=Z_i'(Y_i-X_i\rho)\). Then
There are generally more moments than parameters, so the sample moments cannot all be set to zero. GMM instead chooses the parameter that makes their weighted discrepancy from zero as small as possible. Let \(W_N\) be a symmetric positive-definite weighting matrix with the same dimension as \(g_N\). The estimator minimizes \(g_N(\rho)'W_Ng_N(\rho)\).
The formula follows directly from the minimization. Since \(g_N(\rho)=\bar a_N-\bar B_N\rho\), the objective is
Differentiating with respect to the scalar \(\rho\) gives \(-2\bar B_N'W_N(\bar a_N-\bar B_N\rho)\). At the minimum this derivative is zero, so
If \(\bar B_N'W_N\bar B_N\) is nonsingular, solving this equation yields the stated estimator. In the vector case, the same derivative calculation gives the corresponding normal equations.
Worked Example: Combining Moment Contributions
Continue the hypothetical four-date setup. Suppose that, at a candidate value of \(\rho\), the differenced residual vector for the unit is \(u_i^D=(0.2,-0.1)'\), and the level residual vector is \(u_i^L=(0.3,0.1)'\). These values illustrate the multiplication that forms the moments; they do not establish that the maintained population restrictions hold.
The difference moments are
The level moments are
Thus this unit contributes the five-element vector \(q_i=(0.4,-0.2,-0.3,0.3,0.1)'\). In a sample, the estimator uses the average of these unit-level vectors, not the moment vector from this one unit alone.
Worked Example: A Weighted System-GMM Calculation
Suppose a hypothetical sample produces the following two aggregated moment summaries for a scalar parameter: \(\bar a_N=(1,1)'\) and \(\bar B_N=(2,1)'\). These could represent a compact, two-moment illustration of the combined system. Use \(W_N=\operatorname{diag}(1,4)\), a positive-definite weighting matrix.
The numerator in the estimator is
The denominator is
Therefore \(\hat\rho_{\mathrm{sys}}=6/8=0.750\). The estimate minimizes the weighted squared discrepancy of the two sample moments from zero; it does not generally make each moment exactly zero. For comparison, using the identity matrix would give \((2+1)/(4+1)=0.600\), illustrating that the weighting matrix can affect an overidentified estimate.
Choosing the Weighting Matrix
A one-step estimator uses a specified positive-definite weighting matrix, often selected for convenient computation. A two-step estimator first obtains a consistent estimate and uses its unit-level moment vectors to estimate the covariance matrix of the moments. With independent units and a fixed number of moments, a common robust form is
where \(\hat\rho_1\) is the first-step estimate. The vector \(q_i\) includes all time periods and both equation blocks for unit \(i\); consequently, this construction allows arbitrary covariance among that unit’s moment contributions. Using separate covariance calculations for the two blocks and ignoring their cross-covariance would generally use a different weighting matrix.
Under the maintained moment conditions, suitable regularity conditions, a full-rank identification condition, and a weighting matrix that converges to a positive-definite limit, the estimator is consistent and asymptotically normal as the number of independent units grows. The efficient GMM weighting matrix is the inverse of the covariance matrix of the unit-level moments. This efficiency statement is conditional on the validity of the moments: a more efficient weighting matrix cannot repair an invalid level moment.
Assumptions and a Common Pitfall
The central assumption specific to system GMM is not simply that differencing removes the individual effect. It does: \(\Delta\eta_i=0\). The level equations do not remove it, and their instruments must satisfy the additional orthogonality condition involving \(\eta_i+\varepsilon_{it}\). In this basic setup, the required conditions are exactly the level moments \(E[\Delta y_{i,t-1}(\eta_i+\varepsilon_{it})]=0\). If the initial-value process or other features of the data make those restrictions implausible, adding the level block is not justified merely because it increases the instrument count.
The algebra also relies on a suitable asymptotic and identification framework. A standard setup treats \(T\) as fixed while \(N\) grows, assumes independent sampling across units, and requires the population derivative of the moments with respect to the parameter to have full column rank. In finite samples, a large instrument set can also make the weighting and estimation unstable; the number and depth of instruments therefore need deliberate control.
- Mistake: “The differenced equations eliminate \(\eta_i\), so every instrument in the stacked system is automatically valid.” Correction: Differencing validates neither the level equations nor their instruments. The level block relies on its own extra orthogonality restrictions.
- Mistake: Treating the two equation blocks as if they had identical errors or instrument sets. Correction: Keep the differenced and level instrument blocks distinct, stack their moments, and use a weighting matrix that can reflect covariance across the full unit-level moment vector.
- Mistake: Assuming the estimator sets every sample moment to zero. Correction: In an overidentified system, it minimizes a weighted quadratic form in the sample moments; individual moments need not vanish at the estimate.
Check Your Understanding
Use the definitions and equations above to answer these questions.
- Why does the differenced equation at \(t=4\) in the four-date example have more available lagged-level instruments than the equation at \(t=3\)?
- What additional restriction is required for \(\Delta y_{i,t-1}\) to instrument the level equation at \(t\)?
- Explain what the block-diagonal form of \(Z_i\) accomplishes when constructing \(q_i(\rho)\).
- For a vector parameter, what rank condition is needed for the displayed GMM estimator to be defined?
- Why can changing \(W_N\) change the estimate when there are more moments than parameters?