[Paper Review] SimEngine: A Modular Framework for Statistical Simulations in R
SimEngine is an R framework that streamlines statistical simulations through modular design, enabling users to define simulation levels, configurations, and estimators with ease. It supports dynamic updates to simulations via the update_sim() function, allowing incremental expansion of replicates and levels without restarting, significantly improving workflow efficiency and reproducibility in simulation studies.
This article describes SimEngine, an open-source R package for structuring, maintaining, running, and debugging statistical simulations on both local and cluster-based computing environments. Several R packages exist for structuring simulations, but SimEngine is the only package specifically designed for running simulations in parallel via job schedulers on high-performance cluster computing systems. The package provides structure and functionality for common simulation tasks, such as setting simulation levels, managing seeds for random number generation, and calculating summary metrics (such as bias and confidence interval coverage). SimEngine also brings several unique features, such as automatic calculation of Monte Carlo error and information-sharing across simulation replicates. We provide an overview of the package and demonstrate some of its advanced functionality.
Motivation & Objective
- To address the lack of modular, extensible, and maintainable frameworks for statistical simulations in R.
- To enable users to define simulation parameters, estimators, and configurations in a structured, composable way.
- To support incremental updates to simulations—adding new levels or replicates—without re-running from scratch.
- To improve reproducibility and scalability in simulation-based statistical research.
Proposed method
- The framework uses a simulation object that encapsulates levels, configurations, and results in a structured data frame.
- Users define simulation levels using set_levels() and configurations using set_config(), enabling modular specification of experimental designs.
- The update_sim() function allows dynamic expansion of simulations by adding new replicates or level combinations after initial execution.
- Each simulation replicate is uniquely identified by a combination of sim_id, level_id, and rep_id, ensuring traceability and consistency.
- The framework integrates seamlessly with R’s existing ecosystem, supporting standard data manipulation and reporting workflows.
- Results are stored in a structured dataframe format, facilitating downstream analysis and visualization.
Experimental results
Research questions
- RQ1How can statistical simulations in R be made more modular and maintainable for complex experimental designs?
- RQ2What mechanisms enable efficient incremental updates to simulations without re-running from the beginning?
- RQ3How does the framework support reproducibility and traceability of simulation results across multiple levels and replicates?
- RQ4To what extent does the modular design improve scalability and usability in simulation studies?
Key findings
- SimEngine enables dynamic updates to simulations through the update_sim() function, allowing users to add new replicates or levels after initial execution.
- The framework uniquely identifies each simulation replicate using a combination of sim_id, level_id, and rep_id, ensuring traceability and consistency.
- Adding 100 new replicates to existing level combinations is supported via set_config() and update_sim(), with no need to restart the simulation.
- The simulation results are stored in a structured dataframe, facilitating easy access and analysis using standard R tools.
- The framework supports multiple estimators (e.g., M, V) and parameter combinations (e.g., n = 10, 100, 1000, 10000), enabling flexible experimental designs.
- The system handles conversion and rendering robustly, though a fatal error in HTML conversion was observed during document processing.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.