This post will explore how to train hidden markov models in R. The previous posts in this series detailed the maths that power the HMM, fortunately all of this has been implemented for us in the RHmm package. HMMs can be used in two ways for regime detection, the first is to use a single HMM where each state in the HMM is considered a “regime”. The second method is to have multiple HMMs each designed to model an individual regime, the task is then to chose between models by looking at which is the most likely to have generated the data.
Thanks for the help but DepmixS4 package is not suitable for my data, I am using "Markovchain" , "seqHMM" and "HMM" package. Shafagat Mahmudova Maam, I have uploaded my problem statement in more detail. Kindly check if you have time.