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)