Are time-varying transition probabilities supported by the new hmm_* functions?

Question about the new hidden Markov modeling functionality in hmm_marginal, hmm_hidden_state_rng, and hmm_hidden_state_prob: are time varying state transition probability matrices supported?

The use cases that I have in mind are hidden Markov models in ecology (e.g., for animal behavioral states, occupancy states, live/dead, infected/uninfected states), which model transition probabilities as a function of time varying explanatory variables.


1 Like

I’m also interested in this but for marketing.

I don’t think so, but:

  1. the C++ code of the methods is IMHO reasonably transparent to adapt to Stan (and use time varying matrices)
  2. you can likely chain multiple one-step calls to the methods (didn’t really test this, but it seems plausible)
  3. I am working on a bit of code to let you use any brms-style predictors for the transition matrix, but it’s gonna take some time before it’s ready for public consumption.

Best of luck!

1 Like

Thanks @martinmodrak - that’s what I suspected. Much appreciated!

Time-varying transition matrices will be in the second iteration of the feature. The code is almost trivial to generalize – and has been tested outside of Stan – but we want to study the single-transition matrix performance first.