Datatype ordered some times give correct result, real gives correct result but different order

Hi, my model is training parameter mu, and tau

When setting parameter

ordered[N] mu

the model gives partially correct result. 1 of the 4 chains reveals the true value.

When setting parameter

real mu[N]

All chains sampels the correct results but in different order.

Becasue the order of result are’t the same, the rhat is really high.

Is there anyway to get correct results but with ordered results?

Because of different order in chains, I cannot get the 95% credit interval for the results. Or do I have to manually set the fit object to correct the results?

I’ll repeat my response to the issue:

We have much more efficient built-ins for HMMs now. See:

We just haven’t gotten around to updating the user’s guide. @charlesm93 will hopefully write up a chapter for the user’s guide soon.

HMMs are a mixture model, and those are hard to identify. I’d suggest starting with @betanalpha’s case study to get a better sense of the problems and ways to mitigate them:

1 Like