Assessing the relationship between computational speed and precision: a case study comparing an interpreted versus compiled programming language using a stochastic simulation model in diabetes care
- PMID: 20524723
- DOI: 10.2165/11535350-000000000-00000
Assessing the relationship between computational speed and precision: a case study comparing an interpreted versus compiled programming language using a stochastic simulation model in diabetes care
Abstract
Background: Simulation techniques are well suited to modelling diseases yet can be computationally intensive. This study explores the relationship between modelled effect size, statistical precision, and efficiency gains achieved using variance reduction and an executable programming language.
Methods: A published simulation model designed to model a population with type 2 diabetes mellitus based on the UKPDS 68 outcomes equations was coded in both Visual Basic for Applications (VBA) and C++. Efficiency gains due to the programming language were evaluated, as was the impact of antithetic variates to reduce variance, using predicted QALYs over a 40-year time horizon.
Results: The use of C++ provided a 75- and 90-fold reduction in simulation run time when using mean and sampled input values, respectively. For a series of 50 one-way sensitivity analyses, this would yield a total run time of 2 minutes when using C++, compared with 155 minutes for VBA when using mean input values. The use of antithetic variates typically resulted in a 53% reduction in the number of simulation replications and run time required. When drawing all input values to the model from distributions, the use of C++ and variance reduction resulted in a 246-fold improvement in computation time compared with VBA - for which the evaluation of 50 scenarios would correspondingly require 3.8 hours (C++) and approximately 14.5 days (VBA).
Conclusions: The choice of programming language used in an economic model, as well as the methods for improving precision of model output can have profound effects on computation time. When constructing complex models, more computationally efficient approaches such as C++ and variance reduction should be considered; concerns regarding model transparency using compiled languages are best addressed via thorough documentation and model validation.
Similar articles
-
Computationally intensive econometrics using a distributed matrix-programming language.Philos Trans A Math Phys Eng Sci. 2002 Jun 15;360(1795):1245-66. doi: 10.1098/rsta.2002.0994. Philos Trans A Math Phys Eng Sci. 2002. PMID: 12804277
-
FERN - a Java framework for stochastic simulation and evaluation of reaction networks.BMC Bioinformatics. 2008 Aug 29;9:356. doi: 10.1186/1471-2105-9-356. BMC Bioinformatics. 2008. PMID: 18755046 Free PMC article.
-
Repaglinide : a pharmacoeconomic review of its use in type 2 diabetes mellitus.Pharmacoeconomics. 2004;22(6):389-411. doi: 10.2165/00019053-200422060-00005. Pharmacoeconomics. 2004. PMID: 15099124 Review.
-
Evaluation of the costs and outcomes from changes in risk factors in type 2 diabetes using the Cardiff stochastic simulation cost-utility model (DiabForecaster).Curr Med Res Opin. 2006 Jan;22(1):121-9. doi: 10.1185/030079906X80350. Curr Med Res Opin. 2006. PMID: 16393438
-
Educational Robotics and Tangible Devices for Promoting Computational Thinking.Front Robot AI. 2021 Nov 15;8:713416. doi: 10.3389/frobt.2021.713416. eCollection 2021. Front Robot AI. 2021. PMID: 34869610 Free PMC article. Review.
Cited by
-
Cost-Effectiveness of Dapagliflozin versus Acarbose as a Monotherapy in Type 2 Diabetes in China.PLoS One. 2016 Nov 2;11(11):e0165629. doi: 10.1371/journal.pone.0165629. eCollection 2016. PLoS One. 2016. PMID: 27806087 Free PMC article.
-
Treatment of type 2 diabetes with saxagliptin: a pharmacoeconomic evaluation in Argentina.Health Econ Rev. 2013 Apr 27;3(1):11. doi: 10.1186/2191-1991-3-11. Health Econ Rev. 2013. PMID: 23621944 Free PMC article.
-
Choice across 10 pharmacologic combination strategies for type 2 diabetes: a cost-effectiveness analysis.BMC Med. 2020 Dec 3;18(1):378. doi: 10.1186/s12916-020-01837-x. BMC Med. 2020. PMID: 33267884 Free PMC article.
-
Cost-Effectiveness of Saxagliptin versus Acarbose as Second-Line Therapy in Type 2 Diabetes in China.PLoS One. 2016 Nov 22;11(11):e0167190. doi: 10.1371/journal.pone.0167190. eCollection 2016. PLoS One. 2016. PMID: 27875596 Free PMC article. Review.
-
Cost effectiveness of saxagliptin and metformin versus sulfonylurea and metformin in the treatment of type 2 diabetes mellitus in Germany: a Cardiff diabetes model analysis.Clin Drug Investig. 2012 Mar 1;32(3):189-202. doi: 10.2165/11597060-000000000-00000. Clin Drug Investig. 2012. PMID: 22292415
References
Publication types
MeSH terms
LinkOut - more resources
Full Text Sources
Medical