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.

  • $\begingroup$ I have formatted your question with $L_AT^EX$. Please double-check that I haven't mistakenly introduced errors to your formulae. $\endgroup$
    – Sycorax
    Dec 3, 2013 at 14:16
  • 1
    $\begingroup$ I haven't worked with endogenous/exogenous variables. Having said that: Have you thought of using lme instead of lmer so that you can define an AR=1 correlation structure for your errors and see if that takes care of your endogeneity? $\endgroup$
    – usεr11852
    Dec 7, 2013 at 2:35
  • $\begingroup$ Thanks for the comment. In fact I am doing this, but I did not want to complicate things. Unfortunately, this does not solve the endogeneity issue. Here is a paper illustrating why lagging variables does not help too much: business.otago.ac.nz/econ/seminars/Abstracts/2013/… $\endgroup$
    – majom
    Dec 7, 2013 at 9:05
  • $\begingroup$ Are there any updates to this problem? A frequentist approach in R would be great. $\endgroup$
    – sam
    May 18, 2016 at 14:57
  • $\begingroup$ @ sam: Me and my colleagues started working on a R package which implements some approaches. An early version can be found at cran.r-project.org/web/packages/REndo/index.html. $\endgroup$
    – majom
    May 19, 2016 at 8:41

1 Answer 1


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.

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


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.