Concept Architecture
Double Programming in Health Economic Model Verification
Double programming checks a health economic model by building a second, independent version of the same calculations from the same specification and comparing what the two versions produce. Where the versions agree on the compared outputs, that is evidence that the code matches the specification as both analysts read it, and where they disagree, at least one of them holds an error or the specification is unclear. The method matters in health technology assessment because a coding slip can move an ICER across a decision threshold with no change in the evidence. TECH-VER, which calls it model replication or parallel programming, places it last in an order of tests set by the expected time each takes on a whole model, and guidance keeps it for problems that cheaper tests leave open.
Double programming as model verification
The ISPOR-SMDM task force report by Eddy and colleagues lists double programming, in which sections of a model are programmed independently by two programmers, among the techniques of verification. The report describes verification, also called internal validity, internal consistency or technical validity, as checking that the mathematical calculations are performed correctly and are consistent with the model's specifications. Double programming therefore belongs to technical verification, the question of whether the model was built right.
The report also states the limit. Verification helps ensure there are no unintentional computational errors but does not evaluate the accuracy of the model's structure or predictions. Two versions written from one specification share its structure and inputs, so their agreement says nothing about whether the structure fits the disease or the results match observed data. Those questions belong to model validation, including conceptual model validation and external validation.
Other sources file the method under different labels. The AdViSHE tool by Vemer and colleagues places double programming under other validation techniques, covering two developers coding components independently or one model built in two software packages. Corro Ramos and colleagues cite a study that calls double programming internal validation, one of several uses of that ambiguous term. In simulation science, Sargent lists reprogramming critical components to see whether the same results are obtained as a technique of dynamic testing within computerised model verification.
How an exercise is organised
The exercise is only as informative as the two builds are independent. A typical exercise runs in five steps.
1. Fix the specification. Both analysts work from one written description of structure, equations, inputs and decision rules.
2. Choose the scope. The second version may cover the whole model or selected calculations, such as transition probabilities, drug acquisition costs or the summation of discounted QALYs.
3. Build separately. The second analyst does not copy the first analyst's formulae or code, and a different software package, for example R against a spreadsheet, makes shared slips less likely.
4. Compare disaggregated outputs. Both versions run on identical inputs, deterministically first, and are compared cycle by cycle and arm by arm as well as on totals. In a stochastic microsimulation, runs also differ by chance, so the comparison needs the same pre-generated random draws fed to both versions, or enough runs to bring Monte Carlo error inside the agreed tolerance.
5. Resolve and record. Each discrepancy is traced to its cause and fixed, and the log goes into the model documentation.
The TECH-VER paper by Büyükkaramikli and colleagues shows the value of disaggregated comparison. In student models built for a graduate course, utilities for two interventions had been assigned the wrong way round, and the errors were found by comparing costs and utilities accrued per cycle with parallel models, then confirmed by white-box testing.
Its place in the TECH-VER order and in HTA review
TECH-VER describes replication-based tests in which the reviewer re-performs the calculations in the same or different software, or even with pen and paper. The checklist orders its tests by the expected time each takes on a whole model, so black-box testing comes first, white-box testing of the code or formulae next, and model replication or parallel programming last. Replication is recommended only in certain circumstances, such as when white-box tests fail to find the root cause of unexpected behaviour or when complex, non-transparent programming makes white-box testing hard.
The CDA-AMC Model Validation Tool by Coyle and colleagues, published by CADTH, leaves replication out of its 53 items as unlikely to be possible in many cases, noting that replication, which means recoding large parts, or all, of the model workings, may be more relevant when significant unexplained concerns remain after white-box testing.
NICE PMG36 (2022, updated 2026), section 4.6.4, asks companies to detail the quality assurance methods used in developing the model and to provide the methods and results of model validation, which is where an internal double-programming exercise would be reported.
Wright and colleagues give a whole-model case, which they call independently reproducing the original model. It sits close to model replication, because the rebuild came after the original model was published. A health economist not involved in an early breast screening model read its R code, wrote a text-based algorithm that the original lead modeller checked, rebuilt the model in a new R script and compared the two. This found two significant errors, a random-number comparison that assigned screen detection the wrong way round and a missing cost of follow-up testing after false-positive screens. The first had not affected the published results, because the proportion it was compared with was set at 0.5 and not varied in the probabilistic analysis.
Worked example with a missed stopping rule
All numbers in this example are illustrative. A cohort model specification says a new drug costs GBP 5,000 per annual cycle and is given for at most two cycles to people alive at the start of each cycle. The annual probability of death is 0.10, the time horizon is four cycles, and costs are undiscounted. Analyst A builds the model in a spreadsheet and Analyst B rebuilds the drug cost calculation in R.
where is total drug cost per person, is the drug cost per cycle (GBP 5,000), is the cycle, is the number of cycles (4), is the proportion of the cohort alive at the start of cycle , and equals 1 when the drug is given in cycle and 0 otherwise.
1. Survival. With 10% dying each cycle, the proportions alive at the start of cycles 1 to 4 are 1.000, 0.900, 0.810 and 0.729, which sum to 3.439.
2. Analyst B. With the stopping rule, is 1 in cycles 1 and 2 only, so the cost is 5,000 × 1.900 = GBP 9,500.
3. Analyst A. The spreadsheet charges the drug for as long as people are alive, so the cost is 5,000 × 3.439 = GBP 17,195.
4. Comparison by cycle. Cycles 1 and 2 give GBP 5,000 and GBP 4,500 in both versions. Cycle 3 gives GBP 4,050 against zero and cycle 4 gives GBP 3,645 against zero, a total gap of GBP 7,695, and the pattern points to the stopping rule.
5. Effect on the decision. The rest of Analyst A's model shows that the drug avoids GBP 1,500 of hospital costs per person and gains 0.40 QALYs, and both ICERs use these figures. Analyst A's ICER is 15,695 / 0.40 = GBP 39,237.50 per QALY, using 17,195 minus 1,500, and Analyst B's is 8,000 / 0.40 = GBP 20,000 per QALY, using 9,500 minus 1,500. At an illustrative threshold of GBP 30,000 per QALY, the error alone would make a cost-effective drug look poor value.
The specification settles which version is wrong. Had it been silent on the stopping rule, both versions would be faithful to their own reading and the fix would belong in the specification. TECH-VER reports the same fault in a student model that charged a drug for as long as patients were alive although it could be given for at most 10 cycles.
Reading agreement and disagreement
Agreement is evidence about the code, conditional on the specification. If both analysts misread the same sentence, or the specification holds a wrong assumption, the versions agree and both are wrong. Agreement on totals alone is weaker, because offsetting errors can cancel.
Disagreement does not say which version is at fault. Writing on clinical trial programming, Gupta and Sabat Stofsel observe that discrepancies generally arise when either the primary or the secondary programmer forgot to apply a condition or a specification detail. A small difference traced to rounding can be accepted if the team agreed a tolerance before comparing, while any difference that changes costs, QALYs or the ICER needs a cause.
Neighbouring checks and other meanings
Model replication rebuilds a published model from its documentation, usually by people outside the original team. Double programming is usually planned inside a project, with both builds sharing one specification. Cross validity compares different models of the same problem, whose structures may differ, while double-programmed versions should differ only in their code. Cheaper checks, such as a hand calculation check or unit testing of single modules, do part of the same work.
The name has another meaning in clinical trial data management, where a second programmer independently writes code to produce the same trial datasets or outputs from the same specifications and the results are compared. Truong describes applying this duplicate programming to datasets that a risk assessment rates at high risk of error, with the second set of code sharing none of the production code logic.
Limitations and common misreadings
The main weakness is cost, which is why TECH-VER and the CDA-AMC tool keep replication for problems that cheaper tests cannot resolve. Four further problems recur in practice.
- Treating agreement as validation. Two versions of one specification can agree on a structurally wrong model.
- Losing independence. A second analyst who copies formulae reproduces the first analyst's slips, and one who has read the original code, as in the Wright case, is less independent.
- Comparing only the ICER. Cycle-level and arm-level comparison finds offsetting errors that totals hide.
- Skipping the record. An exercise with no log of what was compared and changed gives a reviewer nothing to assess under NICE PMG36 section 4.6.4.
Sources
- Büyükkaramikli NC, Rutten-van Mölken MPMH, Severens JL, Al M. TECH-VER: a verification checklist to reduce errors in models and improve their credibility. PharmacoEconomics. 2019;37(11):1391-1408. https://doi.org/10.1007/s40273-019-00844-y
- Corro Ramos I, Feenstra T, Ghabri S, Al M. Evaluating the validation process: embracing complexity and transparency in health economic modelling. PharmacoEconomics. 2024;42:715-719. https://doi.org/10.1007/s40273-024-01364-0
- Coyle D, Haines A, Lee K. The development of a model validation tool to assist in the conduct of economic evaluations. Canadian Journal of Health Technologies. 2024;4(3). https://doi.org/10.51731/cjht.2024.862
- Eddy DM, Hollingworth W, Caro JJ, Tsevat J, McDonald KM, Wong JB. Model transparency and validation: a report of the ISPOR-SMDM Modeling Good Research Practices Task Force-7. Value in Health. 2012;15(6):843-850. https://doi.org/10.1016/j.jval.2012.04.012
- Gupta S, Sabat Stofsel T. Does SDTM validation really require double programming? PharmaSUG 2025 Conference Proceedings, paper MM-227. 2025. https://pharmasug.org/proceedings/2025/MM/PharmaSUG-2025-MM-227.pdf
- National Institute for Health and Care Excellence. NICE technology appraisal and highly specialised technologies guidance: the manual (PMG36). Published 31 January 2022, last updated 13 October 2026. Section 4.6.4. https://www.nice.org.uk/process/pmg36
- Sargent RG. Verification and validation of simulation models. In: Proceedings of the 2011 Winter Simulation Conference. 2011:183-198. https://www.informs-sim.org/wsc11papers/016.pdf
- Truong S. Automate validation of CDISC SDTM with SAS. Proceedings of the SAS Global Forum 2017 Conference, paper 836-2017. 2017. https://support.sas.com/resources/papers/proceedings17/0836-2017.pdf
- Vemer P, Corro Ramos I, van Voorn GAK, Al MJ, Feenstra TL. AdViSHE: a validation-assessment tool of health-economic models for decision makers and model users. PharmacoEconomics. 2016;34(4):349-361. https://doi.org/10.1007/s40273-015-0327-2
- Wright SJ, Gray E, Rogers G, Donten A, Payne K. A structured process for the validation of a decision-analytic model: application to a cost-effectiveness model for risk-stratified national breast screening. Applied Health Economics and Health Policy. 2024;22:527-542. https://doi.org/10.1007/s40258-024-00887-z
Related Concepts (3)
Frequently Asked Questions (6)
What is double programming?
Double programming is a verification method in which two analysts independently code a health economic model, or parts of it, and compare the results.
Source: Eddy et al. 2012
What kind of error does double programming reveal?
Double programming reveals computational errors, the places where the code of a health economic model departs from its written specification. Eddy and colleagues write that verification helps rule out unintentional computational errors, and two independent builds of one specification show such an error as a difference in output. A forgotten condition is typical. In an illustrative model whose specification stops a drug after two cycles, a spreadsheet that charges it for as long as patients live matches the second build for two cycles and then diverges, pointing to the stopping rule. Errors in the specification itself, and slips both analysts make alike, stay hidden.
Source: Eddy et al. 2012
How does double programming work?
Both analysts work from one written description of the model structure, equations, inputs and decision rules, and the second analyst builds without copying the first analyst's formulae or code, sometimes in other software, such as R against a spreadsheet. The two versions then run on identical inputs, deterministically first, and are compared cycle by cycle and arm by arm as well as on total costs and QALYs. Each discrepancy is traced to its cause and fixed, and the log goes into the model documentation. In the TECH-VER checklist, Büyükkaramikli and colleagues report swapped utilities in student models that came to light when costs and utilities accrued per cycle were compared with parallel models.
Source: Büyükkaramikli et al. 2019
Why is double programming effective?
Two analysts working separately from one specification are less likely to make the same coding slip in the same place, so a difference between their outputs exposes errors that a modeller checking their own work can miss. In health technology assessment this matters because one wrong formula can move an ICER across a decision threshold with no change in the evidence. Wright and colleagues had a health economist who was not involved in an early breast screening model rebuild it in a new R script, and the rebuild found two significant errors, among them a missing cost of follow-up testing after false-positive screens. The gain shrinks when the second analyst copies formulae, because shared slips then pass unseen.
Source: Wright et al. 2024
What are the limitations of double programming?
The main limitation is the analyst time it takes, which is why review checklists keep double programming and other replication for problems that cheaper tests leave open. The CDA-AMC Model Validation Tool by Coyle and colleagues leaves replication out of its 53 items as unlikely to be possible in many cases, and notes that it may be more relevant when significant unexplained concerns remain after white-box testing. Agreement between two versions also says nothing about whether the model structure fits the disease, because both follow the same specification and share any wrong assumption in it. Totals can match while offsetting errors cancel, so comparison by cycle and by arm is safer.
Source: Coyle et al. 2024
How does double programming relate to model verification?
The ISPOR-SMDM task force report by Eddy and colleagues lists double programming, in which sections of a model are programmed independently by two programmers, among the techniques of verification. Verification checks that the mathematical calculations of a health economic model are performed correctly and are consistent with the model's specifications, which is the question of whether the model was built right. The report also states that verification does not evaluate the accuracy of the model's structure or predictions. Agreement between two versions therefore leaves validation still to do, including the comparison of model results with observed data that asks whether it is the right model for the decision.
Source: Eddy et al. 2012
Trust Record
Verified by Dr Darrin Baines
British health economist
Professional identity: darrinbaines.org
Verification date: 12 Nov 2026
Content version: 1.0.1
Canonical Identity
- Persistent URI
- https://healtheconomics.wiki/concept/double-programming
- Term code
- HE-EM-MV-020
Stable URI · Machine-readable · Resolvable · CC BY 4.0
