Author-reviewedEvidence: highv1.0.1

Regression Testing

Regression testing reruns a health economic model's earlier tests after each change and compares results with the previous version to catch new errors.

Status
Published, version 1.0.1
Last reviewed
12 Nov 2026, by Dr Darrin Baines
Report a problem
Tell us if something is wrong or out of date

Concept Architecture

Regression Testing of Health Economic Models

Regression testing means running a health economic model's existing checks again each time the model is edited, and comparing the new outputs with those recorded for the previous version, so that a fix in one place does not quietly break another. It is a technique of technical verification, which asks whether the model was built right, and it matters because decision models are revised many times. The US Food and Drug Administration, in its software validation guidance, defines regression testing as rerunning test cases that the software previously passed and comparing the current result with the previous one to detect unintended effects of a change. The name has nothing to do with regression analysis, the statistical method often used to estimate model inputs.

Verification that has to be repeated

Sargent defines verification as ensuring that the computerised model's code and its implementation are correct, and validation as showing that the model is accurate enough for its intended application. He describes model building as iterative and states that verification and validation must be performed again when any model change is made. Regression testing is the verification half of that rule, because it checks that the changed code still does what the previous, accepted code did. Whether the changed model is still the right model for the decision is a separate question for model validation.

Balci's taxonomy of more than 77 verification and validation techniques for simulation models, most of them taken from software engineering, lists regression testing among the dynamic techniques, which require the model to be run. Balci also treats verification and validation as a continuous activity throughout a model's life cycle, not a separate phase or step.

Why decision models need it

A cost-effectiveness model is a chain of linked calculations, and a change made for one purpose can reach outputs the modeller did not intend to touch. Alarid-Escudero and colleagues, in the DARTH coding framework, describe the complex interdependence between functions in a full decision model and say that testing allows the analyst to identify quickly whether modifications or additions to the code affect the behaviour of functions developed earlier. They recommend writing tests alongside any new function and whenever a bug is found.

Models are also reused. Kent and colleagues, writing about the Mount Hood Diabetes Challenge Network registry, observe that most diabetes models are designed for multiple applications, so that many undergo continual or periodic development. Eddy and colleagues, for the ISPOR-SMDM task force, call validation of a multiapplication model an ongoing process. The TECH-VER checklist reports a country adaptation of an oncology model in which a button labelled Back to the base-case assumptions set inputs that differed from the base case, a fault of the kind that comparing the button's results with the stored base case would expose.

What a regression suite contains

A regression suite is the set of tests rerun after each change, together with the results they gave on the last accepted version. The FDA guidance stresses that test documentation, test cases and the results of previous verification and validation testing must be archived if they are to be available for later regression testing. For a decision model the stored results would include the base-case costs and QALYs for each arm, the ICER and disaggregated outputs such as life years.

The tests themselves come from the other verification techniques. Black-box testing supplies checks that need no knowledge of the code, such as setting the effectiveness, utility and safety inputs of all options equal and expecting equal life years and QALYs. Unit tests check single functions or blocks of cells. The FDA guidance adds regression analysis in its software sense, a review of documentation, code and test plans to judge the impact of a change and identify which regression tests to run, and those tests are then run to show that unchanged but vulnerable parts have not been adversely affected. Before the run, the modeller writes down which outputs the change is meant to move and by roughly how much, so that every other difference can be treated as a possible fault.

Automated reruns in coded models

Models written in R can rerun a whole suite with one command. Alarid-Escudero and colleagues keep one test file per script in a separate tests folder, using the testthat package. Smith and colleagues describe the assertHE package, which helps modellers write unit tests designed to be repeatable, quick to execute and independent of each other. The package's own unit tests run automatically through GitHub Actions every time a change is made to its code. Hamilton and colleagues use continuous integration to trigger systematic retesting of their youth mental health model libraries with every edit, though they judged their own criterion of systematically retested releases only partly met, as they made limited use of unit testing.

In a spreadsheet, a results sheet can hold the previous version's outputs beside the current ones with a difference column. The AdViSHE item C4, on testing sub-modules, asks whether a protocol describing the tests, criteria and acceptance norms was defined beforehand and where the tests and their outcomes are reported. Kent and colleagues propose that all model versions in the registry be encouraged to run a set of pre-defined reference simulations, noting that the results would show changes to individual models over time.

Who runs it and what a reviewer looks for

The modeller reruns the suite after each change. NICE PMG36 (2022, updated 2026), section 4.6.4, asks companies to detail the quality assurance methods used in developing the model and to present the methods and results of model validation, and a record of regression testing belongs with the quality assurance methods. A reviewer such as an External Assessment Group, receiving a revised model during an appraisal, can apply the same logic, checking that results unrelated to the stated revisions match the earlier submission. An unexplained shift in an output the company did not say it changed is a signal for closer inspection of the code.

