Converting Stan's Manual Multivariate Hierarchical Model

Not quite. The SUG example is unfortunately a little over-complex for pedagogical purposes, so maybe check out the version here, which reduces the complexity a bit (omits predictors that vary among the “groups” in the SUG example’s nomenclature), has better-named variables and better commenting, plus a speed-up trick as well. There’s also lectures I did a while back covering these models starting here.

Edit: oh, I lie, the case-study-preview models do include the “group-level” predictors (“between” predictors in its nomenclature). But the lectures cover the within-only case.