hmmTMB: Fit Hidden Markov Models using Template Model Builder

Fitting hidden Markov models using automatic differentiation and Laplace approximation, allowing for fast inference and flexible covariate effects (including random effects and smoothing splines) on model parameters. The package is described by Michelot (2025) <doi:10.18637/jss.v114.i05>.

Version: 2.0.0
Depends: R6, mgcv, TMB, ggplot2
Imports: Matrix, stringr, MASS, tmbstan, methods, fmesher
LinkingTo: TMB, RcppEigen
Suggests: rstan, testthat, knitr, rmarkdown, expm, MSwM
Published: 2026-11-10
DOI: 10.32614/CRAN.package.hmmTMB
Author: Theo Michelot [aut, cre], Richard Glennie [aut], Jan-Ole Fischer [ctb] (SPDE smooths), Duncan Cameron-Steinke [ctb] (Forecast class), Pauline Rocu [ctb] (schisq distribution), Litty Mathew [ctb] (hnbinom distribution)
Maintainer: Theo Michelot <theo.michelot at dal.ca>
License: GPL-3
URL: https://github.com/TheoMichelot/hmmTMB
NeedsCompilation: yes
Citation: hmmTMB citation info
Materials: README, NEWS
CRAN checks: hmmTMB results

Documentation:

Reference manual: hmmTMB.html , hmmTMB.pdf
Vignettes: Online resources for hmmTMB (source)

Downloads:

Package source: hmmTMB_2.0.0.tar.gz
Windows binaries: r-devel: hmmTMB_1.1.2.zip, r-release: hmmTMB_1.1.2.zip, r-oldrel: hmmTMB_1.1.2.zip
macOS binaries: r-release (arm64): hmmTMB_2.0.0.tgz, r-oldrel (arm64): hmmTMB_2.0.0.tgz, r-release (x86_64): hmmTMB_1.1.2.tgz, r-oldrel (x86_64): hmmTMB_1.1.2.tgz
Old sources: hmmTMB archive

Linking:

Please use the canonical form https://CRAN.R-project.org/package=hmmTMB to link to this page.