@@ -45,11 +45,11 @@ There are three functions
4545
4646- ` hmm_marginal ` - The likelihood of an HMM with the hidden discrete states
4747integrated out
48- - ` hmm_latent_rng ` - A function to generate draws of the hidden state that are
48+ - ` hmm_latent_rng ` - A function to generate posterior draws of the hidden state that are
4949implicitly integrated out of the model when using ` hmm_marginal ` (this is
5050different than sampling more states with a posterior draw of a transition matrix
5151and initial state)
52- - ` hmm_hidden_state_prob ` - A function to compute the distributions of the
52+ - ` hmm_hidden_state_prob ` - A function to compute the posterior distributions of the
5353integrated out hidden states
5454
5555This guide will demonstrate how to simulate HMM realizations in R, fit the data
@@ -271,11 +271,16 @@ generated quantities {
271271}
272272```
273273
274- Note, these are the probabilities and draws of the hidden state that was
275- integrated out. This is different than sampling new HMM realizations using
276- posterior draws of the initial condition and the transition matrix.
274+ Note that the probabilities from ` hmm_hidden_state_prob ` are the marginal
275+ probabilities of the hidden states, meaning they cannot be directly used to
276+ jointly sample hidden states. The posterior draws generated by ` hmm_latent_rng `
277+ account for the correlation between hidden states.
277278
278- These can be plotted as well:
279+ Note further these are draws of the hidden state that was integrated out. This is
280+ different than sampling new HMM realizations using posterior draws of the initial
281+ condition and the transition matrix.
282+
283+ The draws of the hidden state can be plotted as well:
279284
280285``` {r}
281286y_sim = fit$draws() %>%
0 commit comments