Tutorials › Econometrics (Graduate) › Constructing The Difference-GMM Instrument Matrix

Dynamic Panel Models · Tutorial 301 of 952

Constructing The Difference-GMM Instrument Matrix

Learn to place valid lagged levels into the correct differenced-equation rows and verify the resulting instrument matrix.

Advanced 11 min read

What You'll Learn

  • State the dynamic-panel model and the moment conditions that justify lagged-level instruments.
  • Identify which lagged outcome levels are available for each differenced equation.
  • Construct the uncollapsed, individual difference-GMM instrument matrix.
  • Verify its dimensions and count its instruments as periods are added.
  • Interpret the matrix product that contributes to the sample moment conditions.

Why the Instrument Matrix Has a Triangular Structure

In a dynamic panel, differencing removes a time-invariant individual effect, but it also makes the differenced lagged outcome correlated with the differenced error. Difference GMM addresses this endogeneity using older levels of the outcome as instruments. The key construction question is practical: for each differenced equation, which levels are old enough to be valid instruments, and where do they go in the matrix?

The answer produces a row for each usable differenced equation. As time advances, more earlier outcome levels are available, so each successive row has a wider instrument block. In the construction below, instruments are kept separate by equation; this is the uncollapsed, equation-specific form of the individual instrument matrix.

Model, Moment Conditions, and Indexing

For clarity, consider a balanced panel with one dynamic regressor, the lagged dependent variable, and an individual effect:

$$ y_{it}=\rho y_{i,t-1}+\alpha_i+u_{it},\qquad t=2,\ldots,T. $$

Here \(y_{it}\) is the outcome for individual \(i\) in period \(t\), \(\rho\) is the dynamic coefficient, \(\alpha_i\) is a time-invariant individual effect, and \(u_{it}\) is an idiosyncratic error. First differencing gives

$$ \Delta y_{it}=\rho\Delta y_{i,t-1}+\Delta u_{it},\qquad \Delta u_{it}=u_{it}-u_{i,t-1}. $$

The differenced equation starts at \(t=3\), since it uses \(\Delta y_{i,t-1}\), which requires outcome observations at \(t-1\) and \(t-2\). The earlier material on differencing dynamic panels establishes the relevant moment conditions: when the level errors have no serial correlation and earlier outcomes are orthogonal to current and subsequent idiosyncratic errors, \(y_{is}\) is a valid instrument for the differenced error at \(t\) when \(s\leq t-2\).

Moment condition: For each differenced equation at time \(t=3,\ldots,T\), the available lagged-level instruments satisfy $$ E[y_{is}\Delta u_{it}]=0,\qquad s=1,\ldots,t-2. $$ The outcome level dated \(t-1\) is not included: it can be correlated with \(u_{i,t-1}\), which is part of \(\Delta u_{it}\). The displayed moment conditions rely on the stated error and initial-condition restrictions; lagged values are not valid instruments merely because they are dated earlier.

The earliest differenced equation, at \(t=3\), therefore has just one available level instrument, \(y_{i1}\). The equation at \(t=4\) has \(y_{i1}\) and \(y_{i2}\), and the equation at \(t=5\) has \(y_{i1},y_{i2},y_{i3}\). The matrix records these choices row by row.

Definition and General Construction

Let \(\Delta u_i\) collect the differenced errors for the usable equations, ordered from \(t=3\) through \(T\). Let \(Z_i\) be the individual instrument matrix. Each row of \(Z_i\) corresponds to one differenced equation. Within that row, the instruments for that equation occupy their own block of columns, while the other equation blocks contain structural zeros.

Definition: The uncollapsed, equation-specific difference-GMM instrument matrix for the lagged dependent variable has one row for each \(t=3,\ldots,T\). Its row for equation \(t\) contains \(y_{i1},\ldots,y_{i,t-2}\) in the block assigned to that equation and zeros in all other equation blocks. Thus the block widths are \(1,2,\ldots,T-2\).

For an individual with observations through period \(T\), the matrix has \(T-2\) rows. It has

$$ 1+2+\cdots+(T-2) =\sum_{j=1}^{T-2}j =\frac{(T-2)(T-1)}{2} $$

