Tutorials › Competing Risks and Multi-State Models › Piecewise-Constant Duration Hazards

Semi-Markov and Non-Markov Models · Tutorial 338 of 699

Piecewise-Constant Duration Hazards

Learn to specify piecewise-constant duration hazards and calculate the resulting probability of remaining in a state or exiting through each available transition.

Advanced 10 min read

What You'll Learn

  • Define duration-based transition intensities on prespecified sojourn-time intervals
  • Combine transition-specific rates to obtain the total exit intensity
  • Derive survival in the current state from the integrated total intensity
  • Calculate interval-specific and cumulative probabilities for competing exits
  • Check model assumptions and diagnose problems with interval choices or sparse data
  • Compare piecewise-constant hazards with parametric and calendar-time approaches

Why Use Piecewise-Constant Duration Hazards?

A transition intensity describes the instantaneous rate of leaving a state, conditional on having remained there up to the time in question. In a semi-Markov model, that rate may depend on sojourn time: the time elapsed since entry into the current state. A piecewise-constant duration hazard represents this dependence using a small number of intervals. It allows the rate to change between intervals without requiring it to follow a single smooth parametric curve.

For example, a hypothetical model might assign one transition rate during the first two months in a state and a different rate thereafter. Once the intervals and rates are specified, the implied probability of remaining in the state and the probability of each possible exit can be calculated directly. These calculations are useful for interpreting a fitted model and for checking whether its implied probabilities are plausible.

Definition: Let \(i\) be a non-absorbing state, and let \(j\) range over the states reachable directly from \(i\). Write \(u\) for time since entry into \(i\). The duration-specific transition intensity \(\lambda_{ij}(u)\) is the instantaneous rate of transition from \(i\) to \(j\) at sojourn time \(u\), conditional on still being in \(i\) immediately before \(u\). The total exit intensity is \(\lambda_i(u)=\sum_j\lambda_{ij}(u)\). A piecewise-constant duration model specifies cutpoints \(0=a_0<a_1<\cdots<a_K\) and constants \(\lambda_{ij,k}\geq 0\), with \(\lambda_{ij}(u)=\lambda_{ij,k}\) on \([a_{k-1},a_k)\).

The rates have units of inverse time. If sojourn time is measured in months, for example, an intensity of \(0.08\) has units of per month. The interval boundaries are defined on the sojourn-time scale, not on calendar time. The model also requires clarity about which transitions are possible from state \(i\); a transition not included in the model has intensity zero.

Survival and Exit Probabilities

Let \(S_i(u)\) be the probability of still being in state \(i\) at sojourn time \(u\), conditional on entering \(i\) at time zero. Under the specified intensities, the total exit intensity governs this probability: when a person is still in \(i\), the chance of any exit over a short interval of length \(du\) is approximately \(\lambda_i(u)du\). Thus survival satisfies a differential equation whose solution is the exponential of the negative integrated total intensity.

$$ S_i(u)=\exp\left\{-\int_0^u\lambda_i(v)\,dv\right\} =\exp\left\{-\int_0^u\sum_j\lambda_{ij}(v)\,dv\right\}. $$

The probability of exiting specifically to \(j\) by sojourn time \(u\), rather than to another destination, is the cumulative incidence \(F_{ij}(u)\). To exit to \(j\) at time \(v\), the process must first still be in \(i\) at \(v\), then transition to \(j\) at rate \(\lambda_{ij}(v)\). Integrating that event rate over time gives:

$$ F_{ij}(u)=\int_0^u S_i(v)\lambda_{ij}(v)\,dv. $$

These probabilities account for competing exits: a transition to another destination removes the possibility of a later exit to \(j\) on that sojourn. The probabilities satisfy \(\sum_j F_{ij}(u)=1-S_i(u)\), when all exits from \(i\) are included and there is no additional censoring or unmodelled exit.

Result: Suppose the process has survived to the start \(a_{k-1}\) of an interval of length \(d\), and the transition intensities are constant on that interval. Let \(\lambda_{i,k}=\sum_j\lambda_{ij,k}\). The conditional probability of no exit during the interval is \(\exp(-\lambda_{i,k}d)\). If \(\lambda_{i,k}>0\), the conditional probability of exit to \(j\) during the interval is \(\frac{\lambda_{ij,k}}{\lambda_{i,k}}\{1-\exp(-\lambda_{i,k}d)\}\). If \(\lambda_{i,k}=0\), the probability of any exit is zero.

To obtain an unconditional interval probability from entry into \(i\), multiply the conditional probability by the probability of surviving to the interval’s start. If the interval ends before the next cutpoint, use only the elapsed portion of the interval. The conditional destination share, \(\lambda_{ij,k}/\lambda_{i,k}\), applies to exits within that interval because the competing intensities are constant there.

