Why Fit Parametric Transition Models?
A multi-state prediction depends on the transition hazards that move individuals between states. The Aalen–Johansen estimator and Cox-based approaches provide useful nonparametric or semiparametric predictions; parametric models instead specify a survival-time distribution for each transition. This gives smooth hazards and can support predictions at times where data are sparse, but it makes the distributional assumptions consequential.
We use a simple illness-death process: state 1 is illness-free, state 2 is illness, and state 3 is death. Transitions \(1\to2\) and \(1\to3\) can occur from state 1; transition \(2\to3\) can occur from state 2. State 3 is absorbing. The focus here is fitting separate Weibull or log-normal models to these transition-specific risk intervals and combining their hazards under a clock-forward Markov model.
For each transition, construct records describing time at risk, the transition event indicator, and any covariates. For a transition out of state 1, a different first transition ends that transition’s risk interval and is treated as a censoring event in that transition-specific cause-specific hazard model. For \(2\to3\), a person enters the risk set on entering state 2. In the clock-forward model used here, the time scale remains time since the common origin; the interval therefore starts at the time state 2 was entered. Correct entry and exit times are essential.
Fitting Weibull and Log-Normal Models
The R package flexsurv fits parametric survival distributions by maximum likelihood. In flexsurvreg, a Weibull model can be specified with dist="weibull" and a log-normal model with dist="lnorm". A counting-process survival response, Surv(Tstart,Tstop,status), represents an interval beginning at Tstart and ending at Tstop; status is 1 if the transition of interest occurred at its end and 0 otherwise. For a \(2\to3\) model on the clock-forward time scale, this form represents delayed entry at state-2 entry. Check the installed package’s documentation and confirm that its survival-response handling matches the data structure being supplied.
For example, with a multi-state long data set called ms, where trans identifies the transition, status marks the transition of interest, and Tstart and Tstop are its risk-interval endpoints, fits can be requested with flexsurvreg(Surv(Tstart,Tstop,status) ~ 1, data=subset(ms, trans=="1-2"), dist="weibull") and the same formula with dist="lnorm". Repeat for each transition. Add covariates only when the model is intended to represent their effects on that transition.
The separate cause-specific likelihood contribution for an observed interval ending at \(t_i\), beginning at \(a_i\), with event indicator \(\delta_i\), is proportional to the hazard at the event time if the event occurred, multiplied by survival over the interval. For a specified transition hazard \(h(t)\), this contribution is
The full transition-specific likelihood is the product over its risk intervals. Other transitions terminate an interval for this cause-specific model, but they are not treated as evidence that the person remained in the original state indefinitely. This likelihood-based fitting relies on correct transition coding, appropriate risk intervals, independent subjects, and censoring that is non-informative for the transition hazard conditional on modeled covariates and the observed risk history. It also assumes the chosen parametric family adequately represents the transition hazard.
The Weibull parameterization used here has shape \(k>0\) and scale \(\lambda>0\), with survival \(S(t)=\exp\{-(t/\lambda)^k\}\). Its hazard is \(h(t)=(k/\lambda)(t/\lambda)^{k-1}\). Thus \(k=1\) gives a constant hazard, \(k>1\) an increasing hazard, and \(k<1\) a decreasing hazard. For a log-normal model, \(\log T\sim N(\mu,\sigma^2)\), so \(S(t)=1-\Phi((\log t-\mu)/\sigma)\) for \(t>0\). Its hazard is
where \(\phi\) and \(\Phi\) are the standard normal density and distribution functions. The log-normal model is an accelerated failure-time model; its hazard need not be proportional over time and can rise and later fall.
Worked Example: Fitting and Comparing Two Models
Suppose a hypothetical cohort has been expanded into transition-specific risk intervals as described above. Assume the clock-forward risk intervals, event indicators, and censoring information have been checked. For the \(0\to1\) transition in a simpler two-state notation, flexsurvreg is used to fit both distributions. Suppose the hypothetical fitted Weibull parameters are \(k=1.40\) and \(\lambda=8.00\) years, while the fitted log-normal parameters are \(\mu=1.90\) and \(\sigma=0.65\). These numbers are illustrative estimates, not results from a real study.
At \(t=5\) years, the Weibull hazard is
For the log-normal fit, \(z=(\log 5-1.90)/0.65\approx-0.4470\). The standard normal density is approximately \(\phi(z)=0.3610\), and the upper tail is \(1-\Phi(z)\approx0.6725\). Therefore,
At five years the fitted log-normal hazard is higher, by about \(0.0201\) per year. This is a comparison of instantaneous rates at that time, not a comparison of five-year event probabilities. The hazards may differ in ordering at other times. A model comparison should consider the full fitted curves, likelihood-based criteria such as AIC, uncertainty, and compatibility with the observed transition data—not just one time point.
From Transition Hazards to Occupancy Predictions
For the three-state illness-death process, arrange the transition hazards in the intensity matrix \(Q(t)\). Its off-diagonal entries are the allowed transition hazards and each diagonal entry is the negative sum of the other entries in that row. For example,
If \(P(u,t)\) is the matrix of transition probabilities from each starting state at time \(u\) to each state at time \(t\), its rows evolve according to \(dP(u,t)/dt=P(u,t)Q(t)\), with \(P(u,u)\) equal to the identity matrix. Because Weibull and log-normal hazards usually vary with time, this system generally requires numerical integration. Evaluate the fitted transition hazards at successive times, form \(Q(t)\), and integrate the matrix equation. Starting from state 1, the first row of \(P(0,t)\) gives the predicted probabilities of being illness-free, ill, or dead at time \(t\).
A useful derivation explains why the rows of the intensity matrix sum to zero. Over a short interval \(\Delta t\), the probability of a transition \(r\to s\) is \(q_{rs}(t)\Delta t+o(\Delta t)\). The probability of remaining in state \(r\) is therefore \(1-\sum_{s\ne r}q_{rs}(t)\Delta t+o(\Delta t)\). Subtracting the identity matrix, dividing by \(\Delta t\), and taking the limit gives the diagonal entry \(q_{rr}(t)=-\sum_{s\ne r}q_{rs}(t)\). This construction preserves total probability when the differential equations are integrated.
Worked Example: Combining Hazards Over One Year
Consider hypothetical fitted transition models whose hazards at the midpoint of a one-year interval are \(q_{12}=0.10\), \(q_{13}=0.05\), and \(q_{23}=0.20\) per year. Assume these rates are held constant over that interval as a midpoint approximation. The transition intensity matrix is
With constant rates over an interval of length one year, the state-1 occupancy is \(P_{11}=e^{-0.15}=0.8607\). The probability of being in state 2 at the end is the probability of transitioning from state 1 to state 2 at time \(s\), then remaining in state 2 to year end:
Since the process must be in one of the three states, \(P_{13}=1-e^{-0.15}-0.10e^{-0.20}(e^{0.05}-1)/0.05\approx0.05534\). Starting in state 2, \(P_{22}=e^{-0.20}=0.8187\) and \(P_{23}=1-0.8187=0.1813\). Thus, for someone starting in state 1, the one-year predicted occupancy is approximately 0.8607 in state 1, 0.08395 in state 2, and 0.05534 in state 3. These probabilities sum to 1 up to rounding.
For time-varying fitted hazards, the constant-rate calculation is applied on short intervals using a suitable numerical method, such as a midpoint matrix exponential, and the resulting transition matrices are multiplied in time order. The one-year midpoint approximation above illustrates the calculation; it should not be treated as an exact prediction from hazards that change substantially within the year. Smaller steps and numerical accuracy checks are then important.
Model Checks, Comparisons, and Limitations
Before interpreting predictions, examine each transition fit separately. Check that the event count and person-time are plausible, that risk intervals begin and end at the recorded state changes, and that no transition is assigned to someone who was not in its origin state. Compare fitted survival or cumulative hazard patterns with nonparametric summaries for the corresponding risk set. Inspect fitted hazards over the observed time range, and assess whether their shape is credible where data are sparse. Convergence, extreme parameter estimates, or fitted hazards that change implausibly near the edge of follow-up are warnings, not merely software details.
The approaches answer related but distinct questions. A cause-specific Cox model leaves the baseline hazard unspecified and estimates covariate effects under a proportional-hazards structure; a parametric model specifies the baseline hazard family and can yield smooth extrapolations. The Aalen–Johansen estimator estimates occupancy without imposing these parametric shapes, but does not by itself provide the same distribution-based extrapolation. Weibull is especially restrictive when the true hazard is non-monotone; log-normal allows a non-monotone hazard but still imposes a particular distributional form. Neither model should be selected solely because it yields a convenient prediction.
This construction also has substantive limits. Predictions require that all relevant transitions are represented, that the fitted transition hazards are applicable to the target covariate profile, and that the Markov assumption is adequate. If future risk depends on time spent in the current state or other past history beyond what is modeled, the clock-forward Markov intensity matrix may not be adequate; the clock-reset semi-Markov approach is a different model. Extrapolation beyond observed follow-up is especially sensitive to parametric assumptions. Finally, independently fitted transition models do not make uncertainty in the assembled probabilities disappear: uncertainty in each fitted model should be propagated, for example by simulation or bootstrap, when intervals for predictions are required.
For each transition, identify who is at risk, the correct time scale and entry time, the endpoint, and whether the transition of interest occurred.
Fit candidate Weibull or log-normal models with flexsurvreg, then check parameter estimates, hazard shapes, event counts, and agreement with observed transition patterns.
Evaluate fitted hazards, construct \(Q(t)\), and numerically integrate the transition-probability equations for the desired starting state and covariates.
Check Your Understanding
Answer each question, then compare your reasoning with the solutions.
- For a Weibull fit with \(k=1\), what is the hazard pattern, and what is its value if \(\lambda=10\) years?
- In fitting a \(2\to3\) transition model on the clock-forward scale, why does a person’s risk interval begin at state-2 entry rather than at time zero?
- If the three allowed transition hazards at a time point are \(q_{12}=0.08\), \(q_{13}=0.02\), and \(q_{23}=0.15\) per year, what is the first row of \(Q(t)\)?
- Why is a fitted hazard comparison at one time insufficient to conclude which model predicts more occupancy in state 2 at a later time?
Solutions. (1) The hazard is constant: \(h(t)=k/\lambda=1/10=0.10\) per year. (2) Before entering state 2, the person is not at risk for \(2\to3\); the transition-specific interval therefore starts when that risk begins. (3) The first row is \((-0.10,\ 0.08,\ 0.02)\), because the state-1 diagonal is minus the sum of its outgoing hazards. (4) Occupancy depends on the time course of all relevant hazards and the possibility of first entering state 2 and then leaving it; one hazard value does not encode those competing pathways over time.