Package: mHMMbayes Type: Package Title: Multilevel Hidden Markov Models Using Bayesian Estimation Version: 1.1.1 Depends: R (>= 3.6.0) Imports: MCMCpack, mvtnorm, stats, Rdpack, Rcpp Authors@R: c(person("Emmeke", "Aarts", email = "e.aarts@uu.nl", role = c("aut", "cre")), person("Sebastian", "Mildiner Moraga", role = "aut")) Maintainer: Emmeke Aarts Description: 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) . The multilevel HMM is tailored to accommodate (intense) longitudinal data of multiple individuals simultaneously, see e.g., de Haan-Rietdijk et al. . 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. URL: https://CRAN.R-project.org/package=mHMMbayes BugReports: https://github.com/emmekeaarts/mHMMbayes/issues License: GPL-3 Encoding: UTF-8 LazyData: true RoxygenNote: 7.3.2 Suggests: knitr, rmarkdown, alluvial, grDevices, RColorBrewer, testthat (>= 2.1.0) VignetteBuilder: knitr RdMacros: Rdpack SystemRequirements: GNU make LinkingTo: Rcpp Config/pak/sysreqs: make Repository: https://emmekeaarts.r-universe.dev Date/Publication: 2026-04-17 10:11:07 UTC RemoteUrl: https://github.com/emmekeaarts/mhmmbayes RemoteRef: HEAD RemoteSha: 666745ff24a9bbc34c3017e2123b56bb573b862e NeedsCompilation: yes Packaged: 2026-06-16 07:56:48 UTC; root Author: Emmeke Aarts [aut, cre], Sebastian Mildiner Moraga [aut]