columns. The first block has one column for the instrument in the \(t=3\) equation, the second block has two columns for the \(t=4\) equation, and so on. The zeros do not mean an instrument has a value of zero; they indicate that the column belongs to a different equation’s instrument block.

Written by blocks, the matrix is

$$ Z_i= \begin{bmatrix} y_{i1} & 0 & \cdots & 0\\ 0 & [y_{i1},y_{i2}] & \cdots & 0\\ \vdots & \vdots & \ddots & \vdots\\ 0 & 0 & \cdots & [y_{i1},\ldots,y_{i,T-2}] \end{bmatrix}. $$

Each bracketed entry in this display represents a block of columns, not a single scalar. The stacked differenced equation can then be written as \(\Delta y_i=\rho\Delta y_{i,-1}+\Delta u_i\), where both outcome vectors have \(T-2\) entries. The product \(Z_i'\Delta u_i\) collects the instrument-error products that contribute to the individual sample moments.

Worked Example: Three Differenced Equations

Suppose each individual is observed in periods 1 through 4. The differenced equations are for \(t=3,4\), and suppose the observed levels are \(y_{i1}=4\) and \(y_{i2}=7\). Construct the instrument matrix.

For \(t=3\), only \(y_{i1}\) is available. For \(t=4\), both \(y_{i1}\) and \(y_{i2}\) are available. The block widths are therefore 1 and 2, so the matrix must have 2 rows and \(1+2=3\) columns:

$$ Z_i= \begin{bmatrix} y_{i1} & 0 & 0\\ 0 & y_{i1} & y_{i2} \end{bmatrix} = \begin{bmatrix} 4 & 0 & 0\\ 0 & 4 & 7 \end{bmatrix}. $$

The first row is the \(t=3\) equation and contains its single eligible instrument, \(4\). The second row is the \(t=4\) equation and contains \(4\) and \(7\) in its equation-specific block. As a dimension check, \(T-2=2\) rows and \((T-2)(T-1)/2=2(3)/2=3\) columns.

How the Matrix Expands with Time

Adding a period adds one differenced equation and a new block containing all levels eligible for that equation. It does not alter the earlier equations’ instrument sets: their rows and blocks remain in place. For example, increasing the panel from \(T=4\) to \(T=5\) adds the \(t=5\) equation, whose eligible levels are \(y_{i1},y_{i2},y_{i3}\). The total number of columns rises from 3 to \(3+3=6\).

Here is the full matrix through \(T=5\), using hypothetical levels \(y_{i1}=2\), \(y_{i2}=3\), and \(y_{i3}=5\):

$$ Z_i= \begin{bmatrix} 2 & 0 & 0 & 0 & 0 & 0\\ 0 & 2 & 3 & 0 & 0 & 0\\ 0 & 0 & 0 & 2 & 3 & 5 \end{bmatrix}. $$

The row for \(t=3\) occupies the first block of width 1. The row for \(t=4\) occupies the next block of width 2. The row for \(t=5\) occupies the final block of width 3. The dimension check is \(T-2=3\) rows and \((T-2)(T-1)/2=3(4)/2=6\) columns.

Worked Example: Four Differenced Equations

Suppose observations are available through period 6 and the hypothetical outcome levels are \(y_{i1}=8\), \(y_{i2}=10\), \(y_{i3}=11\), and \(y_{i4}=15\). Construct the entire instrument matrix, not just its newest block.

The equations are dated \(t=3,4,5,6\). Their available instrument lists are, respectively, \([y_{i1}]\), \([y_{i1},y_{i2}]\), \([y_{i1},y_{i2},y_{i3}]\), and \([y_{i1},y_{i2},y_{i3},y_{i4}]\). Their block widths sum to \(1+2+3+4=10\), so \(Z_i\) has 4 rows and 10 columns:

$$ Z_i= \begin{bmatrix} 8 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0\\ 0 & 8 & 10 & 0 & 0 & 0 & 0 & 0 & 0 & 0\\ 0 & 0 & 0 & 8 & 10 & 11 & 0 & 0 & 0 & 0\\ 0 & 0 & 0 & 0 & 0 & 0 & 8 & 10 & 11 & 15 \end{bmatrix}. $$

The last row has six leading zeros because the first three equation blocks occupy \(1+2+3=6\) columns; its four nonzero entries occupy columns 7 through 10. In particular, the final entry is \(y_{i4}=15\). The dimension check gives \(T-2=4\) rows and \((T-2)(T-1)/2=4(5)/2=10\) columns.

To see what the columns represent, suppose the four differenced errors for this individual are \(0.2,-0.1,0.3,-0.2\), ordered by \(t=3,4,5,6\). Then

$$ Z_i'\Delta u_i = \begin{bmatrix} 8(0.2)\\ 8(-0.1)\\ 10(-0.1)\\ 8(0.3)\\ 10(0.3)\\ 11(0.3)\\ 8(-0.2)\\ 10(-0.2)\\ 11(-0.2)\\ 15(-0.2) \end{bmatrix} = \begin{bmatrix} 1.6\\ -0.8\\ -1.0\\ 2.4\\ 3.0\\ 3.3\\ -1.6\\ -2.0\\ -2.2\\ -3.0 \end{bmatrix}. $$

Each component is one instrument multiplied by the differenced error in the equation where that instrument is used. Across individuals, these contributions are aggregated to form sample moments. The calculation illustrates the matrix’s bookkeeping role; it does not by itself establish that the population moments are zero.

Justifying the Eligibility Rule

The lag cutoff can be checked directly from the differenced error. If the level errors are serially uncorrelated, then for \(s\leq t-2\), the level \(y_{is}\) is orthogonal to both \(u_{it}\) and \(u_{i,t-1}\), under the required initial-condition and timing assumptions. Consequently,

$$ E[y_{is}\Delta u_{it}] =E[y_{is}u_{it}]-E[y_{is}u_{i,t-1}] =0-0 =0. $$

By contrast, \(y_{i,t-1}\) generally contains information about \(u_{i,t-1}\), so the second expectation in the same difference need not be zero. That is why the instrument list stops at \(t-2\), rather than including the immediately preceding level \(y_{i,t-1}\). The rule depends on the model’s moment assumptions; it is not a universal property of all lagged observations.

The increasing block widths follow from this cutoff: equation \(t\) has \(t-2\) eligible levels. Summing those widths from \(t=3\) to \(T\) gives

$$ \sum_{t=3}^{T}(t-2) =\sum_{j=1}^{T-2}j =\frac{(T-2)(T-1)}{2}. $$

This count is for the displayed uncollapsed matrix with equation-specific instrument columns. It is a structural count implied by the construction, not a claim about how many distinct numerical values happen to appear in the matrix.

Common Mistakes and Why the Construction Matters

  • Using too recent a level. Including \(y_{i,t-1}\) because it is the most recent observation ignores its possible correlation with \(u_{i,t-1}\), which enters the differenced error with a negative sign. The valid list under the stated moments ends at \(y_{i,t-2}\).
  • Putting every instrument in every row. A level belongs in the instrument block for an equation only when its date satisfies \(s\leq t-2\). The block-and-zero layout makes this equation-specific availability explicit.
  • Confusing the number of rows and columns. There are \(T-2\) differenced equations, hence rows, but the uncollapsed column count is the sum of the block widths, \((T-2)(T-1)/2\).
  • Showing only a new block as though it were the full matrix. A new block can be displayed on its own, but it must be labelled as such. In the full matrix, its row must retain the preceding zero entries and the earlier rows must retain their original instrument entries.

Constructing \(Z_i\) carefully matters because the instrument matrix encodes which moment conditions are being used. A misplaced value or an incorrect block width changes those conditions, not merely the appearance of the notation. Before using a matrix, check the equation dates, the lag cutoff, the dimensions, and the alignment of every nonzero block.

Check Your Understanding

Use the uncollapsed, equation-specific construction and the stated moment-condition rule.

  1. For a panel observed through \(T=7\), how many differenced-equation rows and instrument columns does \(Z_i\) have?
  2. Which lagged levels are available as instruments for the differenced equation dated \(t=6\)?
  3. For \(T=5\), explain why the third row has a block of width 3 and identify the columns occupied by that block.
  4. Why is \(y_{i,t-1}\) generally excluded from the instrument list for the equation at time \(t\)?
  5. For the four-equation matrix in the worked example, how many leading zeros appear in its final row, and which outcome levels occupy the final block?
Clinical Biostats