# Estimating parameters when introducing IV Instrument

Say, you have a model $$y_{it} = \beta_1 a_{it} + \beta_2 b_{it}$$ And you find that $$a_{it}$$ is endogenous, therefore, you need to find an instrument for it.

Say you find an instrument $$z_{it} = \Delta y_{it-1}$$ that is relevant and exogenous,

Would you be able to estimate $$\beta_1$$ and $$\beta_2$$ by estimating

$$\Delta y_{it} = \beta_1 \Delta y_{it-1} + \beta_2 \Delta b_{it}$$

And if so, how would this be done? I am running into a problem where the matrix of $$\Delta y_{it-1}$$ has fewer rows than $$\Delta b_{it}$$.

Would you just reshape $$\Delta b_{it}$$? Is this allowed?

It is allowed to use lags. In fact using using lags as instruments is actually quite common in some fields like macroeconomics (See Romer Advanced Macroeconomics pp 376).

However, note:

$$\Delta y_{it} = \beta_1 \Delta y_{it-1} + \beta_2 \Delta b_{it} +\epsilon_{it}$$

Is the reduced form of IV so it will give you estimate of: $$\beta_1 \pi$$, instead of just $$\beta_1$$ but you are getting rid of endogeneity. If you want to get just $$\beta_1$$ you could run 2SLS.

This is because you are basically substituting $$a_{it} = \pi_0 + \pi y_{it-1} +e_{it}$$ so:

$$\Delta y_{it} = \beta_1 \pi_0 + \beta_1 \pi y_{it-1} + \beta_2 \Delta b_{it} + \beta_1 e_{it} +\epsilon_{it}$$

You should not get an error doing that using common packages/programs.

If you are trying to program the IV estimator yourself in something like R you are likely getting the error because when you create matrix containing $$\Delta y_{t-1}$$ it won't match the matrix of $$\Delta y_t$$ as there is no way of having $$\Delta y_{t-1}$$ for the first row. A simple solution to this would be just to exclude the first row of your data matrix after you create $$\Delta y_{t-1}$$ variable from regression (or you could even outright delete it but I presume that data can still be useful for some summary statistics/visualizations).