Figures
Abstract
The hidden Markov model is a popular modeling strategy for describing and explaining latent process dynamics. There is a lack of information on the estimation performance of the Bayesian hidden Markov model when applied to categorical, one-level data. We conducted a simulation study to assess the effect of the 1) number of observations (250—8.000), 2) number of levels in the categorical outcome variable (3—7), and 3) state distinctiveness and state separation in the emission distribution (low, medium, high) on the performance of the Bayesian hidden Markov model. Performance is quantified in terms of convergence, accuracy, precision, and coverage. Convergence is generally achieved throughout. Accuracy, precision, and coverage increase with a higher number of observations and an increased level of state distinctiveness, and to a lesser extent with an increased level of state separation. The number of categorical levels only marginally influences performance. A minimum of 1.000 observations is recommended to ensure adequate model performance.
Citation: Simons J-W, Boverhof B-J, Aarts E (2024) The influence of observation sequence features on the performance of the Bayesian hidden Markov model: A Monte Carlo simulation study. PLoS ONE 19(12): e0314444. https://doi.org/10.1371/journal.pone.0314444
Editor: Peida Zhan, Zhejiang Normal University, CHINA
Received: June 20, 2024; Accepted: November 12, 2024; Published: December 11, 2024
Copyright: © 2024 Simons et al. This is an open access article distributed under the terms of the Creative Commons Attribution License, which permits unrestricted use, distribution, and reproduction in any medium, provided the original author and source are credited.
Data Availability: R code to reproduce and analyze the simulation study and the empirical application along with the data are openly available on Zenodo at https://doi.org/10.5281/zenodo.11186671.
Funding: The author(s) received no specific funding for this work.
Competing interests: The authors have declared that no competing interests exist.
Introduction
The hidden Markov model (HMM) is a popular modeling strategy for describing and explicating latent process dynamics [1]. It can be defined as a dynamic Bayesian network that models a system of unobserved states as a first-order Markov process, where the unobserved process is inferred from a second observed process [2]. The HMM is a flexible modeling framework that enables researchers to retrieve and study a wide array of latent process phenomena. Examples include but are not limited to biological sequence analysis [3], brain magnetic resonance image segmentation [4], human action [5] and shape classification [6], speech [7] and handwriting recognition [8], precipitation [9], and stock market forecasting [10].
One of the key tasks of the HMM is to estimate its parameters so that they maximize the probability of an observation sequence given the HMM [11]. Obtaining a high quality solution to this optimization task is key to most applied research because it enables researchers to model real-world phenomena. The features of the observation sequence are a crucial determinant of the quality of this solution [11]. In this simulation study, we assess if and how three central features of categorical observation sequences affect the performance of the Bayesian HMM: (1) the number of observations comprising the sequence, (2) the number of levels in the categorical outcome variable, and (3) state distinctiveness and separation. Our focus on categorical longitudinal data is driven by the increasing availability of such data in the social and behavioral sciences. Technological advancements have improved the efficiency and affordability of gathering high-resolution data from individuals and groups [12–16]. Much of this data is furthermore categorical in nature, e.g., reflect social actions like drinking, speaking, and laughing during free-standing conversations and speed dating [13] or interactive behaviours in group therapies for people with schizophrenia, like asking questions, giving advice, and using humor [16].
However, there currently is a lack of information on how the features of such categorical observation sequences affect Bayesian solutions to the optimization task. Recently, for a specific extension of the Bayesian HMM, simulation studies have investigated how the number of observations and state distinctiveness and separation affect parameter estimation [17–19]. These studies relate to the multilevel Bayesian HMM [20], a model designed to simultaneously summarize the sequences of multiple individuals or animals. In the multilevel HMM, individual-level random effects are included to accommodate (unexplained) heterogeneity in model parameters while estimating one overall HMM. It was shown that in multilevel HMMs fitted on categorical data, the number of individuals and the number of observations in the sequence per individual largely compensate for each other in supporting model performance [19]. In the case of uni-variate data, a minimum of 800 observations on five individuals were required to obtain adequate model performance in a data set where the states are distinctive and well separated [19]. We define ‘one-level data’ as sequence data collected at a single level of measurement for each individual, in contrast to multi-level data, where multiple sequences of data are collected for each individual and nested within these individuals in the analysis. Additionally, ‘uni-variate data’ refers to data where only a single outcome variable is measured at each point in time, rather than multiple outcomes. To our knowledge, no simulation studies exist for the basic, one-level Bayesian HMM.
As such, for one-level data, it is unknown what constitutes a minimum sample size to achieve adequate model performance and how this minimum sample size varies with the number of categorical levels and state distinctiveness and separation. The aim of this study is to address this gap and add to a growing body of data guidelines on the Bayesian HMM [19]. Specifically, we explore the effect of the number of observations on the model performance of the Bayesian HMM with data varying in the number of categorical levels and state distinctiveness and separation. We address the following research questions: RQ1: How do the number of observations affect the estimation performance of the Bayesian HMM? RQ2: How does the estimation performance of the Bayesian HMM vary with the number of categorical levels? RQ3: How do state distinctiveness and separation influence the performance of the Bayesian HMM?
The number of observations is a design feature and is generally under the control of the researcher. We expect that an increase in the number of observations that are stochastically linked to the latent process of interest will result in an increase in the amount of available information about that latent process. On that basis, we hypothesize that an increase in the number of observations in the observation sequence will result in an increase in the performance of the Bayesian HMM. With respect to the number of categorical levels, an increase in the number of categorical levels will result in an increase in the total number of to be estimated model parameters. We hypothesize that this increase in the complexity of the to-be-estimated Bayesian HMM will result in a decrease in its performance.
State distinctiveness and separation are inherent to the data-generating process and are generally not under the researcher’s control. State distinctiveness refers to the degree to which a hidden state is meaningfully associated with one or more categories (i.e., key indicators) without being obscured by random noise. High state distinctiveness is evident when one or a few categories display a high state-dependent emission probability while all other categories exhibit near-zero emission probabilities. Low state distinctiveness relates to high noise in the emission distribution, reflected by a reduced difference between the emission probabilities of key indicators and noise categories. State separation refers to the degree to which state-dependent emission distributions overlap. In categorical data, high state separation is evident when a key indicator is only related to one hidden state. In contrast, given lower state separation, key indicators are related to multiple hidden states instead. As higher state distinctiveness and state separation result in more salient states, we hypothesize that higher state distinctiveness and separation will increase the performance of the Bayesian HMM.
Materials and methods
The hidden Markov model
The hidden Markov model (HMM) assumes that 1) the distribution of the observations O observed at time point t ∈ {1, 2, …, T} depends on a sequence of hidden states St = i, i ∈ {1, 2, …, m} and that 2) the hidden state sequence follows a first-order Markov process [11]. That is, the probability of switching from state i at time point t to state j at t + 1 only depends on the departing state i at time point t. Fig 1 provides a depiction of the temporal evolution of the HMM.
Each hidden state S over the time points t, depicted in the top row, depends only on the state at the previous time point. The observed data O, depicted in the bottom row, depends only on the value of the current latent state S.
Given these assumptions, the HMM can be defined on the basis of three sets of parameters. The initial state probabilities πi denote the probability that the first state in the chain, S1, is i: (1)
The transition probability matrix Γ with transition probabilities γij denote the probability of switching from state i at time t to state j at time t + 1: (2) For each point in time t, we have one hidden state that generates one observed outcome for that time point t. In this paper we focus on categorical data, as such the state-dependent emission distribution denotes the probability of observing Ot given St: (3) for the observed categorical levels o = 1, 2, …, q and where is a vector of probabilities for each state S = i, …, m with ∑ θi = 1. We finally assume that all parameters in the HMM are independent of t, i.e., we assume a time-homogeneous model.
The Gibbs sampler
The Gibbs sampler is a Markov chain Monte Carlo (MCMC) algorithm that can be used to estimate the parameters of the HMM by sampling from the joint posterior distribution of the parameter estimates and the hidden state sequence given a set of hyper-parameters and the observation sequence [21]: (4) The Gibbs sampler iteratively samples from the appropriate conditional posterior distributions of St, Γi and θi, given the remaining parameters in the model. The conditional distributions are constructed from a prior distribution and the likelihood function of the observation sequence. Since both the transitions from state i at time point t to any of the other states at time point t + 1 and the observed outcomes within state i follow a categorical distribution, the Dirichlet distribution is a convenient conjugate prior distribution on these parameters. Here, we assume that the rows of Γ and the state-dependent probabilities θi are independent. As such. (5) and (6) The hyper-parameter a10 of the prior Dirichlet distribution on Γi is a vector with length equal to the number of states m, and the hyper-parameter a20 of the prior Dirichlet distribution on θi is a vector with length equal to the number of categorical levels q. In this study we utilize uninformative priors, as such the hyper-parameter values are fixed to a vector of 1’s for both a10 and a20. As the initial probabilities of the states πi are assumed to coincide with the stationary distribution of Γ, πi is not estimated freely.
Given the conditional distributions, the Gibbs sampler alternates between the following two steps: first the hidden state sequence S1, S2, …, ST is sampled, given, the observation sequence O1, O2, …, OT, and the current values of the parameters Γ and θi. Forward-backward recursions are used to sample from the hidden state sequence of the HMM [22]. This procedure first obtains the forward probabilities after which the hidden state sequence is sampled in a backward run using the corresponding forward probabilities αT:1. Second, Γi and θi are subsequently updated by sampling them conditional on the sampled hidden state sequence S1, S2, …, ST and the observation sequence O1, O2, …, OT.
Methods
The aim of the Monte Carlo simulation study was to empirically assess the performance of the Bayesian hidden Markov model (HMM), varying the number of observations, level of state distinctiveness and separation, and number of categorical levels. A description of the levels used for each of the simulation factors follows below. A fractional factorial design was used to save computational costs, as detailed below.
Number of observations and categorical levels.
We base the ranges of the number of observations n and the number of categorical levels q on a sample of studies from a systematic review on the HMM and its applications [1]. We include in this sample all the studies in this review that use a basic frequentist or Bayesian HMM for parameter estimation. Within the resulting sample of studies, the number of observations of the observation sequence ranges from four to 1.2 million [23–51]. However, this distribution has a strong positive skew. To reflect a range that will be relevant to most researchers, we considered six levels for the number of observations n ∈ {250, 500, 1000, 2000, 4000, 8000}. The varying number of observations are crossed with the full range of levels of the remaining factors varied.
The number of categorical levels within the systematic review ranges from three to 100. Again, this distribution has a strong positive skew. On that basis, we considered three levels for the number of categorical levels q ∈ {3, 5, 7}. In addition, by varying the categorical emission probabilities over the rows of the emission probability matrix, we tentatively assess the effect of a state having one, two, or three indicators.
State distinctiveness and separation.
The state distinctiveness and state separation features are both assigned three levels: “High”, “Moderate”, and “Low”. Within our simulation study, the categorical emission distributions are constructed such that one to three categories have a high emission probability within a given state S. We refer to these as the indicator categories. Non-indicator categories we refer to as noise categories. Given that all emission probabilities within a state sum to one, larger probabilities for the noise categories inevitably result in lower probabilities for the indicator categories and hence lower state distinctiveness. As such, state distinctiveness can be seen as a signal to noise ratio (SNR) of the indicator category: SNR = Pindicator/Pnoise, with higher values representing higher state distinctiveness. Depending on the number of categorical levels and number of indicator variables within a state, the SNR ranges between 8.00 and 46.00 for High state distinctiveness, between 4.75 and 8.50 for Moderate state distinctiveness, and between 2.07 and 4.00 for Low state distinctiveness. Over the levels of state distinctiveness, the SNR values steadily increase within any given number of categorical levels. Only within the scenario of 5 categorical levels are all levels of the factor state distinctiveness applied. For the remaining levels of the factor categorical levels, only high and low state distinctiveness is used.
The amount of state separation is quantified using the summed pairwise Kullback–Leibler divergence DKL, with higher values denoting a larger difference, i.e., state separation. In a model with m = 3 states, the pairwise comparisons refer to the DKL of state 1 versus 2, state 1 versus 3, and state 2 versus 3, with the summed pairwise DKL referring to the summation over these three comparisons. In the High state separation scenario, each category is a unique indicator for one hidden state only. In the moderate state separation scenario, each hidden state is composed of one or two categories that are a unique indicator to that hidden state only, plus a category that is shared as an indicator over two states. Here, the probability of the unique indicator is higher compared to the shared indicator. In the low state separation scenario, the probabilities of the unique and shared indicators are equal. This results in a summed pairwise DKL for the High, Moderate, and Low state separation scenarios of 6.65, 4.44 and 3.88, respectively. Only within the scenario of 5 categorical levels, varying levels of state separation are examined. To keep this study concise, the levels of state distinctiveness and state separation are not crossed. An overview of the used emission probability matrices is provided in Table 1.
Data generation and model fitting.
We generated 500 sequences for each simulation scenario. To determine the amount of hidden states, we screened recent articles (published after 2000) which used either basic frequentist or Bayesian HMMs for parameter estimation [23, 27, 28, 32–36, 38, 43, 44, 50] as reported in [1]. This procedure revealed that most studies analyzed between 2 and 15 hidden states, with the majority focusing on the 3 to 5 range. On that basis, we generated data by setting the number of states to m = 3. The values of the transition probability matrix are set to 0.80 on the diagonal and 0.10 on the off-diagonal. Simulating data and fitting of models in the statistical software R [52] using the R CRAN package mHMMbayes [53]. Corresponding R code to reproduce and analyze the simulation study can be found in [54]. In the mHMMbayes package, one-level HMMs are fitted using a Gibbs Markov chain Monte Carlo (MCMC) as detailed in the the section ‘The Gibbs sampler’. A total of 5000 MCMC iterations were used, with a burn-in of 1000 for each estimation run. Informative starting values were specified for the transition and emission probabilities to prevent label switching. The reader is referred to S1 Appendix for an overview.
To check convergence of the model parameters, two additional chains were fitted using different starting values for the first ten generated sequences for each scenario in the simulation design. The potential scale reduction factor (PSRF) is subsequently calculated over the chains of each replication. The PSRF measures approximate convergence as the ratio between a mixture of the within-chain and cross-chain variances and the within-chain variance [55]. If the chains have converged, the PSRF will be close to one. Values larger than 1.20 indicate a lack of convergence [56]. To summarize convergence across the parameters of one fitted model, a PSRF-based criterium is used for assessing convergence: parameter convergence is achieved when the PSRF is between one and 1.20 all parameters across each of the ten replications. Additionally, the chains are overlaid by way of trace plots to inspect mixing, diagnose potential label switching, and contextualize findings with respect to the PSRF criterium.
The performance of the Bayesian HMM is assessed using the following three criteria: the mean relative mean bias, precision (empirical model standard error), and coverage of the 95% credible intervals (CrI). We additionally provide the mean absolute mean bias and bias-corrected coverage of the 95% CrI in S1 Fig. For reasons of brevity, the mean precision is also provided in S1 Fig. We opt for the relative mean bias over the mean absolute bias for diagnosing accuracy as an ‘acceptable’ bias range can be specified. However, for very small ground truth parameter values, the relative mean bias will be inflated. In such cases, we will use the mean absolute bias to contextualize the findings. To keep the results section concise, results for the average absolute and relative bias, empirical model standard error, and coverage are summarized across conceptually equivalent transition and emission probability parameters. For the transition probabilities, we distinguish between the self and the state-to-state transition probabilities. For the emission probabilities, we distinguish between the probabilities relating to the indicator and noise categories. The standard deviation—as the degree to which the mean of a metric varies across conceptually equivalent groups—is presented as a band for all metrics, except for the width of the 95% CI, for which it is presented as an error bar.
Results
Convergence
Table 2 shows the proportion of transition and emission parameters that reached adequate convergence within each cell of the simulation design. Full or near-to-full convergence was generally achieved across all transition and emission parameters on the high and moderate levels of the state distinctiveness and all levels of state separation, irrespective of the number of categorical levels. For the slightly more challenging scenarios, e.g., moderate state distinctiveness and moderate and low state separation, 250 and 500 appeared to be insufficient to achieve adequate convergence. The proportion of converged parameters increased with increasing number of observations.
With low state distinctiveness, adequate convergence appears to only be achieved with 250 observations. However, inspection of trace plots revealed that chains do not converge and instead show drift and high variability. As a result, the within-chain variance is high compared to the between-chain variance, producing a corresponding PSRF value that is close to one. When the number of observations increases, the chains start to approach the appropriate stationary distribution, lowering the within-chain variance and the PSRF value. We note that the simulation scenarios that suffer from sub-par convergence should be interpreted with a measure of caution in the following sections.
Accuracy
For the transition probabilities, the mean relative bias generally reached the acceptable level of < |0.1| for high and moderate state distinctiveness and all levels of state separation, except when the number of observations = 250, see Fig 2. For the emission probabilities, the mean relative bias generally reached the acceptable level of < |0.1| for high and moderate state distinctiveness and all levels of state separation when the number of observations > 250 (high and moderate state distinctiveness and separation) or > 500 (low state separation), see Fig 3. For both transition and emission probabilities, all scenarios showed that relative bias tends to zero with an increasing number of observations. In the case of low state distinctiveness, relative bias only managed to touch the range of acceptable values at number of observations = 8.000 for transition probabilities and number of observations = 4.000 for emission probabilities. The number of categorical levels only marginally influenced relative bias, with 7 categorical levels showing the lowest degree of relative bias. Although relative bias was smaller for the self-transition probabilities compared to the state-switching probabilities, the mean absolute bias was generally larger for the self-transition compared to the state-switching probabilities, see Fig A in S1 Fig.
Plot shows subset of scenarios with high state distinctiveness (upper left panel) and low state distinctiveness (upper right panel) over levels of number of categorical variables (line color) and number of observations, and the subset of scenarios with varying levels of state distinctiveness (bottom left panel; line color) and varying levels of state separation (bottom right panel; line color) over number of observations.
Plot shows the subset of scenarios with high state distinctiveness (upper left panel) and low state distinctiveness (upper right panel) over levels of number of categorical variables (line color) and number of observations, and the subset of scenarios with varying levels of state distinctiveness (bottom left panel; line color) and varying levels of state separation (bottom right panel; line color) over number of observations.
Precision
The level of state distinctiveness and number of observations had a large effect on the mean empirical standard error; see Figs B and E in S1 Fig for the trellis plots of the transition probabilities and emission probabilities, respectively. That is, the empirical standard error decreased with increasing number of observations, with larger decreases at the lower end of number of observations and at low state distinctiveness. In simulation scenarios with number of observations > 250 and high or moderate state distinctiveness and for all levels of state separation, the average empirical standard error of both the transition and emission probabilities were < 0.10, decreasing to < .05 when number of observations > 500. With low state distinctiveness, the empirical standard error only dove below 0.10 at 8000 observations. The number of categorical levels only had a marginal effect on the empirical standard error, with the lowest empirical standard error being observed for seven categorical levels.
Coverage
For the transition probabilities, all simulation scenarios showed acceptable mean coverage of the 95% CrI for both the self-transition and state-switching probabilities (range: 95—100%), except for the self-transition probabilities in the low state distinctiveness scenario, see Fig 4. For the latter scenario, mean coverage increased with increasing number of observations, but was still slightly below 95% at 8000 observations. The undercoverage in the self-transition probabilities in this particular scenario was a result of the high parameter bias: the mean bias-corrected coverage showed acceptable coverage for all number of observations, see Fig C in S1 Fig.
Plot shows the subset of scenarios with high state distinctiveness (upper left panel) and low state distinctiveness (upper right panel) over levels of number of categorical variables (line color) and number of observations, and the subset of scenarios with varying levels of state distinctiveness (bottom left panel; line color) and varying levels of state separation (bottom right panel; line color) over number of observations. Bars represent the mean width of the 95% credibility interval (CrI), right sided y-axis.
For the emission probabilities, the difference in mean coverage of the 95% CrI was not as pronounced between levels of state distinctiveness, but in general, >500 observations were required to reach coverage levels ≥ 95%, see Fig 5. To reach a mean coverage level of 90%, 500 observations sufficed. In addition, for emission probabilities, mean coverage decreased with increasing number of observations in the low-state distinctness scenario. As the mean bias-corrected coverage in Fig F in S1 Fig showed, the undercoverage in this instance was not related to bias, but to too narrow widths of the 95% CrIs. For both transition and emission probabilities, the mean coverage did not vary by the number of categorical levels, and the width of the 95% credible interval decreased with increasing number of observations, most pronounced with higher levels of data complexity (i.e., low or moderate levels of state distinctiveness or state separation).
Plot shows the subset of scenarios with high state distinctiveness (upper left panel) and low state distinctiveness (upper right panel) over levels of number of categorical variables (line color) and number of observations, and the subset of scenarios with varying levels of state distinctiveness (bottom left panel; line color) and varying levels of state separation (bottom right panel; line color) over number of observations. Bars represent the mean width of the 95% credibility interval (CrI), right sided y-axis.
Discussion
In this study, we investigated the influence of observation sequence features on the performance of parameter estimation for the Bayesian hidden Markov model (HMM). We varied the number of observations, number of categorical levels, and level of state distinctiveness and state separation. Information on what constitutes a minimum sample size to achieve adequate model performance and how the minimal sample size varies with number of categorical levels and state distinctiveness and separation is crucial to ensure reliable and replicable results when utilizing the HMM on categorical data.
Main findings and recommendations for researchers
In general, the Bayesian HMM showed adequate levels of accuracy, precision and coverage. Model performance only minimally varied with levels of state separation and number of categorical levels. The level of state distinctiveness and number of observations, however, did have a large effect on model performance, with model performance increasing substantially with higher levels of state distinctiveness and a higher number of observations. In addition, convergence was generally achieved across all simulation scenarios, except in the case of low-state distinctiveness.
Researchers can generally expect to obtain converged, accurate, and precise estimates within the 95% credible interval for both the transition and emission probabilities from a sequence number of observations of 1.000 on-wards, assuming that the level of state distinctiveness is at least moderate. That is, to reach adequate convergence across all levels of state separation, > 500 observations were required. Convergence was not achieved when state distinctiveness was low, irrespective of the number of observations. In addition, low state distinctiveness had a detrimental effect on model performance, which could only partly be compensated by increasing the number of observations. As such, when state distinctiveness is low, the performance of the Bayesian HMM will likely be affected at even the highest number of observations. There is evidence from other latent mixture modeling approaches for categorical data, such as latent class analysis (LCA), that the detrimental effect of low state distinctiveness on model performance is general. Within the LCA literature, variables are referred to as being of high quality—i.e., variables showing a strong relationship to the latent class variable with conditional response probabilities close to one—or low quality—i.e., variables showing a weak relationship to the latent cluster, in our study equivalent to low probabilities for the indicator category and high noise probabilities. In a study examining the performance of latent class analysis, parameter bias was high in scenarios with variables of low quality, even with increased sample size [57].
An unexpected result was that seven categorical levels exhibited the lowest relative bias and empirical standard error in scenarios with low state distinctiveness, compared to three and five categorical levels. This finding is consistent with prior research suggesting that increasing the number of categorical levels can reduce auto-correlation in the observation sequence, which may, in turn, improve HMM performance. More specifically, a study on the effect of pattern structure on HMM estimation found that HMM performance improved as the number of categorical levels in the observation sequence increased [58]. Similarly, in our simulation, the increase in categorical levels may have reduced auto-correlation as well, resulting in enhanced model performance.
Future research
In the present study, the number of latent states was fixed to a total of three throughout. However, the number of latent states is directly related to the number of model parameters that must be estimated and, as such, likely to be an important determinant of the performance of the Bayesian HMM. Implementing an extension of the simulation design which varies the number of latent states is a clear avenue for future work. In addition, the results showed that n > 500 is required to obtain good model performance. However, how much more is required, and whether this number is closer to 500 or to 1000 (i.e., the next level chosen within the current simulation factor) is unknown but could be important information to the applied researcher. That is, when gathering observations is costly, increasing the number of observations with 100 or 500 observations can make a substantial difference in a study’s effort and cost requirements. Finally, this study is limited to uni-variate data. That is, the model is fitted using the input of one dependent variable only. However, research has shown that in the case of Bayesian multilevel HMMs, researchers are advised to prioritize multivariate data [19]. In future research, it would be interesting to see to what extent this recommendation holds for the one-level Bayesian HMM.
Supporting information
S1 Appendix. Starting probabilities of transition and emission probability matrices.
https://doi.org/10.1371/journal.pone.0314444.s001
(PDF)
S1 Fig. Trellis plots of mean absolute bias, mean empirical standard error, and mean bias-corrected coverage of transition and emission probabilities.
https://doi.org/10.1371/journal.pone.0314444.s002
(PDF)
References
- 1. Mor B, Garhwal S, Kumar A. A systematic review of hidden Markov models and their applications. Archives of computational methods in engineering. 2021;28(3):1429–1448.
- 2.
Ghahramani Z. An introduction to hidden Markov models and Bayesian networks. In: Hidden Markov models: applications in computer vision. World Scientific; 2001. p. 9–41.
- 3. Tamposis IA, Tsirigos KD, Theodoropoulou MC, Kontou PI, Bagos PG. Semi-supervised learning of Hidden Markov Models for biological sequence analysis. Bioinformatics. 2019;35(13):2208–2215. pmid:30445435
- 4. Zhang T, Xia Y, Feng DD. Hidden Markov random field model based brain MR image segmentation using clonal selection algorithm and Markov chain Monte Carlo method. Biomedical Signal Processing and Control. 2014;12:10–18.
- 5. Asghari P, Soleimani E, Nazerfard E. Online human activity recognition employing hierarchical hidden Markov models. Journal of Ambient Intelligence and Humanized Computing. 2020;11(3):1141–1152.
- 6. Bicego M, Murino V. Investigating hidden Markov models’ capabilities in 2D shape classification. IEEE Transactions on Pattern Analysis and Machine Intelligence. 2004;26(2):281–286. pmid:15376904
- 7. Mouaz B, Abderrahim BH, Abdelmajid E. Speech recognition of Moroccan dialect using hidden Markov models. Procedia Computer Science. 2019;151:985–991.
- 8.
El-Yacoubi A, Sabourin R, Gilloux M, Suen C. Off-line handwritten word recognition using hidden markov models. In: Knowledge-based intelligent techniques in character recognition. CRC Press; 2020. p. 191–229.
- 9. Stoner O, Economou T. An advanced hidden Markov model for hourly rainfall time series. Computational Statistics & Data Analysis. 2020;152:107045.
- 10. Zhang X, Li Y, Wang S, Fang B, Yu PS. Enhancing stock market prediction with extended coupled hidden Markov model over multi-sourced data. Knowledge and Information Systems. 2019;61(2):1071–1090.
- 11. Rabiner L, Juang B. An introduction to hidden Markov models. ieee assp magazine. 1986;3(1):4–16.
- 12. Ariens S, Ceulemans E, Adolf JK. Time series analysis of intensive longitudinal data in psychosomatic research: A methodological overview. Journal of Psychosomatic Research. 2020;137:110191. pmid:32739633
- 13. Cabrera-Quiros L, Demetriou A, Gedik E, van der Meij L, Hung H. The MatchNMingle dataset: a novel multi-sensor resource for the analysis of social interactions and group dynamics in-the-wild during free-standing conversations and speed dates. IEEE Transactions on Affective Computing. 2018;12(1):113–130.
- 14. Hamaker EL, Wichers M. No time like the present: Discovering the hidden dynamics in intensive longitudinal data. Current Directions in Psychological Science. 2017;26(1):10–15.
- 15. Lemaignan S, Edmunds CE, Senft E, Belpaeme T. The PInSoRo dataset: Supporting the data-driven study of child-child and child-robot social dynamics. PloS one. 2018;13(10):e0205999. pmid:30339680
- 16. Orfanos S, Akther SF, Abdul-Basit M, McCabe R, Priebe S. Using video-annotation software to identify interactions in group therapies for schizophrenia: assessing reliability and associations with outcomes. BMC psychiatry. 2017;17:1–10. pmid:28183293
- 17.
Ginn J, Moraga SM, Aarts E. Sample Size Considerations for Bayesian Multilevel Hidden Markov Models: A Simulation Study on Multivariate Continuous Data with highly overlapping Component Distributions based on Sleep Data. arXiv preprint arXiv:220109033. 2022;.
- 18. McClintock BT. Worth the effort? A practical examination of random effects in hidden Markov models for animal telemetry data. Methods in Ecology and Evolution. 2021;12(8):1475–1497.
- 19. Mildiner Moraga S, Aarts E. Go Multivariate: Recommendations on Bayesian Multilevel Hidden Markov Models with Categorical Data. Multivariate Behavioral Research. 2023; p. 1–29. pmid:37195880
- 20. Altman RM. Mixed hidden Markov models: an extension of the hidden Markov model to the longitudinal data setting. Journal of the American Statistical Association. 2007;102(477):201–210.
- 21. Rydén T. EM versus Markov chain Monte Carlo for estimation of hidden Markov models: A computational perspective. Bayesian Analysis. 2008;3(4):659–688.
- 22. Scott SL. Bayesian methods for hidden Markov models: Recursive computing in the 21st century. Journal of the American statistical Association. 2002;97(457):337–351.
- 23.
Alshamaa D, Chkeir A, Mourad-Chehade F, Honeine P. A hidden Markov model for indoor trajectory tracking of elderly people. In: 2019 IEEE Sensors Applications Symposium (SAS). IEEE; 2019. p. 1–6.
- 24.
Bahl L, Brown P, De Souza P, Mercer R. Maximum mutual information estimation of hidden Markov model parameters for speech recognition. In: ICASSP’86. IEEE international conference on acoustics, speech, and signal processing. vol. 11. IEEE; 1986. p. 49–52.
- 25. Churchill GA. Hidden Markov chains and the analysis of genome structure. Computers & chemistry. 1992;16(2):107–115.
- 26. Coast DA, Stern RM, Cano GG, Briller SA. An approach to cardiac arrhythmia analysis using hidden Markov models. IEEE Transactions on biomedical Engineering. 1990;37(9):826–836. pmid:2227969
- 27. Habayeb M, Murtaza SS, Miranskyy A, Bener AB. On the use of hidden markov model to predict the time to fix bugs. IEEE Transactions on Software Engineering. 2017;44(12):1224–1244.
- 28. Jiang J, Chen R, Chen M, Wang W, Zhang C. Dynamic fault prediction of power transformers based on hidden Markov model of dissolved gases analysis. IEEE Transactions on Power Delivery. 2019;34(4):1393–1400.
- 29. Joo T, Seo M, Shin D. An adaptive approach for determining batch sizes using the hidden Markov model. Journal of Intelligent Manufacturing. 2019;30:917–932.
- 30. Lee KF, Hon HW. Speaker-independent phone recognition using hidden Markov models. IEEE Transactions on Acoustics, Speech, and Signal Processing. 1989;37(11):1641–1648.
- 31.
Levinson S, Rabiner L, Sondhi M. Speaker independent isolated digit recognition using hidden Markov models. In: ICASSP’83. IEEE International Conference on Acoustics, Speech, and Signal Processing. vol. 8. IEEE; 1983. p. 1049–1052.
- 32. Liu S, Zheng K, Zhao L, Fan P. A driving intention prediction method based on hidden Markov model for autonomous driving. Computer Communications. 2020;157:143–149.
- 33. Lu S, Lin G, Liu H, Ye C, Que H, Ding Y. A weekly load data mining approach based on hidden Markov model. IEEE Access. 2019;7:34609–34619.
- 34. Manogaran G, Vijayakumar V, Varatharajan R, Malarvizhi Kumar P, Sundarasekar R, Hsu CH. Machine learning based big data processing framework for cancer diagnosis using hidden Markov model and GM clustering. Wireless personal communications. 2018;102:2099–2116.
- 35. Pastell M, Frondelius L. A hidden Markov model to estimate the time dairy cows spend in feeder based on indoor positioning data. Computers and Electronics in Agriculture. 2018;152:182–185.
- 36.
Petersen BK, Mayhew MB, Ogbuefi KO, Greene JD, Liu VX, Ray P. Modeling sepsis progression using hidden Markov models. arXiv preprint arXiv:180102736. 2018;.
- 37.
Poritz A. Linear predictive hidden Markov models and the speech signal. In: ICASSP’82. IEEE International Conference on Acoustics, Speech, and Signal Processing. vol. 7. IEEE; 1982. p. 1291–1294.
- 38. Putland RL, Ranjard L, Constantine R, Radford CA. A hidden Markov model approach to indicate Bryde’s whale acoustics. Ecological Indicators. 2018;84:479–487.
- 39. Rabiner LR, Levinson SE, Sondhi MM. On the application of vector quantization and hidden Markov models to speaker-independent, isolated word recognition. Bell System Technical Journal. 1983;62(4):1075–1105.
- 40.
Rose RC, Paul DB. A hidden Markov model based keyword recognition system. In: International Conference on Acoustics, Speech, and Signal Processing. IEEE; 1990. p. 129–132.
- 41.
Schwartz R, Chow Y, Roucos S, Krasner M, Makhoul J. Improved hidden Markov modeling of phonemes for continuous speech recognition. In: ICASSP’84. IEEE International Conference on Acoustics, Speech, and Signal Processing. vol. 9. IEEE; 1984. p. 21–24.
- 42. Sonnhammer EL, Von Heijne G, Krogh A, et al. A hidden Markov model for predicting transmembrane helices in protein sequences. In: Ismb. vol. 6; 1998. p. 175–182. pmid:9783223
- 43.
Soruri M, Sadri J, Zahiri SH. Hidden markov model optimized by PSO algorithm for gene sequence clustering. In: Proceedings of the Second International Conference on Internet of things, Data and Cloud Computing; 2017. p. 1–6.
- 44. Ullah I, Ahmad R, Kim D. A prediction mechanism of energy consumption in residential buildings using hidden markov model. Energies. 2018;11(2):358.
- 45.
Varga A, Moore RK. Hidden Markov model decomposition of speech and noise. In: International Conference on Acoustics, Speech, and Signal Processing. IEEE; 1990. p. 845–848.
- 46. Xin G, Hamzaoui N, Antoni J. Semi-automated diagnosis of bearing faults based on a hidden Markov model of the vibration signals. Measurement. 2018;127:141–166.
- 47. Xu R, Chen X, Zhang F. Green technology innovation ecosystem based on hidden Markov model. Ekoloji. 2019;28(107):1729–1736.
- 48. Yamato J, Ohya J, Ishii K. Recognizing human action in time-sequential images using hidden Markov model. In: CVPR. vol. 92; 1992. p. 379–385.
- 49. Yang WJ, Lee JC, Chang YC, Wang HC. Hidden Markov model for Mandarin lexical tone recognition. IEEE Transactions on Acoustics, Speech, and Signal Processing. 1988;36(7):988–992.
- 50. Yao L, Wang J, Wang X, Chen A, Wang Y. V2X routing in a VANET based on the hidden Markov model. IEEE Transactions on Intelligent Transportation Systems. 2017;19(3):889–899.
- 51. Zhuo Z, Zhang Y, Zhang Zl, Zhang X, Zhang J. Website fingerprinting attack on anonymity networks based on profile hidden markov model. IEEE Transactions on Information Forensics and Security. 2017;13(5):1081–1095.
- 52.
R Core Team. R: A Language and Environment for Statistical Computing; 2023. Available from: https://www.R-project.org/.
- 53.
Aarts E. mHMMbayes: Multilevel Hidden Markov Models Using Bayesian Estimation; 2022. Available from: https://CRAN.R-project.org/package=mHMMbayes.
- 54. Simons JW, Boverhof BJ, Aarts E. Accompanying code for “The influence of observation sequence features on the performance of the Bayesian hidden Markov model: a Monte Carlo simulation study”; 2024. Available from: https://doi.org/10.5281/zenodo.11186671.
- 55. Gelman A, Rubin DB. Inference from iterative simulation using multiple sequences. Statistical science. 1992;7(4):457–472.
- 56. Brooks SP, Gelman A. General methods for monitoring convergence of iterative simulations. Journal of computational and graphical statistics. 1998;7(4):434–455.
- 57. Wurpts IC, Geiser C. Is adding more indicators to a latent class analysis beneficial or detrimental? Results of a Monte-Carlo study. Frontiers in Psychology. 2014;5. pmid:25191298
- 58.
Chudova D, Smyth P. Pattern discovery in sequences under a markov assumption. In: Proceedings of the eighth ACM SIGKDD international conference on Knowledge discovery and data mining; 2002. p. 153–162.