Learn R Programming

⚠️There's a newer version (2.19.2) of this package.Take me there.

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 discription 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

6,019

Version

2.14

License

GPL (>= 2)

Issues

Pull Requests

Stars

Forks

Maintainer

Phil Chalmers

Last Published

January 9th, 2024

Functions in SimDesign (2.14)

AnalyseIf

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

Bradley's (1978) empirical robustness interval
IRMSE

Compute the integrated root mean-square error
GenerateIf

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

Probabilistic Bisection Algorithm
RE

Compute the relative efficiency of multiple estimators
MSRSE

Compute the relative performance behavior of collections of standard errors
MAE

Compute the mean absolute error
RMSE

Compute the (normalized) root mean square error
RSE

Compute the relative standard error ratio
RD

Compute the relative difference
RAB

Compute the relative absolute bias of multiple estimators
RobbinsMonro

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

Structure for Organizing Monte Carlo Simulation Designs
Serlin2000

Empirical detection robustness method suggested by Serlin (2000)
SimExtract

Function to extract extra information from SimDesign objects
SimFunctions

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

Function to read in saved simulation results
SimAnova

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

Surrogate Function Approximation via the Generalized Linear Model
SimClean

Removes/cleans files and folders that have been saved
SimCheck

Check the status of the simulation's temporary results
convertWarnings

Wrapper to convert all/specific warning messages to errors
SimShiny

Generate a basic Monte Carlo simulation GUI template
aggregate_simulations

Collapse separate simulation files into a single result
Summarise

Summarise simulated data using various population comparison statistics
add_missing

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

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

Form Column Standard Deviation and Variances
createDesign

Create the simulation Design object
rejectionSampling

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

Generate integer values within specified range
rValeMaurelli

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

Suppress function messages and Concatenate and Print (cat)
nc

Auto-named Concatenation of Vector or List
reSummarise

Run a summarise step for results that have been saved to the hard drive
bias

Compute (relative/standardized) bias summary statistic
rmgh

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

Generate non-normal data with Headrick's (2002) method
rbind.SimDesign

Combine two separate SimDesign objects by row
SimSolve

One Dimensional Root (Zero) Finding in Simulation Experiments
rinvWishart

Generate data with the inverse Wishart distribution
rmvt

Generate data with the multivariate t distribution
rtruncate

Generate a random set of values within a truncated range
rmvnorm

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

Run a Monte Carlo simulation given a data.frame of conditions and simulation functions
Generate

Generate data
EDR

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

Example simulation from Brown and Forsythe (1974)
ECR

Compute empirical coverage rates
Analyse

Compute estimates and statistics
Attach

Attach objects for easier reference
CC

Compute congruence coefficient
BF_sim_alternative

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