Different equations for linear mixed model I don't have statistics background but I am studying LMM and trying to understand why different resources have different notation. Based on my reading I tried following as simple model with random intercept and slope:
 Y ~ 1 + A + (1+A|B)

According to this (behind paywall), the equation should be

According to this (wikipedia), the equation should be

My question is regarding B(1j). 1) In the R syntax I showed, which is the correct equation? 2) What is the difference in interpretation of two equations?
 A: Neither are correct. Both formulations are for a model with two covariates, $X$ and $W$.
For your model:
Y ~ 1 + A + (1 + A|B)

this has the following features:

*

*a global intercept, let us call it $\beta_0$

*a random intercept, let's call it $u_{0j}$, where $j$ indexes the groups of B

*fixed effects for A, let's call it $\beta_1$

*random slopes for A within levels of B, let's call it $u_{1j}$

*residual error, let us call it $e_{ij}$ for the $i$th observation within the $j$th group of B
We could write this model as:
$$ Y_{ij} = \beta_0 + u_{0j} + ( \beta_1 + u_{1j}) A  + e_{ij} $$
Thus each subject $j$ has it's own intercept, which we could call $\beta_{0j} = \beta_0 + u_{0j}$, and it's own slope for $A$, which we could call $\beta_{1j} = \beta_1 + u_{1j}$, thus we could easily re-write this as:
$$ \begin{align}
\text{Level 1: } \qquad
 Y_{ij} &= \beta_{0j} + \beta_{1j}A  + e_{ij} \\
\text{Level 2: } \qquad
 \beta_{0j} &= \beta_0 + u_{0j} \\
 \beta_{1j} &= \beta_1 + u_{1j}
 \end{align}
$$
which is similar to the formulations in the question.
