hmmTMB: Hidden Markov Models with Flexible Covariate Effects in R
Dublin Core
Title
hmmTMB: Hidden Markov Models with Flexible Covariate Effects in R
Description
Hidden Markov models (HMMs) are widely applied in studies where a discrete-valued process of interest is observed indirectly. They have for example been used to model behavior from human and animal tracking data, disease status from medical data, and financial market volatility from stock prices. The model has two main sets of parameters: transition probabilities, which drive the latent state process, and observation parameters, which characterize the state-dependent distributions of observed variables. One particularly useful extension of HMMs is the inclusion of covariates on those parameters, to investigate the drivers of state transitions or to implement Markov-switching regression models. We present the new R package hmmTMB for HMM analyses, with flexible covariate models in both the hidden state and observation parameters. In particular, non-linear effects are implemented using penalized splines, including multiple univariate and multivariate splines, with automatic smoothness selection. The package allows for various random effect formulations (including random intercepts and slopes), to capture between-group heterogeneity. hmmTMB can be applied to multivariate observations, and it accommodates various types of response data, including continuous (bounded or not), discrete, and binary variables. Parameter constraints can be used to implement non-standard dependence structures, such as semi-Markov, higher-order Markov, and autoregressive models. Here, we summarize the relevant statistical methodology, we describe the structure of the package, and we present an example analysis of animal tracking data to showcase the workflow of the package.
Creator
Théo Michelot
Source
https://www.jstatsoft.org/article/view/v114i05
Publisher
OJS/PKP
Date
12 SEPTEMBER 2025
Contributor
FAJAR BAGUS W
Format
PDF
Language
ENGLISH
Type
TEXT
Files
Collection
Citation
Théo Michelot, “hmmTMB: Hidden Markov Models with Flexible Covariate Effects in R,” Repository Horizon University Indonesia, accessed April 10, 2026, https://repository.horizon.ac.id/items/show/10038.