mHMMbayes
1.1.1Multilevel Hidden Markov Models Using Bayesian Estimation
Overview
An implementation of the multilevel (also known as mixed or random effects) hidden Markov model using Bayesian estimation in R. The multilevel hidden Markov model (HMM) is a generalization of the well-known hidden Markov model, for the latter see Rabiner (1989) doi:10.1109/5.18626. The multilevel HMM is tailored to accommodate (intense) longitudinal data of multiple individuals simultaneously, see e.g., de Haan-Rietdijk et al. doi:10.1080/00273171.2017.1370364. Using a multilevel framework, we allow for heterogeneity in the model parameters (transition probability matrix and conditional distribution), while estimating one overall HMM. The model can be fitted on multivariate data with either a categorical, normal, or Poisson distribution, and include individual level covariates (allowing for e.g., group comparisons on model parameters). Parameters are estimated using Bayesian estimation utilizing the forward-backward recursion within a hybrid Metropolis within Gibbs sampler. Missing data (NA) in the dependent variables is accommodated assuming MAR. The package also includes various visualization options, a function to simulate data, and a function to obtain the most likely hidden state sequence for each individual using the Viterbi algorithm.
Install
Health
- NOTE r-devel-linux-x86_64-debian-gcc
- NOTE2026-08-0112 OK · 1 NOTE · 0 WARNING · 0 ERROR · 0 FAILURE
- OK2026-04-2214 OK · 0 NOTE · 0 WARNING · 0 ERROR · 0 FAILURE
- ERROR2026-04-1813 OK · 0 NOTE · 0 WARNING · 1 ERROR · 0 FAILURE
- OK2026-03-1014 OK · 0 NOTE · 0 WARNING · 0 ERROR · 0 FAILURE
Documentation
- Examples that run
- 100%
- Documented parameters
- 100%
- Return-value docs
- 100%
- References docs
- 25%
Downloads
Repository
Stars over time
Forks over time
Releases over time
Issues over time
PRs over time
Repository practices
7 development-tooling and community-health practices detected across 5 families in the upstream repository
Checks run against github.com/emmekeaarts/mhmmbayes on 2026-07-31.
Show all practices
Dependencies
Nothing depends on this yet.
Code & Tests
Datasets
People & History
6 releases. Pick two to compare their code metrics. R releases are shown for context.
- RR 4.6.0 released · 2026-04-24
- 1.1.1Latest
- RR 4.5.0 released · 2025-04-11
- RR 4.4.0 released · 2024-04-24
- 1.1.02024-04-01 · diff ↗
- 1.0.02023-10-02 · diff ↗
- RR 4.3.0 released · 2023-04-21
- 0.2.02022-08-17 · diff ↗
- RR 4.2.0 released · 2022-04-22
- RR 4.1.0 released · 2021-05-18
- RR 4.0.0 released · 2020-04-24
- 0.1.12019-10-30 · diff ↗
- 0.1.02019-10-25
- RR 3.6.0 released · 2019-04-26
Package metadata
- First published
- 2019-10-25
- Total releases
- 6 / 7 yrs
- License
- GPL-3 OSI
- Minimum R
- ≥ 3.6.0
- Bundled data
- 4.0 KB / 2 files
- Download size
- 2.5 MB
- Installed size
- not tracked yet
- With dependencies
- not tracked yet