Inference issue using a model with Multinomial latent variables on multidimensional observations

In general you can sample any distribution, but sometimes the sampler will fail. This cannot be known in advance, and you will notice it by checking that r_hat is very high across chains or the samples seem “stuck”.

Furthermore, non-NUTS samples (which discrete variables must necessarily use) can fail to sample more quietly than the NUTS sampler (which continuous variables are automatically assigned to if we can get gradients).

The only case I know fails all the time is Multinomial because it’s the only discrete multivariate variable we have, and it has a very specific constraint (all values must add up to n). It would need a sampler that is aware of this fact. We could perhaps raise an error.

Note you can still use Multinomial just fine as a likelihood.