Worked Calculations

Worked Example: One Exit With Two Duration Intervals

Suppose a hypothetical process has one possible exit from state \(i\). Its intensity is \(0.10\) per month for sojourn times from 0 to 2 months and \(0.04\) per month from 2 months onward. Calculate the probability of remaining in \(i\) through month 4, and the probability of exiting between months 2 and 4.

The total intensity is the sole transition intensity. The integrated intensity through month 4 is \(0.10(2)+0.04(4-2)=0.28\). Therefore,

$$ S_i(4)=\exp\{-[0.10(2)+0.04(2)]\} =\exp(-0.28)=0.7558. $$

So the probability of an exit by month 4 is \(1-0.7558=0.2442\). For the probability of an exit specifically between months 2 and 4, first calculate survival to month 2: \(S_i(2)=\exp[-0.10(2)]=0.8187\). Conditional on reaching month 2, the probability of an exit in the next two months is \(1-\exp[-0.04(2)]=0.07688\). Thus the unconditional probability of exiting in that interval is

$$ S_i(2)\{1-\exp[-0.04(2)]\} =0.8187(0.07688)=0.06295. $$

This is the probability of an exit during months 2 to 4, measured from entry into \(i\). It is smaller than the conditional interval probability because not everyone survives in \(i\) to month 2.

Worked Example: Two Competing Destinations

In a hypothetical model, state \(i\) has exits to \(A\) and \(B\). From 0 to 3 months, the intensities are \(0.08\) and \(0.02\) per month, respectively. From 3 to 6 months, they are \(0.03\) and \(0.07\) per month. Calculate survival in \(i\) through month 6 and the cumulative incidence for each destination by month 6.

The total intensity is \(0.10\) per month in both intervals. Survival through month 3 is \(\exp[-0.10(3)]=0.7408\), and survival through month 6 is

$$ S_i(6)=\exp\{-[0.10(3)+0.10(3)]\} =\exp(-0.60)=0.5488. $$

In the first interval, the probability of an exit to \(A\), conditional on being in \(i\) at entry, is \((0.08/0.10)\{1-\exp(-0.10(3))\}=0.2073\). The corresponding probability for \(B\) is \((0.02/0.10)\{1-\exp(-0.10(3))\}=0.05184\).

For the second interval, the conditional exit probability to \(A\), given survival to month 3, is \((0.03/0.10)\{1-\exp(-0.10(3))\}=0.07775\). Multiplying by survival to month 3 gives an unconditional contribution of \(0.7408(0.07775)=0.05760\). For \(B\), the corresponding contribution is \(0.7408(0.07/0.10)\{1-\exp(-0.30)\}=0.1344\). Adding contributions across intervals gives \(F_{iA}(6)=0.2649\) and \(F_{iB}(6)=0.1862\), to rounding. Their sum, \(0.4511\), agrees up to rounding with \(1-S_i(6)=0.4512\).

The higher share of exits to \(A\) early and to \(B\) later follows from the changing relative intensities. Neither cumulative incidence is obtained by applying a single destination proportion to the total exit probability across all six months.

Worked Example: Conditional Risk After Surviving to an Interval

Suppose a hypothetical state has two exits, \(A\) and \(B\). During months 0 to 2, their intensities are \(0.12\) and \(0.04\) per month. During months 2 to 6, their intensities are \(0.03\) and \(0.09\) per month. Given survival in \(i\) to month 2, calculate the probability of any exit by month 5 and the probabilities of exit to \(A\) and \(B\) by month 5.

The question conditions on survival to month 2, so calculations start at the beginning of the second interval. From month 2 to month 5 is three months. The total intensity in that interval is \(0.03+0.09=0.12\) per month. Consequently, the conditional probability of any exit by month 5 is \(1-\exp[-0.12(3)]=1-\exp(-0.36)=0.3023\).

The conditional destination shares in this interval are \(0.03/0.12=0.25\) for \(A\) and \(0.09/0.12=0.75\) for \(B\). Therefore, the conditional probabilities by month 5 are \(0.25(0.3023)=0.07558\) for \(A\) and \(0.75(0.3023)=0.2267\) for \(B\). They sum to \(0.3023\), the probability of any exit. These are conditional on reaching month 2; unconditional probabilities from entry would additionally account for survival through the first two months.

Why the Formulas Hold

The survival equation can be justified over a short interval. Conditional on remaining in \(i\) until sojourn time \(u\), the probability of an exit during the next \(du\) units of time is \(\lambda_i(u)du+o(du)\), where the remainder divided by \(du\) tends to zero as \(du\) tends to zero. Hence the probability of no exit in that interval is \(1-\lambda_i(u)du+o(du)\), and

