Writing effective and reliable Monte Carlo simulations with the SimDesign package

Abstract

The purpose of this tutorial is to discuss and demonstrate how to write safe, effective, and intuitive computer code for Monte Carlo simulation experiments containing one or more simulation factors. Throughout this tutorial the SimDesign package (Chalmers, 2020), available within the R programming environment, will be adopted due to its ability to accommodate a number of desirable execution features. The article begins by discussing a selection of attractive coding strategies that should be present in Monte Carlo simulation experiments, showcases how the SimDesign package can satisfy many of these desirable strategies, and provides a worked mediation analysis simulation example to demonstrate the implementation of these features. To demonstrate how the package can be used for real-world experiments, the simulation explored by Flora and Curran (2004) pertaining to a confirmatory factor analysis robustness study with ordinal response data is also presented and discussed.

Publication
Submitted to The Quantitative Methods for Psychology