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 a categorical 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. 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.
Version: | 0.2.0 |
Depends: | R (≥ 3.5.0) |
Imports: | MCMCpack, mvtnorm, stats, Rdpack, Rcpp |
LinkingTo: | Rcpp |
Suggests: | knitr, rmarkdown, alluvial, grDevices, RColorBrewer, testthat (≥ 2.1.0) |
Published: | 2022-08-17 |
Author: | Emmeke Aarts [aut, cre], Sebastian Mildiner Moraga [ctb] |
Maintainer: | Emmeke Aarts <e.aarts at uu.nl> |
BugReports: | https://github.com/emmekeaarts/mHMMbayes/issues |
License: | GPL-3 |
URL: | https://github.com/emmekeaarts/mHMMbayes |
NeedsCompilation: | yes |
SystemRequirements: | GNU make |
Materials: | README NEWS |
CRAN checks: | mHMMbayes results |
Reference manual: | mHMMbayes.pdf |
Vignettes: |
Estimation of the multilevel hidden Markov model Multilevel HMM tutorial |
Package source: | mHMMbayes_0.2.0.tar.gz |
Windows binaries: | r-devel: mHMMbayes_0.2.0.zip, r-release: mHMMbayes_0.2.0.zip, r-oldrel: mHMMbayes_0.2.0.zip |
macOS binaries: | r-release (arm64): mHMMbayes_0.2.0.tgz, r-oldrel (arm64): mHMMbayes_0.2.0.tgz, r-release (x86_64): mHMMbayes_0.2.0.tgz, r-oldrel (x86_64): mHMMbayes_0.2.0.tgz |
Old sources: | mHMMbayes archive |
Please use the canonical form https://CRAN.R-project.org/package=mHMMbayes to link to this page.