Worked example of a price update that breaks a utility lookup

All numbers are illustrative and undiscounted. A Markov cohort model compares drug A with standard care. Version 1.0 was verified and its outputs stored. Standard care costs GBP 20,000 and gives 5.00 QALYs, drug A costs GBP 50,000 and gives 6.00 QALYs, so

ICER=CA−CSEA−ES=50,000−20,0006.00−5.00=30,000\text{ICER} = \frac{C_A-C_S}{E_A-E_S} = \frac{50{,}000-20{,}000}{6.00-5.00} = 30{,}000

where CAC_A and CSC_S are total costs per person with drug A and standard care in GBP, and EAE_A and ESE_S are the corresponding QALYs per person, giving GBP 30,000 per QALY.

1. The change and its expected effect. Version 1.1 lowers the price of drug A from GBP 10,000 to GBP 8,000 per cycle. The drug is given for two cycles, and 1.000 and 0.900 of the cohort are alive at the start of those cycles. The expected change in drug A cost is (8,000 − 10,000) × (1.000 + 0.900) = −2,000 × 1.900 = −3,800, a fall of GBP 3,800, so drug A should cost 50,000 − 3,800 = GBP 46,200. Nothing else should move, and the expected ICER is (46,200 − 20,000) / 1.00 = GBP 26,200 per QALY.

2. The regression run. The stored outputs are compared with version 1.1.

OutputVersion 1.0Expected 1.1Version 1.1 as runResult
Standard care cost (GBP)20,00020,00020,000pass
Standard care QALYs5.005.004.90fail
Drug A cost (GBP)50,00046,20046,200pass
Drug A QALYs6.006.006.00pass
ICER (GBP per QALY)30,00026,20023,818fail

As run, the QALY gain is 6.00 − 4.90 = 1.10 and the ICER is 26,200 / 1.10 = 23,818.18, about GBP 23,818 per QALY. The black-box test with equal inputs for both options, which passed on version 1.0, now fails as well, since standard care gives 4.90 QALYs where drug A gives 5.00.

3. Finding the cause. The new price was entered by inserting a row in the input sheet. A lookup that returns the utility of the progressed state for standard care had its row position typed into the formula, so after the insertion it read the value that had sat one row above and returned 0.50 instead of 0.60. The standard care cohort spends 1.00 year in that state, so its QALYs fell by (0.60 − 0.50) × 1.00 = 0.10.

4. The effect on the decision. At an illustrative threshold of GBP 25,000 per QALY, incremental net monetary benefit with the correct model is 25,000 × 1.00 − 26,200 = −1,200, a loss of GBP 1,200, while the faulty model gives 25,000 × 1.10 − 26,200 = 1,300, a gain of GBP 1,300. The fault reverses the decision, yet a check of the price change alone would have passed, because drug A's cost was exactly as intended.

Neighbouring terms

Unit testing checks one part of the model, and a stored set of unit tests becomes part of a regression suite. Double programming rebuilds a calculation independently, one of the time-consuming tests that TECH-VER reserves for selected calculations or unexpected behaviour. Version control and a change log record what changed and when, and so identify the version that supplies the reference outputs. Revalidation after a change repeats comparisons with observed data and other models, and Sargent's rule covers it too.

Limits of a passed regression suite

A regression suite can only find faults in outputs it compares, so a change that affects an untested subgroup or scenario can pass unnoticed. A pass also shows only that the new version agrees with the old one, and any error already present in the reference version is carried forward. The FDA guidance treats regression testing as additional to testing that the change itself is correct, and the worked example needs both. When a change such as a new data cut is meant to move many outputs, the reference outputs are replaced, as a recorded decision once the new results have been checked. Eddy and colleagues note that verification does not evaluate the accuracy of a model's structure or predictions, so a clean regression run says nothing about whether the revised model is valid for the decision.

