HealthEconomics.wiki — Knowledge infrastructure for health economicsDraft for review, not published

Economic modelling › Markov modelling › Interactive demonstrator

Tunnel State Explorer

A tunnel state is one of a fixed sequence of one-cycle temporary states in a Markov model, letting risks, costs or utilities vary with time in a state. Watch a cohort step through a tunnel, compare it with a single memoryless state, and see what happens when people enter at different times.

Source: HealthEconomics.wiki concept page “Tunnel State” (version 1.0.2, term code HE-EM-MM-030). The tool works offline; links are optional references.

A cohort model needs a clock

A cohort Markov model knows only which state each share of the cohort is in. On its own it cannot tell a person one month after a heart attack from a person ten years after one. Under the Markov assumption the process has no memory of earlier cycles, so if time in the current state changes a risk, cost or utility, the states themselves must carry that history.

1 · Split the stateReplace one clinical state with a chain of one-cycle tunnel states, T1 to TK, followed by a long-term state L.
2 · Route forwards onlyEach tunnel state has a zero on the diagonal: people either leave (for example, die) or move to the next state.
3 · Size it to the effectThe number of tunnel states is set by how many cycles the duration effect lasts.

Run a tunnel against a memoryless state

The starting values reproduce the concept page’s illustrative post-myocardial infarction example: 1,000 people, annual death probabilities 0.20, 0.08 and 0.04 in years one to three, then 0.03 every later year. Recurrent infarction and ageing are left out.

SimulatorScenario: page example (post-myocardial infarction)

Tunnel design

Load a scenario or edit the probabilities. All values are illustrative, not clinical estimates.

The model has K tunnel states, a long-term state L and Dead.
Run settings
5 yearsLife years below are counted up to this horizon.

The memoryless comparator is one post-infarction state with a constant annual probability q, calibrated so its survival matches the correctly built tunnel at the end of year K.

Where the cohort is

End of year 0

With a tunnel (each chamber holds people for exactly one cycle)

Single memoryless state (the same probability every year, whatever the time since entry)

Calibrated memoryless q

0.10933

matches tunnel survival at year 3

Deaths in year 1

Tunnel

Single

Alive at end of year 5

Tunnel

Single

Life years per person, end-of-cycle

Tunnel

Single

People alive

TunnelSingle memoryless state

Deaths each year

Tunnel (solid)Single state (hatched)

Cohort trace (people at the end of each year)
Tunnel transition matrix (from row to column)

Life years per person to the horizon
Counting ruleTunnelSingle

Calibrating the memoryless comparator

The tunnel recursion

mT1,t+1 = Σi mi,t pi,T1
mTk+1,t+1 = mTk,t sk  (k = 1, …, K−1)
mL,t+1 = mTK,t sK + mL,t sLmj,t is the proportion of the cohort in state j at the end of cycle t; sk is the probability of neither dying nor leaving by another route in the k-th cycle since entry; sL is the probability of staying in L. Here death is the only exit, so sk = 1 − qk.

Let people enter at different times

Now 1,000 people start event-free. Each year a share has an infarction and enters T1, and a share die. Because entrants arrive in different cycles, the post-infarction group mixes people at different durations. The tunnel probabilities are the ones currently set in the simulator.

Entry settings
5%
1%
4

Who is in the post-infarction group

Average next-year death probability in the post-infarction group

q̄ = (mT1q1 + mT2q2 + mT3q3 + mLqL) / (mT1 + mT2 + mT3 + mL)The occupancy-weighted mean of the tunnel probabilities. Longer tunnels add one term per extra state. The average depends on when people entered, so no single cycle-specific probability for one post-infarction state fits every strategy.
nS,tunnels = nS + ntunnels − 1

How many tunnel states are needed?

The number follows from how long the duration effect lasts, measured in cycles. A risk that falls over the first three cycles and is constant from the fourth needs three tunnel states and a long-term state. Shorter cycles multiply the states.

Duration effect and model

If the effect does not span a whole number of cycles, this calculator rounds up; the concept page notes the effect must be represented or approximated over whole cycles.

One-cycle tunnel states (K)

States replacing the original (ntunnels = K + 1)

States in the expanded model

Cells in the transition matrix

other states   tunnel states   long-term state

Derive tunnel probabilities from one survival curve

When the evidence is a survival curve for time since entry, each tunnel probability comes from the rise in cumulative hazard across that cycle, assuming a constant rate within the cycle. Taking every probability from one curve keeps the sequence coherent.

Illustrative Weibull curve

This tool uses the parameterisation H(τ) = (τ / λ)γ. A shape γ below 1 gives a hazard that falls with time since entry. Parameter values are illustrative only.

0.50
20.0

Sends p1 to pK to the tunnel states and pK+1 to the long-term state, held constant thereafter (an approximation if the hazard keeps changing).

