1
$\begingroup$

Take this mixed effects model in R:

$y_i = \beta_0 + \beta_1X_{ij} + u_{j} + e_{ij}$

where $u$ is a random effect (level 2 residual) with groups $j$. It is possible to allow the variance of $e_{ij}$ (level 1 residuals) to be a function of $X$. This could potentially result in a 'fanning out' or 'fanning in' of level 1 residuals within each group $j$.

Is it possible to implement this 'complex level 1 variance' mixed effects model in R? Does lme4 allow it?

(Stack Overflow doesnt appear to allow LaTeX formatting of mode formula so I've asked this question here)

$\endgroup$
2
$\begingroup$

lme4 does not offer possibility to model variance components, however it is possible with nlme package, where you can define different variance functions. Check also this answer and the references: Modeling error structure in lmer in R?

$\endgroup$
  • $\begingroup$ Why is this feature implemented in an older version of lme but not a newer version? $\endgroup$ – luciano Dec 26 '14 at 15:54
  • $\begingroup$ nlme is not older version of lme4, I don't know why it was not implemented in lme4 - you could ask the authors. $\endgroup$ – Tim Dec 26 '14 at 16:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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