Skip to main content

Monte Carlo Simulation

TransPlan's Phase 2 engine uses Monte Carlo simulation to estimate transplant probability distributions for each city.

Why Monte Carlo?

Wait time on a transplant list is inherently stochastic. A patient might wait 6 months or 36 months for the same organ in the same city, depending on donor availability, organ compatibility matches, and clinical status changes. A single point estimate ("expected wait: 18 months") loses this uncertainty.

Monte Carlo simulation captures the full distribution by sampling from calibrated statistical models 1,000 times per city.

Algorithm Overview

For each city, the engine first samples a wait time from a log-normal distribution parameterized by SRTR data for that city, organ, and blood type. It then applies clinical multipliers based on cPRA, MELD, or LAS. Next, a competing risks check determines whether the patient receives a transplant, dies, or is delisted at each time step. The outcome (transplant, mortality, delisting, or still waiting) is recorded at the 6, 12, 24, and 36 month horizons. This entire process repeats 1,000 times to build the outcome distribution.

Performance

Running all ~233 kidney centers at 1,000 iterations each takes well under a second on a typical laptop. Results are not cached; each request recomputes fresh.

Log-Normal Wait Time Model

Wait time T for a given (city, organ, blood_type) combination is modeled as:

T ~ LogNormal(μ, σ)

where μ and σ are estimated from SRTR Table B10 (Program-Specific Reports, biannual).

City Factor and Clinical Multiplier

The raw sampled wait time is scaled by up to three independent terms:

T_adjusted = T × city_factor × clinical_multiplier / cod_multiplier

The city factor captures how a city's historical median compares to the national median for that organ and blood type. A city_factor greater than 1.0 means longer waits than average, while a value less than 1.0 means shorter. These are derived from SRTR Table B10 by computing each city's median divided by the national median across all centers.

The clinical multiplier adjusts for the patient's organ-specific clinical score, which affects allocation priority independently of city:

ScoreRangeMultiplier directionRationale
cPRA (kidney)0 to 100%> 1.0 at high valuesHighly sensitized patients need a rare antigen-negative donor, making each match attempt less likely to succeed
MELD (liver)6 to 40< 1.0 at high valuesHigh MELD patients receive allocation priority; the sickest patients are offered organs first
LAS (lung)0 to 100< 1.0 at high valuesHigh LAS patients receive allocation priority by the same urgency-based logic

A cPRA of 80% produces a multiplier of roughly 1.5x to 3.0x, meaning the adjusted wait is 50% to 200% longer than baseline. A MELD of 35 or higher produces a multiplier around 0.3x, reflecting emergency-level allocation priority.

Cause-of-Death (COD) Multiplier (Optional)

When adjust_for_cause_of_death is enabled, the simulation divides wait times by a COD multiplier that reflects regional organ-specific donor availability. The multiplier combines organ recovery rates from published literature (PMC10329409) with state-level cause-of-death proportions from CDC WONDER. It is normalized and centered at 1.0, with typical variation of 1 to 15% depending on the organ type. More donors in a region means shorter expected wait. This is computed per-city using data/cause-of-death-by-region.json.

Output: Probability Estimates

After 1,000 iterations, the fraction of runs that resulted in a transplant by each horizon is the probability estimate:

P(transplant ≤ t) = count(outcome == transplant AND time ≤ t) / 1000

Reported Metrics

MetricDefinition
p_transplant_6moFraction transplanted within 6 months
p_transplant_12moFraction transplanted within 12 months
p_transplant_24moFraction transplanted within 24 months (primary ranking metric)
p_transplant_36moFraction transplanted within 36 months
median_wait_monthsMedian wait across all 1,000 iterations
confidence_interval_95Bootstrap 95% CI for 24-month probability

CDF Curves

The cumulative distribution function (CDF) shows P(transplant ≤ t) for t from 0 to 60 months, computed from the 1,000 simulation outcomes. The CDF is plotted in the app as a line chart per city.

Cities with steeper CDFs offer faster access for this patient profile.

Interactive: CDF by Clinical Score Impact

See how clinical multipliers shift the CDF. High cPRA pushes the curve right (longer waits), while high MELD/LAS pulls it left (priority allocation).

Kidney CDF: Effect of cPRA on Wait Time

National median: 27.4 months | Log-normal sigma: 1.2

Confidence Intervals

The 95% CI is computed via bootstrap resampling of the 1,000 simulation outcomes. The procedure resamples the 1,000 outcomes with replacement across 200 bootstrap iterations, computes p_transplant_24mo for each resample, and then reports the 2.5th and 97.5th percentile as the interval bounds.

Wide CIs indicate high variance, often due to rare blood types or extreme clinical scores that hit data-sparse regions of the model.

Ranking

Centers are ranked by p_transplant_24mo descending. For ties, median_wait_months ascending is used as a tiebreaker.

A point ordering alone would overstate how much the data can distinguish centers, so the ranking is also reported as rank intervals with tie groups: a bootstrap over each center's estimate yields a plausible rank range, and centers whose ranges overlap are shown as tied rather than ordered. A center listed 8th with an interval of 3-19 is not meaningfully ahead of one listed 12th.

Limitations

The model is calibrated on historical SRTR data, so future policy changes (for example, kidney allocation score updates) may not be reflected. Blood type and organ combinations with low SRTR sample counts have higher uncertainty.

Center-specific acceptance practices and multi-listing are now modeled, though both with important caveats:

  • Acceptance practices. SRTR publishes a risk-adjusted Offer Acceptance Rate Ratio per program, which is ingested as a directly observed measure of center discretion and used to thin the offer stream. It is a center-level average, so it cannot express that acceptance differs by patient subgroup at the same center — see L-075.
  • Multi-listing. POST /multi-listing returns the joint probability of transplant across a 2-5 center shortlist. The centers are not treated as independent, since a candidate listed at several programs competes for a partly shared donor pool.

What the model still does not represent is patient-level clinical trajectory: it has no notion of a candidate getting sicker or better while waiting, beyond the competing-risk hazards.

The complete list of known limitations is maintained in docs/limitations.md.

See Competing Risks for the mortality and delisting models.