Sources

  • Alarid-Escudero F, Krijkamp EM, Pechlivanoglou P, et al. A need for change! A coding framework for improving transparency in decision modeling. PharmacoEconomics. 2019;37(11):1329-1339. https://doi.org/10.1007/s40273-019-00837-x
  • Balci O. Verification, validation and accreditation of simulation models. In: Proceedings of the 1997 Winter Simulation Conference. 1997:135-141. https://www.informs-sim.org/wsc97papers/0135.PDF
  • 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
  • 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
  • Hamilton MP, Gao C, Wiesner G, et al. A prototype software framework for transferable computational health economic models and its early application in youth mental health. PharmacoEconomics. 2024;42(8):833-842. https://doi.org/10.1007/s40273-024-01378-8
  • Kent S, Becker F, Feenstra T, et al. The challenge of transparency and validation in health economic decision modelling: a view from Mount Hood. PharmacoEconomics. 2019;37(11):1305-1312. https://doi.org/10.1007/s40273-019-00825-1
  • 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
  • Smith RA, Samyshkin Y, Mohammed W, et al. assertHE: an R package to improve quality assurance of HTA models. Wellcome Open Research. 2024;9:701. https://doi.org/10.12688/wellcomeopenres.23180.1
  • US Food and Drug Administration. General principles of software validation; final guidance for industry and FDA staff. Issued 11 January 2002. https://www.fda.gov/media/73141/download
  • 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

Library

Publications

1
  • Journal article

    Model Transparency and Validation: A Report of the ISPOR-SMDM Modeling Good Research Practices Task Force-7 — Eddy, Hollingworth, Caro, Tsevat, McDonald & Wong, Task Force Report 7 ed., 2012 (Value in Health / Medical Decision Making)

    Best-practice guidance on model transparency and validation, defining face, internal, external and predictive validation and setting out how models should be documented for scrutiny.

Frequently Asked Questions (6)

  • What is regression testing?

    Regression testing reruns a health economic model's earlier tests after each change and compares results with the previous version to catch new errors.

    Source: Alarid-Escudero et al. 2019

  • What does regression testing guard against?

    Regression testing guards against new faults that an edit to a health economic model introduces in parts the modeller did not mean to change. Adapting an existing model for a new setting carries the same risk as editing it. The TECH-VER checklist by Büyükkaramikli and colleagues reports, among model interface problems, a country adaptation of an oncology model in which a button labelled Back to the base-case assumptions set input parameters that differed from those used in the base case. A stored test that presses the button after each edit and checks the results against the accepted base case of the adapted model would expose such a fault.

    Source: Büyükkaramikli et al. 2019

  • How does regression testing work?

    The modeller keeps a suite of tests together with the results they gave on the last accepted version of the model, such as base-case costs and QALYs for each arm and the ICER. After each edit the suite is rerun and every output is compared with its stored value. Before the run the modeller records which outputs the change is meant to move and by roughly how much, so that any other difference can be investigated as a possible fault. Many of the tests are black-box checks of the kind listed in the TECH-VER checklist by Büyükkaramikli and colleagues, such as setting effectiveness, utility and safety inputs equal for all options and expecting equal life years and QALYs.

    Source: Büyükkaramikli et al. 2019

  • Why is regression testing important?

    A cost-effectiveness model is a chain of linked calculations, so an edit made for one purpose can change outputs the modeller never meant to touch. Alarid-Escudero and colleagues describe the complex interdependence between functions in a full decision model and note that testing lets the analyst see quickly whether modifications or additions to the code affect functions developed earlier. In health technology assessment a single faulty lookup introduced alongside a price update can move the ICER across a decision threshold while the intended price change itself looks correct. Rerunning the earlier tests catches that kind of side effect before revised results reach a decision maker.

    Source: Alarid-Escudero et al. 2019

  • When is regression testing used?

    Regression testing applies whenever a health economic model is changed, whether to correct an error or to update inputs such as a drug price or a new data cut. Eddy and colleagues, for the ISPOR-SMDM task force, describe validation of a multiapplication model as an ongoing process, and models that are reused and adapted over years need their checks repeated for each version. During a health technology appraisal the same logic holds when a company submits a revised model, since a reviewer such as an External Assessment Group can check that results unrelated to the stated revisions match the earlier submission.

    Source: Eddy et al. 2012

  • How does regression testing relate to model verification?

    Regression testing is a technique of technical verification, the work of checking that a health economic model was built right, and it is the part of verification that is repeated after each change to confirm the edited model still does what the accepted version did. A pass does not show that the model is valid for the decision, because it only means the new version agrees with the old one, and any error already in the reference version is carried forward. NICE PMG36 (2022, updated 2026), section 4.6.4, asks companies to detail the quality assurance methods used in developing the model, which is where a record of regression testing belongs for reviewers.

    Source: NICE PMG36 (2022, updated 2026)

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

Term code
HE-EM-MV-065

Stable URI · Machine-readable · Resolvable · CC BY 4.0

This article is licensed under Creative Commons Attribution 4.0 International (CC BY 4.0).

Author: Dr Darrin Baines · Publisher: Intelligent Parameters Ltd · Identifier: https://healtheconomics.wiki/concept/regression-testing