Skip to content

Introduction to Hidden Markov models

Learn about a powerful technique to model longitudinal data.

Level Expert
Tags IntroductionMultistateTime series
Links Stan R Python Julia

This notebook explores how longitudinal data can be modelled as a sequence of (noisy) observations emitted from latent states.

The content covers simulating hidden markov models using HiddenMarkovModels.jl, and inference on transition and emission probabilities via Turing.

It’s also a great showcase of julia’s and Turing’s extensibility: we can reuse all the logdensity calculations provided by HiddenMarkovModels.jl inside our Turing model (and once I get around to updating this to FlexiChains instead of MCMCChains, we’ll even be able to return HMM objects directly)!