Why wouldn’t this work? It’s identified through the prior.
Of course, the prior will matter here for fitting.
A simpler alternative
parameters {
positive_ordered[K] pi_raw;
...
transformed parameters {
ordered[K] pi = softmax(pi_raw);
won’t work because the pi_raw
parameters won’t be identified. And you can’t just add a zero value to identify if you want to preserve orderedness. You can’t just put a prior on pi
here without including the log Jacobian of the softmax transform, either.