# Hierarchical priors - matrix of group coeffs in users guide

Given J groups and L group level predictors, there will be matrix[L, J] group coeffs, correct? The Stan Users Guide Section 1.13 Multivariate Priors for Hierarchical Models has parameter gamma as
matrix[L, K] where K is the number of individual predictors, as shown below. I did see this same thing reproduced in another example so wondering if I am missing something.

data {
int<lower=0> N;              // num individuals
int<lower=1> K;              // num ind predictors
int<lower=1> J;              // num groups
int<lower=1> L;              // num group predictors
array[N] int<lower=1, upper=J> jj;  // group for individual
matrix[N, K] x;              // individual predictors
array[J] row_vector[L] u;    // group predictors
vector[N] y;                 // outcomes
}
parameters {
corr_matrix[K] Omega;        // prior correlation
vector<lower=0>[K] tau;      // prior scale
matrix[L, K] gamma;          // group coeffs
array[J] vector[K] beta;     // indiv coeffs by group
real<lower=0> sigma;         // prediction error scale
}


Possibly nomenclature is tripping you up here as it has done so repeatedly for me (see here for my most recent self-clarifying post).

Using the terms of the SUG 1.13, think first at the individual level, where there are K predictors; then each of the L group-level predictors serve to shove around each of these K predictors, yielding a K\times L matrix of group-level coefficients, encoded in the model code by the gamma variable.

Okay thanks this makes sense. I’m sure it is evident in code what is happening and I didnt look deep enough.