Computes the Viterbi path associated to an homogenenous HMM or MSAR model.
viterbi_path(prior, transmat, obsmat)prior probabilities PRIOR(I) = Pr(X(1) = I)
transition matrice TRANSMAT(I,J) = Pr(X(T+1)=J | X(T)=I)
emission probabilities OBSMAT(I,t) = Pr(Y(t) | X(t)=I)
List including
smoothing probabilities P(X(t)|Y(0),...,Y(T))
two steps smoothing probabilities P(X(t),X(t+1)|Y(0),...,Y(T))
log likelihood
Number of regimes
intermediate component in the FB algorithm (forward)
intermediate component in the FB algorithm (backward)
forwards_backwards.R, fit.MSAR, Estep.MSAR