$$ S_i(u+du)=S_i(u)\{1-\lambda_i(u)du+o(du)\}, \qquad \frac{dS_i(u)}{du}=-\lambda_i(u)S_i(u). $$

With \(S_i(0)=1\), solving this differential equation gives the exponential integrated-intensity formula. On a constant-rate interval, the conditional survival over length \(d\) is \(\exp(-\lambda_{i,k}d)\). The transition-specific event probability over that interval is the integral of survival within the interval times its constant transition intensity:

$$ \int_0^d \exp(-\lambda_{i,k}v)\lambda_{ij,k}\,dv = \frac{\lambda_{ij,k}}{\lambda_{i,k}} \{1-\exp(-\lambda_{i,k}d)\}, \quad \lambda_{i,k}>0. $$

This derivation assumes the specified intensities correctly describe the conditional transition rates over the interval. It also assumes transitions are represented by the stated possible exits, so that the total intensity is the sum of their intensities. The piecewise-constant model allows a jump in intensity at a cutpoint; the value assigned at the single cutpoint does not affect the integrated probabilities.

Assumptions, Diagnostics, and Alternatives

The calculations are exact for the specified model, but the model’s assumptions still need to be appropriate for the intended use. In particular, the sojourn-time clock starts at entry into the state whose exit is being modelled. The rates in the example are assumed to depend on sojourn time through the chosen intervals, with no additional history or covariate dependence unless those features are explicitly included. A rate is interpreted as constant within an interval, not as a constant probability of exit per month.

Useful diagnostics include checking whether observed exit rates appear to change within a proposed interval, whether cutpoints leave intervals with very little information, and whether the implied survival and cause-specific probabilities match the data’s broad pattern. If estimated rates are based on observed events, an interval with few events or little time at risk can yield imprecise estimates. Abrupt fitted changes at cutpoints may reflect the chosen partition rather than a genuine abrupt change in risk. Compare results under reasonable alternative cutpoints, and check that probabilities across all exits and remaining in the state sum to one, allowing for rounding.

ApproachHow duration dependence is representedMain consideration
Piecewise-constant duration hazardsSeparate constant rates on specified sojourn-time intervalsFlexible across intervals, but sensitive to interval choices and data sparsity
Parametric sojourn-time distributionA chosen distribution imposes a smooth, structured duration patternCompact and potentially efficient, but its distributional form may not fit
Calendar-time Markov intensityRates depend on calendar time and current state, not duration in stateAppropriate for calendar-time effects, but does not itself represent duration dependence

The earlier material on parametric sojourn-time distributions provides a more structured alternative. A piecewise model can be easier to specify when the shape of the hazard is uncertain, but its results depend on the chosen partition and it does not justify extrapolation beyond the observed duration range. Like any model-based probability calculation, these formulas describe implications of the assumed intensities; they do not establish that the rates are correctly specified or that a transition is caused by any particular factor.

Common Mistake

A frequent error is to multiply a transition intensity by the whole follow-up duration and treat the result as an exit probability. For a constant total intensity \(\lambda\), the probability of no exit over duration \(d\) is \(\exp(-\lambda d)\), so the probability of any exit is \(1-\exp(-\lambda d)\), not \(\lambda d\). The approximation \(1-\exp(-\lambda d)\approx\lambda d\) is useful only when \(\lambda d\) is small. With competing exits, the probability for a particular destination also depends on its share of total intensity and on survival up to that time.

Key takeaway: Add the transition-specific intensities to obtain the total exit intensity, integrate that total to calculate survival, and integrate survival times a transition-specific intensity to obtain each cumulative exit probability. For constant rates within an interval, use the exponential interval formulas and account for survival to the interval’s start.

Check Your Understanding

Try each question, then check the solutions below.

  1. A single exit has intensity \(0.05\) per week over a two-week interval. What is the conditional probability of no exit during the interval?
  2. In one interval, two exits have intensities \(0.06\) and \(0.04\) per month. What is the conditional probability of exit to the first destination within one month?
  3. Why must an unconditional exit probability for an interval after the first be multiplied by survival to that interval’s start?
  4. State one diagnostic concern that can arise when many duration intervals are used with sparse transition data.

Solutions. (1) The probability is \(\exp[-0.05(2)]=\exp(-0.10)=0.9048\). (2) The total intensity is \(0.10\) per month, so the probability is \((0.06/0.10)\{1-\exp(-0.10)\}=0.05710\). (3) The conditional interval probability applies only to individuals who reach the interval in state \(i\); multiplying by survival to its start gives the probability from entry into \(i\). (4) Sparse data can produce unstable, imprecise rate estimates within intervals, and cutpoint-specific changes may be driven by limited information rather than a reliable duration pattern.

Clinical Biostats