statetable.msm {msm} | R Documentation |
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.
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 |
A frequency table with starting states as rows and finishing states as columns.
C. H. Jackson chris.jackson@mrc-bsu.cam.ac.uk
## Heart transplant data data(cav) ## 148 deaths from state 1, 48 from state 2 and 55 from state 3. statetable.msm(state, PTNUM, data=cav)