Abstract
Simulations play a crucial role in the modern scientific process. Yet despite (or due to) this ubiquity, the Data Science community shares neither a comprehensive definition for a "high-quality" study nor a consolidated guide to designing one. Inspired by the Predictability-Computability-Stability (PCS) framework for 'veridical' Data Science, we propose six MERITS that a simulation study should satisfy. (Modularity and Efficiency support the computability of a study, encouraging clean and flexible implementation. Realism and Stability address the conceptualization of the research problem: How well does a study predict reality, such that its conclusions generalize to new data/contexts? Finally, Intuitiveness and Transparency encourage good communication and trustworthiness of study design and results.) Drawing an analogy between simulation and cooking, we moreover offer (a) a conceptual framework for thinking about the anatomy of a simulation 'recipe'; (b) a baker's dozen in guidelines to aid the Data Science practitioner in designing one; and (c) a case study demonstrating the practical utility of our framework by using it to autopsy a preexisting simulation study. With this "PCS primer" for high-quality Data Science simulation, we seek to distill and enrich the best practices of simulation across disciplines into a cohesive recipe for trustworthy, veridical Data Science.
Introduction
Simulations serve as the essential "training grounds" of modern Data Science. They allow researchers to stress-test new algorithms, explore rare events like natural disasters, and compare methodologies within controlled environments. However, the field currently lacks a "gold standard" for simulation design. Many practitioners learn through ad hoc trial-and-error, leading to a "crisis of reproducibility" where code is often fragile, results are overly dependent on specific random seeds, and simulated data is frequently too simplified to generalize to real-world complexities. To address this, we propose moving simulation from a "black art" to a rigorous science through the MERITS framework.
The MERITS Framework
Building upon the Predictability-Computability-Stability (PCS) framework, we define six core virtues—MERITS—that characterize high-quality simulation studies. These criteria ensure that a study is not only computationally sound but also conceptually realistic and communicatively transparent.
As detailed in the table above, the MERITS include:
- Modularity: Partitioning code into self-contained segments to ease interpretation and adaptation.
- Efficiency: Ensuring computational scalability without sacrificing functionality.
- Realism: Maintaining faithfulness to physical reality and established theory.
- Intuitiveness: Designing logic that is sensible and accessible to a reasonably comprehensive readership.
- Transparency: Providing thorough documentation of all human judgment calls and study limitations.
- Stability: Producing results that remain consistent across different seeds, hardware, and minor pipeline perturbations.
The Anatomy of a Simulation Recipe
To make these abstract virtues actionable, we employ a culinary analogy. A simulation study can be viewed as a "recipe" consisting of four distinct components that guide the researcher from problem statement to final reporting.
- Recipe Header (Problem Statement): Clearly defining the research question and the intended output.
- List of Ingredients (Data): Selecting the Data-Generating Processes (DGPs). We advocate for "organic" ingredients—data inspired by real-world structures—over purely "canned" or toy datasets.
- Preparation Steps (Methods): Outlining the modeling procedures, including the specific steps required to process the data and the metrics used for evaluation.
- Staging (Reporting): Determining how the finished product will be presented to ensure the results are digestible and honest.
Practical Application and Case Studies
The utility of the MERITS framework is demonstrated through its application to diverse research areas:
- Genomics (iRF): In a study of Iterative Random Forests, modularity allowed for the recycling of code architecture across various biological settings.
- Theoretical Statistics (LSSFind): A study using Monte Carlo sampling to prove interaction recovery in "local spiky sparse" models.
- Social Science (Voting-Rights): A simulation using Census and precinct data to quantify the impact of polling station closures on voter turnout, providing concrete evidence for legal challenges.
To assist practitioners in implementing these standards, we have introduced simChef, an R package that automates the generation of R Markdown documentation, pairing results directly with the code and logic used to produce them.
Conclusion
While adopting the MERITS framework requires a significant upfront investment in planning and documentation, it is essential for creating "veridical" (truthful) Data Science. By treating simulation design with the same rigor as experimental design, researchers can ensure their findings are reproducible, realistic, and trustworthy. Future work will focus on refining these guidelines for high-stakes sub-fields, such as clinical AI, where the consequences of simulation failure are most acute.
Summary updated