Learn R Programming

SimDesign

Structure for Organizing Monte Carlo Simulation Designs

Installation

To install the latest stable version of the package from CRAN, please use the following in your R console:

install.packages('SimDesign')

To install the Github version of the package with devtools, type the following (assuming you have already installed the devtools package from CRAN).

library('devtools')
install_github('philchalmers/SimDesign')

Getting started

For a description pertaining to the philosophy and general workflow of the package it is helpful to first read through the following: Chalmers, R. Philip, Adkins, Mark C. (2020) Writing Effective and Reliable Monte Carlo Simulations with the SimDesign Package, The Quantitative Methods for Psychology, 16(4), 248-280. doi: 10.20982/tqmp.16.4.p248

Coding examples found within this article range from relatively simple (e.g., a re-implementation of one of Hallgren's (2013) simulation study examples, as well as possible extensions to the simulation design) to more advanced real-world simulation experiments (e.g., Flora and Curran's (2004) simulation study). For additional information and instructions about how to use the package please refer to the examples in the associated Github wiki.

Copy Link

Version

Install

install.packages('SimDesign')

Monthly Downloads

5,518

Version

2.21

License

GPL (>= 2)

Issues

Pull Requests

Stars

Forks

Maintainer

Phil Chalmers

Last Published

September 18th, 2025

Functions in SimDesign (2.21)

MSRSE

Compute the relative performance behavior of collections of standard errors
IRMSE

Compute the integrated root mean-square error
RobbinsMonro

Robbins-Monro (1951) stochastic root-finding algorithm
SFA

Surrogate Function Approximation via the Generalized Linear Model
SimCollect

Collapse separate simulation files into a single result
SimDesign

Structure for Organizing Monte Carlo Simulation Designs
SimFunctions

Template-based generation of the Generate-Analyse-Summarise functions
SimExtract

Function to extract extra information from SimDesign objects
SimClean

Removes/cleans files and folders that have been saved
SimCheck

Check for missing files in array simulations
SimAnova

Function for decomposing the simulation into ANOVA-based effect sizes
Serlin2000

Empirical detection robustness method suggested by Serlin (2000)
colVars

Form Column Standard Deviation and Variances
createDesign

Create the simulation design object
SimSolve

One Dimensional Root (Zero) Finding in Simulation Experiments
Summarise

Summarise simulated data using various population comparison statistics
addMissing

Add missing values to a vector given a MCAR, MAR, or MNAR scheme
new_TelegramNotifier

Create a Telegram Notifier
bias

Compute (relative/standardized) bias summary statistic
new_PushbulletNotifier

Create a Pushbullet Notifier
manageMessages

Increase the intensity or suppress the output of an observed message
SimResults

Function to read in saved simulation results
listAvailableNotifiers

List All Available Notifiers
expandDesign

Expand the simulation design object for array computing
SimShiny

Generate a basic Monte Carlo simulation GUI template
expandReplications

Expand the replications to match expandDesign
rHeadrick

Generate non-normal data with Headrick's (2002) method
manageWarnings

Manage specific warning messages
getArrayID

Get job array ID (e.g., from SLURM or other HPC array distributions)
rValeMaurelli

Generate non-normal data with Vale & Maurelli's (1983) method
nc

Auto-named Concatenation of Vector or List
genSeeds

Generate random seeds
reSummarise

Run a summarise step for results that have been saved to the hard drive
rbind.SimDesign

Combine two separate SimDesign objects by row
quiet

Suppress verbose function messages
notify.TelegramNotifier

S3 method to send notifications through the Telegram API.
notify

Send a simulation notification
rinvWishart

Generate data with the inverse Wishart distribution
clusterSetRNGSubStream

Set RNG sub-stream for Pierre L'Ecuyer's RngStreams
bootPredict

Compute prediction estimates for the replication size using bootstrap MSE estimates
runSimulation

Run a Monte Carlo simulation given conditions and simulation functions
rmvnorm

Generate data with the multivariate normal (i.e., Gaussian) distribution
timeFormater

Format time string to suitable numeric output
notify.PushbulletNotifier

S3 method to send notifications via Pushbullet
rmvt

Generate data with the multivariate t distribution
rmgh

Generate data with the multivariate g-and-h distribution
rtruncate

Generate a random set of values within a truncated range
runArraySimulation

Run a Monte Carlo simulation using array job submissions per condition
rint

Generate integer values within specified range
rejectionSampling

Rejection sampling (i.e., accept-reject method)
Analyse

Compute estimates and statistics
Attach

Attach objects for easier reference
BF_sim

Example simulation from Brown and Forsythe (1974)
CC

Compute congruence coefficient
AnalyseIf

Perform a test that indicates whether a given Analyse() function should be executed
ECR

Compute empirical coverage rates
RD

Compute the relative difference
GenerateIf

Perform a test that indicates whether a given Generate() function should be executed
RE

Compute the relative efficiency of multiple estimators
RAB

Compute the relative absolute bias of multiple estimators
EDR

Compute the empirical detection/rejection rate for Type I errors and Power
PBA

Probabilistic Bisection Algorithm
Generate

Generate data
RMSE

Compute the (normalized) root mean square error
RSE

Compute the relative standard error ratio
BF_sim_alternative

(Alternative) Example simulation from Brown and Forsythe (1974)
Bradley1978

Bradley's (1978) empirical robustness interval
MAE

Compute the mean absolute error