Spatial hidden Markov models implementation

Hi! Would like to know if there are any state-of-the-art implementations of spatial hidden Markov models on Stan. In particular, looking for a model where we have a networked/spatially correlated discrete latent variable + observed discrete variables for each node.

The current case studies on HMMs in the user guide (for example Tagging Basketball Events with HMM in Stan) are not, to me, obviously exploitable to a spatial setting. I also tagged this as “ecology” because it seems like a problem common to that field, as for example in species tracking and identification (Marginalization of latent discrete states)


@imadmali i saw on this thread about tagging folks in questions that you are assigned to questions about hmms and spatial data. Do you have any insights?

Can you a bit more specific in about the type of model you’re looking for? I’m not clear on what you mean by networked/spatially correlated discrete latent variables. I think you might mean that your latent base-level states have some embedded spatial information, or in themselves represent spatial locations.

That is, the base level states are z_t \in (1, ... , K) which are not really parameters more just the structure of the model. It sounds like you’re asking about how you would incorporating and gaining inference on spatial relationships in the transition probabilities:
z_t \sim Categorical(\theta_{z[t-1]}) where the \theta_k are K-simplexes that describe the probability of transitioning from one state to another state at each timestep. Am I right in interpreting your question that you want to know about examples where these transitions probabilities represent spatial transitions?
E.g. you think that it’s more likely that the process in question transitions to nearby locations than distant locations?

I’m ignoring the “emission” variables and probabilities for the moment, but you did mention the observed variables are also discrete. It’s not clear if you mean these are also categorical or something more like integer counts.

There are certainly examples in ecology and Stan that might fit the bill. In particular @mbjoseph translated Spatial Capture-Recapture models in Stan. See: Spatial capture-recapture in Stan

But if you could be a little more specific in the process you’re trying to model, it might be easier to answer your question.