Tutorials in Quantitative Methods for Psychology (Sep 2020)

Writing Effective and Reliable Monte Carlo Simulations with the SimDesign Package

  • Chalmers, R. Philip,
  • Adkins, Mark C.

DOI
https://doi.org/10.20982/tqmp.16.4.p248
Journal volume & issue
Vol. 16, no. 4
pp. 248 – 280

Abstract

Read online

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.

Keywords