# See the help for sim.hmm() for how to generate y.num.
fit.num <- hmm(y.num,K=2,verb=TRUE)
s.1 <- mps(y.num,fit.num)
s.2 <- mps(y.num,tpm=P,ispd=c(0.25,0.75),Rho=R) # P and R as in the help
# for sim.hmm().
# The order of the states has gotten swapped; 3-s.1[,1] is much
# more similar to s.2[,1] than is s.1[,1].
Run the code above in your browser using DataLab