Learn R Programming

msm (version 1.4)

viterbi.msm: Calculate the most likely path through underlying states

Description

For a fitted hidden Markov model, or a model with censored state observations, the Viterbi algorithm recursively constructs the path with the highest probability through the underlying states.

Usage

viterbi.msm(x)

Arguments

x
A fitted hidden Markov multi-state model, or a model with censored state observations, as produced by msm

Value

  • A data frame with columns:

    subject = subject identification numbers

    time = times of observations

    observed = corresponding observed states

    fitted = corresponding fitted states found by Viterbi recursion. If the model is not a hidden Markov model and there are no censored state observations, this is just the observed states.

References

Durbin, R., Eddy, S., Krogh, A. and Mitchison, G. Biological sequence analysis, Cambridge University Press, 1998.

See Also

msm