# Instrumental variables and mixed/multilevel models

I want to estimate a growth model to model the growth trajectories of individuals $j$ over multiple time points $t$ by applying a standard mixed/mutilevel model (also known as random coefficient model):

\begin{align}
Y_{tj} &= \beta_{0_j} + \beta_{1_j}A_{tj} + \beta_{2_j}X_{tj} + \beta_{3_j}Z_{tj} + e_{tj} \\
\beta_{0_j} &= \beta_0 + u_{0_j} \\
\beta_{1_j} &= \beta_1 + u_{1_j} \\
\beta_{2_j} &= \beta_2 + u_{2_j} \\
\beta_{3_j} &= \beta_3 + u_{3_j}
\end{align}

$A_{tj}$ is a linear growth function (i.e., time point of observation: $1,2,3, …, t$). $X_{tj}$ is an exogenous covariate. $Z_{tj}$ is an endogenous covariate. Let’s further assume that I have reasons to believe that one of the independent variables on level 1, $Z_{ij}$, is endogenous.

I am wondering whether or not I can use an instrumental variable approach (using the lag of the endogenous variable as an instrument) to deal with the endogeneity of $Z_{ij}$. However, I have not found any references or examples. Is this generally possible, and how can I change the standard R code for mixed models to do this? Currently I’m using the function call lmer(Y ~ X + Z + (1 + X + Z | ID), data=data).

Gelman & Hill (2006), Chapter 23.4 (pdf) show how to do this by applying a Bayesian approach. I would be interested in references and R code implementing a frequentist approach to control for endogeneity by using instrumental variables (i.e., lags of endogenous variables as instruments) within a multilevel model.