Multilevel Hidden Markov Models Using Bayesian Estimation
Transforming a set of Multinomial logit regression intercepts to proba...
Multilevel hidden Markov model using Bayesian estimation
mHMMbayes: Multilevel Hidden Markov Models Using Bayesian Estimation
Obtain the emission distribution probabilities for a fitted multilevel...
Obtain the transition probabilities gamma for a fitted multilevel HMM
Proposal distribution settings RW Metropolis sampler for mHMM categori...
Proposal distribution settings RW Metropolis sampler for mHMM Poisson-...
Proposal distribution settings RW Metropolis sampler for mHMM transiti...
Plotting the transition probabilities gamma for a fitted multilevel HM...
Plotting the posterior densities for a fitted multilevel HMM
Specifying informative hyper-prior on the categorical emission distrib...
Specifying informative hyper-prior on the continuous emission distribu...
Specifying informative hyper-priors on the count emission distribution...
Specifying informative hyper-prior on the transition probability matri...
Transforming a set of probabilities to Multinomial logit regression in...
Simulate data using a multilevel hidden Markov model
Transform the between-subject variance in the positive scale to the lo...
Obtain hidden state sequence for each subject using the Viterbi algori...
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.
Useful links