The main goal is to produce public programming code in Stan (Carpenter et al. HMM stipulates that, for each time instance $${\displaystyle n_{0}}$$, the conditional probability distribution of $${\displaystyle Y_{n_{0}}}$$ given the history $${\displaystyle \{X_{n}=x_{n}\}_{n\leq n_{0}}}$$ must not depend on $${\displaystyle \{x_{n}\}_{n