COMPARATIVE COMPUTATION SPEED OF EXCEL, VISUAL BASIC FOR APPLICATIONS, R, AND JAVA IN EXECUTION OF A MICROSIMULATION MODEL WITH PROBABILISTIC SENSITIVITY ANALYSIS
Author(s)
Snedecor SJ1, Ji X1, Ektare V1, Treur M21Pharmerit International, Bethesda, MD, USA, 2Pharmerit International, Rotterdam, Netherlands
Presentation Documents
OBJECTIVES: To compare the computation speed when running a microsimulation model and probabilistic sensitivity analysis (PSA) on four widely-available programming platforms: Excel, Visual Basic for Applications (VBA), R, and Java. METHODS: A simple microsimulation model predicting the number of handouts collected by 2500 ISPOR attendees during a congress was created to test efficiency measured by model running speed. Speed was based on the system time and included only the portion of code used to run the model, excluding any code for parameter input or output. Calculations were performed on a computer running Windows 7, dual core 2.6 GHz processor, with 4 GB RAM. All platforms except Excel were cross-validated by using a list of pseudo-random numbers as model inputs to ensure consistency of model outputs. PSA was conducted by sampling random probabilities from beta distributions and replicating the model 1000 times. Ten simulations of each base-case and PSA model type were run to assess variability in platform efficiency. RESULTS: The speed of Excel could not be timed in the base-case microsimulation since results were calculated instantly. VBA was slower than R with means of 0.09 seconds and 0.02 seconds, respectively. Java generated a system time of zero, indicating the program required <0.001s. The Excel PSA simulations required the most time with 33.4s, followed by VBA (29.4s). R required 19.0s and Java required the least amount of time (4.0s). CPU usage for PSA simulations was highest with Excel (~80%) and similar for all other platforms (~25%). CONCLUSIONS: With the obvious caveats that program speed is a function of computing power and coding efficiency, the results of this analysis demonstrate Java was consistently faster than Excel, VBA and R, which are commonly used for pharmacoeconomic models. With increasing model complexity and running times, exploration of alternate implementations for their execution is recommended.
Conference/Value in Health Info
2012-11, ISPOR Europe 2012, Berlin, Germany
Value in Health, Vol. 15, No. 7 (November 2012)
Code
PRM68
Topic
Methodological & Statistical Research
Topic Subcategory
Modeling and simulation
Disease
Multiple Diseases