Why Diagnose Duration Dependence?
A state-only Markov specification says that, at a given calendar time, the next transition depends on the person’s current state, not on how long that person has occupied it. If the transition rate instead changes with time spent in the state, a state-only specification can miss an important feature of the process. For example, the rate of leaving a recovery state might be higher soon after entry than among people who have remained there for several months.
A useful diagnostic is to compare transition patterns across sojourn-time strata while holding calendar time and relevant observed covariates as comparable as possible. A raw difference between “short-stay” and “long-stay” groups is not enough: the groups may have been observed in different calendar periods, or their risk sets may differ for other reasons. The earlier material on duration-dependent transition intensities defines the duration-specific model; here the emphasis is on how to look for evidence that a state-only specification is inadequate.
Write \(\lambda_{ij}(t\mid H(t-))\) for the transition intensity from \(i\) to \(j\), conditional on the observed history immediately before \(t\). A duration-dependent specification may be written as \(\lambda_{ij}(t\mid X(t-)=i,U(t),Z(t))\), where \(Z(t)\) represents other modeled covariates. The diagnostic question is whether the transition pattern changes with \(U(t)\) at comparable values of calendar time and \(Z(t)\). A difference across durations can support duration dependence, but it does not establish that duration itself causes the transition.
Constructing a Fair Comparison
For each destination \(j\), count transitions from \(i\) to \(j\) and measure the time spent at risk for that transition. A person contributes time to the risk set for transitions out of \(i\) while occupying \(i\); once they leave \(i\), they no longer contribute time at risk for those transitions. An exit to another destination is a competing transition, not an event to \(j\), and it ends that person’s contribution to the risk set in \(i\). The crude transition-specific rate in a stratum is the number of observed \(i\)-to-\(j\) transitions divided by the at-risk person-time in that stratum.
Duration strata might be prespecified, such as \(0\)–\(2\) months, \(2\)–\(6\) months, and more than \(6\) months since entry to \(i\). The precise boundaries should reflect the scientific question and available data; they should not be chosen repeatedly until a striking difference appears. For a credible comparison, the strata need overlap in calendar time and covariates. If all short-duration observations come from one calendar era and all long-duration observations from another, duration and calendar time cannot be separated by those data alone.
The simplest diagnostic uses a table or plot of transition-specific rates by duration stratum, preferably within calendar-time strata or after standardization to a common calendar-time distribution. Compare the whole pattern across destinations, not just the total rate of leaving state \(i\). A change in the overall exit rate and a change in the relative rates of particular destinations are different findings.
Worked Example: Comparing Two Sojourn-Time Strata
Suppose a hypothetical process has state \(i\) and two possible destinations, \(j\) and \(k\). In a calendar-time-matched comparison, the short-duration stratum contributes 40 person-months at risk, with 4 transitions to \(j\) and 2 to \(k\). The long-duration stratum contributes 30 person-months, with 9 transitions to \(j\) and 1 to \(k\). Assume the calendar-time distributions and measured covariates have been made comparable across strata.
For destination \(j\), the estimated rates are \(\hat{\lambda}_{ij,\text{short}}=4/40=0.100\) transitions per person-month and \(\hat{\lambda}_{ij,\text{long}}=9/30=0.300\) transitions per person-month. The estimated rate ratio is \(0.300/0.100=3.00\). The observed rate to \(j\) is three times as high in the long-duration stratum.
A simple approximate standard error for the log rate ratio, under independent Poisson event counts with fixed person-time, is \(\sqrt{1/9+1/4}=0.601\). Thus an approximate 95% confidence interval for the rate ratio is \(\exp\{\log(3.00)\mathbin{\pm}1.96(0.601)\}=(0.924,9.75)\). This interval is wide and includes 1. The point estimate suggests a difference, but these data do not give precise evidence that the rate to \(j\) differs between the strata at the 5% level.
For destination \(k\), the rates are \(2/40=0.0500\) and \(1/30=0.0333\) transitions per person-month. The small counts make that comparison especially uncertain. The calculation also depends on the assumed count model and independence; if people contribute repeated state visits, a variance calculation must account for within-person dependence. The table is a diagnostic, not by itself a definitive model test.
Why Calendar-Time Control Matters
Calendar time can create an apparent duration pattern when the transition process changes over the study period. For example, care practices might change, or a transition rate may vary over calendar time for other reasons. If sojourn duration and calendar time are associated, an unadjusted comparison can attribute calendar-time variation to duration. Matching, stratifying, or modeling calendar time helps distinguish these explanations, provided the data contain observations at comparable combinations of duration and calendar time.
Worked Example: A Crude Difference That Disappears After Matching
Consider hypothetical short- and long-duration strata with exposure and transition counts in two calendar eras. In the early era, the short-duration stratum has 9 transitions in 90 person-months, while the long-duration stratum has 1 in 10 person-months. In the late era, the short-duration stratum has 4 in 10 person-months, while the long-duration stratum has 36 in 90 person-months.
Ignoring calendar era, the short-duration rate is \((9+4)/(90+10)=13/100=0.130\) transitions per person-month. The long-duration rate is \((1+36)/(10+90)=37/100=0.370\). The crude rate ratio is \(0.370/0.130=2.85\), which might appear to suggest a strong duration pattern.
Within the early era, both rates are \(0.100\) transitions per person-month: \(9/90=0.100\) for short duration and \(1/10=0.100\) for long duration. Within the late era, both are \(0.400\): \(4/10=0.400\) and \(36/90=0.400\). After comparing like calendar eras, there is no observed duration difference in either era. The crude difference arose because short-duration exposure was concentrated in the early era and long-duration exposure in the late era, while the rate was higher in the late era.
This example also warns against overinterpreting a matched comparison with little overlap. Some cells contain only 10 person-months, so their rates are imprecise. If a duration stratum has no exposure in a calendar period, the data cannot directly estimate its rate there without additional modeling assumptions.
A Simple Rate Derivation and a Model-Based Check
The rate calculation has a simple likelihood justification. Suppose, for one transition and one duration stratum, the event count \(D\) follows a Poisson distribution with mean \(E\lambda\), where \(E\) is the observed at-risk person-time and \(\lambda\) is a constant rate within that stratum. Its likelihood, ignoring factors not involving \(\lambda\), is proportional to \((E\lambda)^D\exp(-E\lambda)\). The log-likelihood is \(D\log(\lambda)-E\lambda\), plus a constant. Differentiating gives \(D/\lambda-E=0\), so the maximum-likelihood estimate is \(\hat{\lambda}=D/E\).
For independent strata with counts \(D_1,D_2\), the log rate ratio estimate is \(\log(D_2/E_2)-\log(D_1/E_1)\). Under the Poisson approximation, the estimated variance of \(\log(D_g/E_g)\) is \(1/D_g\), giving the standard error \(\sqrt{1/D_1+1/D_2}\). This approximation is unreliable when counts are very small or zero, and it does not account for clustering when one individual contributes multiple episodes.
A model-based check can retain calendar time while testing duration terms. For example, one can compare a model with a flexible calendar-time baseline for transition \(i\to j\) against a model that adds a duration-stratum effect. Under the state-only specification, the added duration effects are zero. A likelihood-ratio, score, or Wald test can assess that restriction under the corresponding model assumptions. The duration strata should be specified in advance where possible; a smooth duration function may avoid abrupt artificial boundaries but introduces its own modeling choices.
Worked Example: A Duration Gradient With Approximate Uncertainty
Suppose a hypothetical calendar-time-standardized comparison for transition \(i\to j\) gives the following event counts and person-time: 8 transitions in 80 person-months at durations \(0\)–\(2\) months; 12 in 60 person-months at durations \(2\)–\(6\) months; and 12 in 30 person-months after 6 months. Assume independent Poisson counts for this illustrative calculation.
The estimated rates are \(8/80=0.100\), \(12/60=0.200\), and \(12/30=0.400\) transitions per person-month. Relative to the first stratum, the estimated rate ratios are \(0.200/0.100=2.00\) and \(0.400/0.100=4.00\). This increasing pattern is compatible with a rising transition rate with duration, although it is not proof of such a pattern in a population.
For the comparison after 6 months versus \(0\)–\(2\) months, the approximate standard error of the log rate ratio is \(\sqrt{1/12+1/8}=0.456\). The approximate 95% confidence interval is \(\exp\{\log(4.00)\mathbin{\pm}1.96(0.456)\}=(1.64,9.78)\). Under the stated approximation, this interval is inconsistent with a rate ratio of 1 at the 5% level. It remains broad, so the magnitude is not precisely determined. A formal comparison across all three strata would use a model-based test of the joint duration effects rather than treating these two comparisons as independent.
Diagnostics, Alternatives, and Limitations
A duration-stratified table or plot is useful because it makes sparse risk sets and irregular patterns visible. A model with duration terms can adjust more systematically for calendar time and measured covariates, while a fully specified semi-Markov model can describe transition behavior directly as a function of sojourn duration. These approaches answer related but not identical questions: a descriptive stratification reveals patterns, a regression test evaluates a particular restriction, and a semi-Markov model supplies a structured model for prediction. The choice depends on the purpose and the data, not merely on which method produces the smallest p-value.
Check the following before interpreting a pattern:
- Calendar-time overlap: Are short- and long-duration risk sets observed in comparable calendar periods? If not, duration and calendar-time effects may be inseparable.
- Risk-set size and events: Are there enough at-risk time and transitions in each stratum? Sparse counts produce unstable rates and wide intervals.
- Exposure definition: Is the denominator person-time at risk in state \(i\), rather than the number of people who entered the state or the total follow-up time?
- Competing exits: Are transitions to other destinations counted separately and treated as ending time at risk for the transition of interest?
- Censoring and repeated visits: Could loss to follow-up be informative after accounting for modeled variables? Do individuals contribute multiple visits, requiring clustered uncertainty estimates?
- Stratum sensitivity: Does the qualitative pattern persist under reasonable prespecified duration boundaries, or does it depend on one arbitrary cut point?
A duration-specific cause-specific rate describes the instantaneous rate of a particular transition among those still in the state and at risk at that duration. It is not the same as the probability of making that transition by a given time. The remaining risk set changes as people experience competing exits, so rates alone do not summarize the full distribution of possible paths. Nor does evidence of duration dependence show that duration is the only relevant history: selection into long sojourns, unmeasured heterogeneity, and other history features may also contribute. The diagnostic identifies a failure of a particular state-only description; it does not, by itself, determine the best replacement model.
Check Your Understanding
Answer each question, then compare your reasoning with the short solutions below.
- A transition occurs 6 times during 50 person-months at risk in one duration stratum and 9 times during 30 person-months in another. What are the two estimated rates and their rate ratio?
- Why can a crude difference between short- and long-duration strata be misleading if the strata were observed in different calendar eras?
- When estimating the rate of transition \(i\to j\), what happens to a person’s risk time after they transition from \(i\) to a different destination?
- A duration-stratum comparison has a rate ratio of 2 but a wide confidence interval that includes 1. What can and cannot be concluded?
Solutions. (1) The rates are \(6/50=0.120\) and \(9/30=0.300\) transitions per person-month; the rate ratio is \(0.300/0.120=2.50\). (2) If transition rates also vary by calendar era, an imbalance in the eras represented can create or mask an apparent duration pattern; compare or standardize at comparable calendar times when the data allow it. (3) That person leaves the risk set in state \(i\), so their contribution to time at risk for transitions out of \(i\) ends at that competing transition. (4) The point estimate indicates a higher estimated rate in one stratum, but the interval indicates substantial uncertainty and does not rule out a rate ratio of 1 at the corresponding confidence level. It is not evidence that the null is true, nor does it establish a causal effect.