viterbi.msm(x)
msm
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.
msm