Why do my HSMM model transition matrix and predicted state sequence transition matrix differ significantly?
I am working on a Hidden Semi-Markov Model (HSMM) to analyze state transitions in a time series dataset. I have successfully trained the HSMM using the mhsmm
package in R and have obtained the model’s transition matrix. Additionally, I have used the Viterbi algorithm to predict the most likely state sequences for my data.
Split state transition probability (HMM)
I’m currently running an HSMM model with 3 groups to get the probability of state transitions for all subjects (R code of O’Connell et al.). After that, I’d like to have the states for all subjects and observe the probability of state transitions for each group, but I’m not sure how to tinker with the code. enter image description here