I have a univariate time series `y_t` observed at times `t = 1, ..., T`, and I want to fit a Gaussian hidden Markov model with `K` latent states. The model has an initial state distribution, a `K x K` transition matrix, and state-specific normal emission distributions.

My model is:
`pi_1` is the initial state probability vector,
`Pr(z_1 = k) = pi_{1,k},`
`Pr(z_t = k | z_{t-1} = j) = A_{j,k}, for t = 2, ..., T,`
`y_t | z_t = k ~ Normal(mu_k, sigma_k), for t = 1, ..., T,`
`mu_1 < ... < mu_K,`
`sigma_k ~ Uniform(0, inf), for k = 1, ..., K,`
`pi_1 ~ Dirichlet(1, 1, ..., 1) on the K-simplex,`
`for each j = 1, ..., K, the row A_{j,.} = (A_{j,1}, ..., A_{j,K}) ~ Dirichlet(1, 1, ..., 1) on the K-simplex,`
`(mu_1, ..., mu_K) has flat improper prior p(mu_1, ..., mu_K) ∝ 1 on the ordered support {mu_1 < mu_2 < ... < mu_K}.`

Here:
`y_t` is the observed outcome at time t,
`z_t` is the latent state at time t,
`pi_1` is the vector of initial state probabilities,
`A_{j,k}` is the transition probability from state j to state k,
`mu_k` is the mean of the Gaussian emission distribution for state k,
`sigma_k` is the standard deviation of the Gaussian emission distribution for state k,
`K` is the number of hidden states,
`T` is the length of the time series.

Parameterization notes:
In `Normal(mu, sigma)`, `sigma` denotes a standard deviation.