pτ = 1 − exp{−[H(τ) − H(τ − 1)]}pτ is the transition probability in the τ-th cycle spent in the state; H(τ) is the cumulative hazard at the end of that cycle.
Cycle-by-cycle derivation
Cycle since entry τH(τ)H(τ) − H(τ−1)pτ

In probabilistic sensitivity analysis, sample the shape and scale jointly (the cited tutorial used a multivariate lognormal distribution) rather than drawing each tunnel probability independently.

Check the routing

Most tunnel errors are routing errors. Choose an answer to see the reasoning.

When tunnels stop being the simple choice

Tunnels are cheap when one state needs a few and costly when several states need long ones. Building history into states can greatly increase their number, which the ISPOR-SMDM report calls state explosion.

Tunnel states

A short chain of one-cycle states carries time since entry inside a cohort model, each state with its own risks, costs and utilities.

Suits: a few states carrying the history that matters.

Cycle-specific probabilities

Probabilities change with time since the model started. This is enough when the whole cohort enters the state together, so time in state equals model time.

Test: do people enter the state in different cycles? If so, tunnels are needed.

Semi-Markov array

A time dimension is added to the transition matrix, indexed by current state, next state and time in the current state; adding simulation time as well could need a four-dimensional array.

Source: Hawkins, Sculpher and Epstein; Alarid-Escudero and colleagues.

Individual-level models

Markov microsimulation keeps each person’s history in tracker variables; discrete event simulation lets events occur at any time. Both are computationally intensive and harder to debug.

Suits: history that would need an unmanageable number of states.

The core rule

A tunnel state has a zero on the diagonal and leads only onward (apart from exits such as death). The number of tunnel states equals the number of cycles over which the duration effect changes; the long-term state takes over once the effect has run its course.

Institutional perspectives

PBAC (Australia). Guidelines version 5.0 (September 2016), subsection 3A.2.3, ask sponsors of cohort state-transition models whether transition probabilities vary with how long individuals have remained in a health state, and state that tunnel states are required to represent such time-varying probabilities. Individual-level models are reserved for structures that cannot feasibly be run as cohort models.

NICE Decision Support Unit. Technical Support Document 15 (April 2014), section 3.2, describes replicate states, sometimes called tunnel states, that record the passage of time even when the health state does not change, and warns that only so many can be added before a cohort Markov model becomes unwieldy.

Method, safeguards and limitations
  • The expanded model is still memoryless over its larger set of states, so history not written into the tunnel is lost.
  • A tunnel approximates time dependence only to the resolution of the cycle and the number of tunnel states used. Too few tunnel states start the long-term risk too early.
  • Entrants must reach T1 from every route into the clinical state, and the model must decide whether a repeat event sends people back to the start of the tunnel.
  • Probabilities estimated separately for each tunnel state can form an implausible sequence. Where the duration effect is uncertain, the tunnel design belongs in structural uncertainty analysis.
  • Matching one summary figure (here, survival at year K) does not make a memoryless state equivalent to a tunnel: it misplaces deaths in time, which matters for first-year costs, discounting and any treatment acting soon after the event.
  • This demonstrator uses death as the only exit, an annual cycle and no age-specific background mortality; a full model would add mortality from a life table. Costs and utilities are not modelled, although each tunnel state can carry its own. All numbers are illustrative teaching values, not clinical estimates, and the tool does not judge the quality of any real model.
  • The Weibull parameterisation H(τ) = (τ/λ)γ and the rounding-up rule in the state calculator are this tool’s choices for demonstration.
Sources listed on the concept page
  1. Alarid-Escudero F, Krijkamp E, Enns EA, Yang A, Hunink MGM, Pechlivanoglou P, Jalal H. A tutorial on time-dependent cohort state-transition models in R using a cost-effectiveness analysis example. Medical Decision Making. 2023;43(1):21-41. doi:10.1177/0272989X221121747
  2. Hawkins N, Sculpher M, Epstein D. Cost-effectiveness analysis of treatments for chronic disease: using R to incorporate time dependency of treatment response. Medical Decision Making. 2005;25(5):511-519. doi:10.1177/0272989X05280562
  3. Karnon J, Stahl J, Brennan A, Caro JJ, Mar J, Möller J. Modeling using discrete event simulation: a report of the ISPOR-SMDM Modeling Good Research Practices Task Force-4. Value in Health. 2012;15(6):821-827. doi:10.1016/j.jval.2012.04.013
  4. Siebert U, Alagoz O, Bayoumi AM, Jahn B, Owens DK, Cohen DJ, Kuntz KM. State-transition modeling: a report of the ISPOR-SMDM Modeling Good Research Practices Task Force-3. Value in Health. 2012;15(6):812-820. doi:10.1016/j.jval.2012.06.014
  5. Sonnenberg FA, Beck JR. Markov models in medical decision making: a practical guide. Medical Decision Making. 1993;13(4):322-338. doi:10.1177/0272989X9301300409

Related concepts: Markov model, transient state, time dependency, cycle length.