= Solution
The command uses the model without covariates, starts in mild fatigue at time zero, and calculates expected accumulated years in each state between times $0$ and $10$. Let $Z(t)$ be the fatigue state and $Q$ its fitted <generator matrix>. For the <occupation time of a continuous-time Markov chain>,
$$
O_j(10)=\int_0^{10}\mathbf1_{\{Z(t)=j\}}\,dt,
$$
the <expected finite-horizon occupation time> is
$$
\mathbb E[O_j(10)\mid Z(0)=1]
=\int_0^{10}\Pr\{Z(t)=j\mid Z(0)=1\}\,dt
=\int_0^{10}(e^{tQ})_{1j}\,dt.
$$
The first equality follows by interchanging a bounded time integral and <expected value>, and the second uses the homogeneous <continuous-time Markov chain> <transition matrix>. The reported expectations are \b[7.014800 years mild, 1.724686 years moderate, and 1.260514 years severe]. They sum to ten because the person occupies exactly one state at every time. All repeated entries are counted: these are not the lengths of single <holding times>, the durations until first reaching each state, or the probabilities of occupying the states at year ten. The interpretation of the time limits is also given in https://chjackson.github.io/msm/reference/totlos.msm.html[the package documentation].
Back to article page