Skip to content

mHMMbayes

1.1.1

Multilevel Hidden Markov Models Using Bayesian Estimation

0packages depend
3.4Kdownloads / year
70.5%test coverage
12/13checks pass

Overview

About
Maintained by Emmeke AartsFirst published 2019-10-256 releasesCRAN page ↗GitHub ↗

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

CRAN checks
1NOTE12OK
Failing flavors
  • NOTE r-devel-linux-x86_64-debian-gcc
Slowest check: 4.8 min · r-devel-linux-x86_64-fedora-clang
Code health
Yes
Tests · ratio 0.30
70.5%
Coverage · measured lines
100%
Documentation · exports
5
Dependencies · direct
Check history
  • NOTE2026-08-01
    12 OK · 1 NOTE · 0 WARNING · 0 ERROR · 0 FAILURE
  • OK2026-04-22
    14 OK · 0 NOTE · 0 WARNING · 0 ERROR · 0 FAILURE
  • ERROR2026-04-18
    13 OK · 0 NOTE · 0 WARNING · 1 ERROR · 0 FAILURE
  • OK2026-03-10
    14 OK · 0 NOTE · 0 WARNING · 0 ERROR · 0 FAILURE

Documentation

Documentation
READMEYes · 312 wordsVignettesYes · dynamicpkgdown siteNoNEWSYes · 100% structuredCode of conductNoContributing guideNo
Examples that run
100%
Documented parameters
100%
Return-value docs
100%
References docs
25%

Downloads

3.4K
CRAN downloads in the past year
Rank #12,808 · ~9/day · ~283/mo
Daily download trend is not available in this view yet.
25330 days
79590 days
3.4K1 year
Compare downloads with other packages →
Also on387 r2u

Repository

Repository
26Stars
12Forks
6Open issues
3Open PRs
4Releases
489Commits
3Contributors
489 commits · Last activity 2026-04-22 · +4% stars, 30d

Stars over time

2025-07-30 · 212026-07-07 · 26

Repository practices

Upstream repositoryBeta

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.

Continuous integration (1)
GitHub Actions
Reproducibility and dev environment (1)
data-raw/
CRAN release process (3)
cran-comments.mdrevdep/CRAN-SUBMISSION
Docs source (1)
README.Rmd
Show all practices
Lint, format, editor (1)
RStudio project
How this is detected·Detection ruleset v1 (2026-07-18)

Dependencies

Declared dependencies
10 external dependencies (excludes base and recommended)
Depends (1)
R >= 3.6.0
LinkingTo (1)
Enhances (0)
none
Reverse dependencies
0direct
0indirect

Nothing depends on this yet.

Code & Tests

Datasets

People & History

People (2)
Maintainer (1)
Author, Maintainer
Authors (2)
Author, Maintainer
Author · added in 0.2.0
Package Timeline

6 releases. Pick two to compare their code metrics. R releases are shown for context.

  • R
    R 4.6.0 released · 2026-04-24
  • 1.1.1Latest
    2025-07-11 · current release · diff ↗
  • R
    R 4.5.0 released · 2025-04-11
  • R
    R 4.4.0 released · 2024-04-24
  • 1.1.0
    2024-04-01 · diff ↗
  • 1.0.0
    2023-10-02 · diff ↗
  • R
    R 4.3.0 released · 2023-04-21
  • 0.2.0
    2022-08-17 · diff ↗
  • R
    R 4.2.0 released · 2022-04-22
  • R
    R 4.1.0 released · 2021-05-18
  • R
    R 4.0.0 released · 2020-04-24
  • 0.1.1
    2019-10-30 · diff ↗
  • 0.1.0
    2019-10-25
  • R
    R 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
Report a problem with this page →

Privacy choices

These apply to this browser and are stored on this device only. Nothing about your choice is sent to us.

Read the privacy policy