Enough evidence for which decision?¶
This notebook continues the serosurvey design notebook. That notebook asks how much survey is enough for a prevalence estimate; this one asks how much evidence is enough to decide whether a vaccine efficacy trial is feasible, and how large it must be. The pathogen, sites, rates, assay accuracies, capacities and prices are all synthetic.
Open the executed Jupyter notebook. The companion module contains the simulator, the planning estimator and the figures, and regenerates the saved result bundle:
uv run --extra notebook jupyter lab examples/trial_evidence_study.ipynb
uv run --extra notebook python -m examples.trial_evidence --overwrite
The second command runs 27 evidence designs with 1,000 replicates each, in one to two minutes. The notebook loads the saved bundle instead of rerunning it.
The decision¶
A trial with confirmed symptomatic disease as its primary endpoint (efficacy 70% against a 30% margin, so 78 cases for 90% power) can enrol up to 8,000 people at each of three sites for two years. It is feasible only if the sites together can produce enough cases. Planners know each site's infection hazard only roughly, and the share of infections that are symptomatic, and the share of symptomatic illness that reaches hospital, are uncertain.

Each layer of the pyramid is measured by a different stream:
| Layer | Stream | Blind spot |
|---|---|---|
| Infection | Cohort with single or confirmed serology | Says nothing about the symptomatic share |
| Symptomatic disease | Active fever follow-up of the cohort | Costs follow-up of every participant |
| Hospital-attended disease | Testing febrile patients at hospitals | Depends on care-seeking |
Two outcomes, two trial sizes¶
endpoint_rows computes the event target and the number of participants for
each endpoint with events_required and
person_time_for_events. Infection is measured by
serology to an antigen that is not in the vaccine. False seroconversions are
events too and dilute efficacy toward zero, so the event target uses the
observed efficacy from observed_efficacy.

At the best site's planning hazard, symptomatic disease needs about 14,000 participants. Infection needs about 2,800 with confirmed serology but about 5,300 with single calls, because single calls dilute 50% efficacy to 28%. Hospital-attended disease needs about 49,000 and is better measured after licensure, for example with a test-negative design. The notebook shows how the case requirement of a test-negative design depends on the vaccinated share of presenters, and how test specificity dilutes it.
Which evidence to buy¶
The study compares 27 evidence designs: a cohort of 0, 500 or 1,500 per site, single or confirmed serology, with or without active fever follow-up, and 0, 1,000 or 3,000 febrile patients tested per site. Each replicate draws true site hazards and pyramid shares, observes them with every design under common random numbers (smaller designs use the leading draws of larger ones), estimates symptomatic incidence, plans the trial, and compares the plan with the plan under the truth. The objectives are evidence cost, a wrong go/no-go decision, and launching an underpowered trial (realized power below 80%). Both indicators carry 95% Wilson intervals.

In the saved run, with an illustrative $700,000 budget:
- Buying no evidence leaves the decision a coin toss: 51.6% of decisions are wrong.
- Testing 1,000 febrile patients per site ($195,000) cuts that to 26.8%, with 6.3% underpowered launches.
- Serology alone costs more than that and launches about twice as many underpowered trials (11.8% to 13.7%), because it measures infection rather than the symptomatic share that sizes the trial.
- A cohort of 1,500 per site with single serology and active follow-up ($660,000) gives the fewest wrong decisions within the budget, 15.6%, and wins the right-decision priority. Its confirmed-serology version costs $795,000, above the budget.
- Combining streams with different blind spots protects the trial best: a cohort of 500 per site with confirmed serology and active follow-up, plus 1,000 febrile patients per site ($540,000), gives 18.3% wrong decisions and 4.8% underpowered launches, and wins the protect-the-trial priority.
Lowering the budget to $450,000 in the notebook's decision cell changes the choices: a followed cohort of 500 per site ($345,000) wins the right-decision priority, and a cohort of 500 with 1,000 febrile patients per site ($435,000) protects the trial best. No simulation rerun is needed.
The planning estimator¶
The infection hazard combines each site's prior median with corrected seroconversions (Rogan-Gladen) by precision weighting on the log scale. The symptomatic share combines its prior with the cases found by active follow-up, pooled across sites. Their product is one estimate of symptomatic incidence; hospital positivity, converted with the known background fever rate and the planning hospital-attended share, gives another with an independent blind spot, and the two are combined. This is a planning estimator chosen for transparency, not a joint posterior.
What a real application would replace¶
Site-specific hazards, clustering and seasonality; validated assay performance, including cross-reactivity; care-seeking and catchment populations; local costs and enrolment capacity; priorities agreed with sponsors, regulators and communities; and a joint model of all streams. Simulation intervals describe the precision of this simulation under the stated model, not the uncertainty of a real decision.