I’m using sbc() in rstan on a latent compositional model with multinomial observations, and am getting very U-shaped histograms for all my parameters. My real case is a factorial experiment with overdispersion and blocking, but I get the same behaviour even in the simplest case where my compositional model has only a mean vector:

\mu \sim N(\mathbf 0, 4 \mathbf I_4)

\mathbf x = \mu

\rho = \text{ilr}^{-1}(\mathbf x)

\text{counts} \sim \text{multinomial}(n, \rho)

Here, \mu \in \mathbb R^4 is the mean vector, and \text{ilr}^{-1} is an inverse isometric logratio transformation so that \rho \in \mathbb S^4 is a parameter for a multinomial with 5 categories. Each observation is a multinomial with around 100 trials, and I have 60 observations (which I would have thought is enough for models of this kind to work). My priors are based at least to some extent on genuine prior knowledge, so I wouldn’t want to change them all that much. There’s nothing else obviously wrong (e.g. n_eff, Rhat all look OK, I’m not seeing divergent transitions, and posterior distributions of \rho are roughly centred on sample estimates even in my more complicated real case).

Any idea where things are going wrong?

Example attached. I’m using R 3.6.3, rstan 2.21.1 with stan headers 2.21.0-5, 64-bit Ubuntu 18.04.

aureliaexample.R (616 Bytes) aureliaexample.stan (1.8 KB) sbc.pdf (5.6 KB)