0

According to e.g. https://stats.stackexchange.com/a/61466/14346, the following simple model: $$ x_{label} = a_{label} + e_{label} $$ writes in lmer syntax as:

x~1|label

However, I do not manage to understand this formulation : What is the meaning of this when dealing with multiple observations i.e. multiple (and different) observations $x_{label}$ for a given label ?

peuhp
  • 4,622
  • 20
  • 38

2 Answers2

2

I could not find that model in the link, but that is probably not that important. I assume that in $a_{label}+e_{label}$ $a$ stands for a constant and $e$ for an error term. Thus $x_{label} = a_{label} + e_{label}$ means, that there is a constant for every $label$ that is measured with some error. Translation to lmer is x~1|label where 1 stands for the intercept or constant and |labelstands for "different for each label" and ~that there is an error term.

peuhp
  • 4,622
  • 20
  • 38
Bernhard
  • 7,419
  • 14
  • 36
  • 1
    (+1) Maybe it would help to write a generative model for this case: $$x\sim \mathcal N(a + a_i, \sigma^2),\;\;\; a_i \sim \mathcal N(0,\sigma_a^2),$$ where $i$ indexes labels/groups. The `lmer` function will fit these three parameters to the data. – amoeba Feb 08 '17 at 15:56
  • So is the equivalent model: $x_{j,l} = a_l + e_{j,l}$ with $e_{j,l} \sim N(0,\sigma^2_l)$ ? which is for me not the same that those given in the examples. – peuhp Feb 08 '17 at 15:57
  • @pheup Not quite. See my comment above. – amoeba Feb 08 '17 at 15:58
  • @peuhp Yes. Sticking with the $x_{level}=a_{level}+e_{level}$ notation one would expect the error $e$ to be normally distributed around 0. Moreover, the random effect $a_{level}$ is also considered to be randomly distributed around some $a$, which is denoted in amoebas comment but not in my answer. – Bernhard Feb 08 '17 at 16:03
  • @Bernhard. My point is about $x_{j,l}=a_l+e_{j,l}$ with $e_{jl} \sim N(0,\sigma^2_l)$ is not the same than $x_{j,l}=a_l+e_{l}$ with $e_{l} \sim N(0,\sigma^2_l)$ and that the notation is not clear on that. – peuhp Feb 08 '17 at 16:09
2

The full formula is

x ~ 1 + 1|label

what translates to model with a global intercept and random intercepts for each group label.

Hierarchical model diagram

In probabilistic notation this translates to the following model

$$ \begin{align} x_i &\sim \mathcal{N}(\mu + \alpha_j, \sigma^2_0) \\ \alpha_j &\sim \mathcal{N}(0, \sigma^2_\alpha) \end{align} $$

where $\mu$ is a global intercept, $\alpha_j$ are random intercepts specific for observations in each $j$-th group and there is normal "noise" on both levels.

Tim
  • 108,699
  • 20
  • 212
  • 390