Calculates a frequency table counting the number of times each pair of
states were observed in successive observation times. This can be a
useful way of summarising multi-state data.
Usage
statetable.msm(state, subject, data=NULL)
Arguments
state
Observed states, assumed to be ordered by time
within each subject.
subject
Subject identification numbers corresponding to
state. If not given, all observations are assumed to be on
the same subject.
data
An optional data frame in which the variables represented
by subject and state can be found.
Value
A frequency table with starting states as rows and finishing states as
columns.