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.

**Answer**

The paper of Peter Ebbes et al. (2005) proposes a Latent IV estimation, where you do not need external IVs.

- Ebbes, Peter; Wedel, Michel; Böckenholt, Ulf; Steerneman, Ton; (2005). “Solving and Testing for Regressor-Error (in)Dependence When no Instrumental Variables are Available: With New Evidence for the Effect of Education on Income.”
*Quantitative Marketing and Economics*3(4): 365-392. http://hdl.handle.net/2027.42/47579

Also the paper by Kim and Frees 2007 proposes a GMM estimation that helps you address the endogeneity problems in MLM.

- Jee-Seon Kim, & Edward W. Frees (2007). “Multilevel Modelling with Correlated Effects“.
*Psychometrika*, 72, 4, pp. 505-533.

However, I have not seen any R code for any of the two approaches :(.

**Attribution***Source : Link , Question Author : majom , Answer Author : gung – Reinstate Monica*