I’m a bit embarrassed to ask for help as it exposes me as a Bayesian charlatan, but I’d rather show weakness than be wrong! I am working on a project that utilizes a Bayesian hierarchical model via brms. I understand the brms notation - as well as the conceptual implications of that notation - but I’m finding that I am struggling to write out by hand the actual Bayesian model being fit. I’ve looked at both prior_summary() and stancode() for help, but would appreciate feedback from a real Bayesian.

My model may seem odd, but I’ve specified it the way I have for theoretical reasons (at least the random effects structure). I chose normal priors for the main effects to encourage shrinkage, but my choices of priors for class “sd” and class “cor” were per the examples in the brms manual. My model code is below.

```
comp_ilr_c_pos <- brm(data = train, family = gaussian,
bf(game_score ~ GS_10 + MP_10 + C_ad + PF_adj +
PG_adj + SF_adj +
(0 + C_adj + PF_adj + PG_adj_ + SF_adj | opponent),
sigma ~ 1 + (1 | slug)),
prior=c(set_prior("normal(0, 10)", class="b"),
set_prior("cauchy(0, 2)", class="sd"),
set_prior("lkj(2)", class="cor")),
warmup=1000, iter=2250, chains=8,
control=list(adapt_delta=0.95), cores = 8)
```

Here is my attempt at writing out a representation of the model. I seem to have lost where the Cauchy prior lives for one of the sd parameters, and I’m not sure whether I’ve correctly represented the random effect structure. Note: i is an index for “slug”, k is an index for “opponent”, and j is an index for the jth observation of slug i.

In case it helps, the output from prior_summary(comp_ilr_c_pos) is below. My apologies for the bad copy/paste job.

```
prior class coef group resp dpar nlpar lb ub source
normal(0, 10) b user
normal(0, 10) b C_adj (vectorized)
normal(0, 10) b GS_10 (vectorized)
normal(0, 10) b MP_10 (vectorized)
normal(0, 10) b PF_adj (vectorized)
normal(0, 10) b PG_adj (vectorized)
normal(0, 10) b SF_adj (vectorized)
student_t(3, 7.9, 7.3) Intercept default
student_t(3, 0, 2.5) Intercept sigma default
lkj_corr_cholesky(2) L user
lkj_corr_cholesky(2) L opponent (vectorized)
cauchy(0, 2) sd 0 user
student_t(3, 0, 7.3) sd sigma 0 default
cauchy(0, 2) sd opponent 0 (vectorized)
cauchy(0, 2) sd C_adj_opponent 0 (vectorized)
cauchy(0, 2) sd PF_adj opponent 0 (vectorized)
cauchy(0, 2) sd PG_adj opponent 0 (vectorized)
cauchy(0, 2) sd SF_ad opponent 0 (vectorized)
student_t(3, 0, 7.3) sd slug sigma 0 (vectorized)
student_t(3, 0, 7.3) sd Intercept slug sigma 0 (vectorized)
```

Any help is greatly appreciated!