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 multistate data.
1  statetable.msm(state, subject, data=NULL)

state 
Observed states, assumed to be ordered by time within each subject. 
subject 
Subject identification numbers corresponding to

data 
An optional data frame in which the variables represented
by 
If the data are intermittently observed (panel data) this table should not be used to decide what transitions should be allowed in the Q matrix, which works in continuous time. This function counts the transitions between states over a time interval, not in real time. There can be observed transitions between state r and s over an interval even if q_{rs}=0, because the process may have passed through one or more intermediate states in the middle of the interval.
A frequency table with starting states as rows and finishing states as columns.
C. H. Jackson chris.jackson@mrcbsu.cam.ac.uk
crudeinits.msm
1 2 3 4 5 
Questions? Problems? Suggestions? Tweet to @rdrrHQ or email at ian@mutexlabs.com.
All documentation is copyright its authors; we didn't write any of that.