summary.msm, and provides a
rough indication of the goodness of fit of a multi-state model with
misclassification.prevalencemisc.msm(msm, times, observed=TRUE, expected=TRUE)msm.TRUE.TRUE.Observed = table of observed numbers of individuals in each state in
each time interval Observed percentages = corresponding percentage of the
individuals at risk in each time interval
Expected = table of corresponding expected numbers
Expected percentages = corresponding percentage of the
individuals at risk in each time interval
The observed numbers of individuals in each underlying state in each time interval are estimated from the observed states as follows. If an individual has one observation in state $i$ in interval $dt$, then he/she contributes 1 to the total in underlying state $i$ at that time. If an individual has observations in more than one state, for example three in state 1 and two in state 2, then the contributions are weighted. In this case the individual would contribute 0.6 to the state 1 total and 0.4 to the state 2 total.
The expected numbers of individuals in each state in each time interval are estimated using one-step-ahead prediction. For each observation time, the probability that this lies in each state, conditionally on the history of observations preceding that time, is computed as a ratio of the partial likelihoods. For each subject, the probabilities are averaged within each interval to obtain their contribution to the expected number in that state in that time interval. For example, if an individual has two observations in an interval, and corresponding forecast probabilities of 0.2, and 0.4 for state 1, then that individual would contribute 0.3 to the number of individuals expected in state 1 in that interval.
If death times are known exactly (death==TRUE in the call to
msm), then the observed number of deaths in an interval
is known. The expected number of deaths in an interval $t_1, t_2$
is calculated conditionally on the history before the interval. Let
$p_i$ be the probability that the $i$th individual dies in
$t_1, t_2$, conditionally on all their observations before
$t_1$. Then the expected number of deaths is the sum over
individuals $i$ of $p_i$.
msm, summary.msm