Linear Mixed Model (intercept only) with crossed and nested factors: historical US votes example

It tells you farther down in the code. M_* is the number of standard deviations that it has to estimate for that grouping factor. And the Z_ variables are the variables to the left of the | in the formula, which are often going to be 1. So, you get code in the model block like

mu[n] = mu[n] + (r_1_1[J_1[n]]) * Z_1_1[n] + (r_2_1[J_2[n]]) * Z_2_1[n];

which extracts the appropriate r_ value by ID and multiplies it by the corresponding Z_ value to update the conditional mean.

1 Like