viterbi.msm: Calculate the probabilities of underlying states and the most...

Description Usage Arguments Value Author(s) References See Also

View source: R/outputs.R

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. The probability of each hidden state is also computed for hidden Markov models.

Usage

1

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.

For hidden Markov models, an additional matrix pstate is also returned inside the data frame, giving the probability of each hidden state at each point, conditionally on all the data. This is computed by the forward/backward algorithm.

Author(s)

C. H. Jackson chris.jackson@mrc-bsu.cam.ac.uk

References

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

See Also

msm


msm documentation built on May 2, 2019, 6:51 p.m.

Related to viterbi.msm in msm...