Software

moveHMM

We developed the R package moveHMM for the analysis of movement data with hidden Markov models.

momentuHMM

The R package momentuHMM extends moveHMM to more general and flexible models. Additional features include: unlimited number of data streams, inclusion of covariates on the observation distribution parameters, centres of attraction, multiple imputation to account for irregular sampling and/or measurement error, etc.

hmmTMB

hmmTMB is a general R package for hidden Markov models, which uses TMB and mgcv to allow for random effects and non-parametric covariate effects on model parameters (with automatic smoothness selection). The package is available on Github, and it is described in several vignettes:

Other R packages

Miscellaneous

Vianey Leos Barajas and I wrote a tutorial about using Stan to implement hidden Markov models, in particular to analyse animal movement data. In that document, we re-analyse the wild haggis data set from the moveHMM paper.

A while ago, I also wrote a document about implementing hidden Markov models in R and/or C++ (using Rcpp). It describes two examples in detail: a 2-state HMM with Poisson-distributed observations, and a 3-state HMM inspired by movement models. R code is provided for simulation, estimation, and inference in these models.