powered by
For a given model, reconstructs the most probable states sequence, using the Viterbi algorithm.
viterbi(m, newdata = NULL)
The sequence of most probable states.
An object moveHMM
moveHMM
An object moveData (optional)
moveData
Zucchini, W. and MacDonald, I.L. 2009. Hidden Markov Models for Time Series: An Introduction Using R. Chapman & Hall (London).
# m is a moveHMM object (as returned by fitHMM), automatically loaded with the package m <- example$m # reconstruction of states sequence states <- viterbi(m)
Run the code above in your browser using DataLab