Package: SimDesign 2.25.4

SimDesign: Structure for Organizing Monte Carlo Simulation Designs

Provides tools to safely and efficiently organize and execute Monte Carlo simulation experiments in R. The package controls the structure and back-end of Monte Carlo simulation experiments by utilizing a generate-analyse-summarise workflow. The workflow safeguards against common simulation coding issues, such as automatically re-simulating non-convergent results, prevents inadvertently overwriting simulation files, catches error and warning messages during execution, implicitly supports parallel processing with high-quality random number generation, and provides tools for managing high-performance computing (HPC) array jobs submitted to schedulers such as SLURM. For a pedagogical introduction to the package see Sigal and Chalmers (2016) <doi:10.1080/10691898.2016.1246953>. For a more in-depth overview of the package and its design philosophy see Chalmers and Adkins (2020) <doi:10.20982/tqmp.16.4.p248>.

Authors:Phil Chalmers [aut, cre], Matthew Sigal [ctb], Ogreden Oguzhan [ctb], Mikko Rönkkö [aut], Moritz Ketzer [ctb]

SimDesign_2.25.4.tar.gz
SimDesign_2.25.4.zip(r-4.7)SimDesign_2.25.4.zip(r-4.6)SimDesign_2.25.4.zip(r-4.5)
SimDesign_2.25.4.tgz(r-4.6-any)SimDesign_2.25.4.tgz(r-4.5-any)
SimDesign_2.25.4.tar.gz(r-4.7-any)SimDesign_2.25.4.tar.gz(r-4.6-any)
SimDesign_2.25.4.tgz(r-4.6-emscripten)
manual.pdf |manual.html
DESCRIPTION |NEWS
card.svg |card.png
SimDesign/json (API)

# Install 'SimDesign' in R:
install.packages('SimDesign', repos = c('https://philchalmers.r-universe.dev', 'https://cloud.r-project.org'))

Bug tracker:https://github.com/philchalmers/simdesign/issues

Pkgdown/docs site:https://philchalmers.github.io

Datasets:

On CRAN:

Conda:

monte-carlo-simulationsimulationsimulation-framework

14.12 score 64 stars 54 packages 529 scripts 11k downloads 4 mentions 74 exports 56 dependencies

Last updated from:db2cc2b8e7. Checks:9 OK. Indexed: yes.

TargetResultTimeFilesSyslog
linux-devel-x86_64OK185
source / vignettesOK244
linux-release-x86_64OK192
macos-release-arm64OK128
macos-oldrel-arm64OK114
windows-develOK139
windows-releaseOK119
windows-oldrelOK130
wasm-releaseOK166

Exports:add_missingaddMissingaggregate_simulationsAnalyseIfarrangeAttachbiasboot_predictbootPredictBradley1978CCCheckPackagesclusterSetRNGSubStreamcolSDscolVarscreateDesigndescriptECREDRERRexpandDesignexpandReplicationsGenerateIfgenSeedsget_descriptFunsgetArrayIDgroup_byIRMSElistAvailableNotifiersMAEmanageMessagesmanageWarningsMSRSEncnew_PushbulletNotifiernew_TelegramNotifierPBAquietRABrbindDesignRDRErejectionSamplingreSummariserHeadrickrintrinvWishartrmghRMSDRMSErmvnormrmvtRobbinsMonroRSErtruncaterunArraySimulationrunSimulationrValeMaurelliselectSerlin2000SFASimAnovaSimCheckSimCleanSimCollectSimErrorsSimExtractSimFunctionsSimReadSimResultsSimShinySimSolveSimWarningstimeFormater

Dependencies:audiobeeprbriocallrclassclicliprcodetoolscrayondescdiffobjdigestdplyre1071evaluatefsfuturefuture.applygenericsglobalsgluejsonlitelifecyclelistenvmagrittrMASSotelparallellypbapplypillarpkgbuildpkgconfigpkgloadpraiseprocessxprogressrproxypsqs2R.methodsS3R.ooR.utilsR6RcppRcppParallelrlangrprojrootsessioninfostringfishtestthattibbletidyselectutf8vctrswaldowithr

Managing warning and error messages
(Potential Prerequisite) Converting warnings to errors explicitly via manageWarnings() | Error Managing Workflow | Define the functions | Run the simulation | What to do? | Explicit debugging | Manual debugging via try() | Extracting error seeds for hard-to-find bugs

Last update: 2026-03-30
Started: 2017-10-25

Parallel computing information
Introduction | Local parallel computing | Network computing | Using the future framework

Last update: 2026-03-27
Started: 2018-05-15

Introduction to the SimDesign package
A general overview | Simulation: Determine estimator efficiency | Define the conditions | Define the functions | Putting it all together | Interpreting the results | Conceptual walk-through of what runSimulation() is doing

Last update: 2026-03-27
Started: 2017-10-25

Exporting objects and functions from the workspace
Including fixed objects | Scoping | Exporting functions for parallel computing | Exporting third-party libraries | Exporting user-defined functions | Exporting objects in SimDesign

Last update: 2026-03-02
Started: 2017-10-25

Distributing jobs for high-performance computing (HPC) clusters (e.g., via Slurm)
Introduction | Standard setup on HPC cluster | Example | Limitations | Array jobs | Converting runSimulation() workflow to one for runArraySimulation() | Expand the standard simulation design object for each array ID | Construct and record proper random seeds | Extract array ID information from the .slurm script | Organize information for runArraySimulation() | Putting it all together | Post-evaluation: Combine the files | Array jobs and multicore computing simultaneously | Extra information (FAQs) | Helpful Slurm commands | My HPC cluster excution time is limited and terminates before the simulation is complete | Uploading array jobs related to previous array submissions | Create new conditions for missing replications, and use rbindDesign() | Submit the new job, evaluating only the new conditions

Last update: 2026-03-02
Started: 2024-04-04

Saving simulation results and state
Option: save = TRUE (Default is TRUE) | store_results (TRUE by default) | Option: save_results = TRUE (FALSE by default; set to TRUE if RAM is an issue) | Recommendations

Last update: 2026-03-01
Started: 2017-10-25

Multiple analysis functions
Description of structure | An example | AnalyseIf() | Applying one analyse function per-condition

Last update: 2025-07-09
Started: 2021-07-29

Readme and manuals

Help Manual

Help pageTopics
Add missing values to a vector given a MCAR, MAR, or MNAR schemeaddMissing add_missing
Compute estimates and statisticsAnalyse
Perform a test that indicates whether a given 'Analyse()' function should be executedAnalyseIf
Attach objects for easier referenceAttach
Example simulation from Brown and Forsythe (1974)BF_sim
(Alternative) Example simulation from Brown and Forsythe (1974)BF_sim_alternative
Compute (relative/standardized) bias summary statisticbias
Compute prediction estimates for the replication size using bootstrap MSE estimatesbootPredict boot_predict
Bradley's (1978) empirical robustness intervalBradley1978
Compute congruence coefficientCC
Check whether package versions are as expectedCheckPackages
Set RNG sub-stream for Pierre L'Ecuyer's RngStreamsclusterSetRNGSubStream
Form Column Standard Deviation and VariancescolSDs colVars
Create the simulation design objectcreateDesign print.Design rbindDesign [.Design
Compute univariate descriptive statisticsdescript get_descriptFuns
Compute empirical coverage ratesECR
Compute the empirical detection/rejection rate for Type I errors and PowerEDR ERR
Expand the simulation design object for array computingexpandDesign
Expand the replications to match 'expandDesign'expandReplications
Generate dataGenerate
Perform a test that indicates whether a given 'Generate()' function should be executedGenerateIf
Generate random seedsgenSeeds gen_seeds
Get job array ID (e.g., from SLURM or other HPC array distributions)getArrayID
Compute the integrated root mean-square errorIRMSE
List All Available NotifierslistAvailableNotifiers
Compute the mean absolute errorMAE
Increase the intensity or suppress the output of an observed messagemanageMessages
Manage specific warning messagesmanageWarnings
Compute the relative performance behavior of collections of standard errorsMSRSE
Auto-named Concatenation of Vector or Listnc
Create a Pushbullet Notifiernew_PushbulletNotifier
Create a Telegram Notifiernew_TelegramNotifier
Probabilistic Bisection AlgorithmPBA plot.PBA print.PBA
Suppress verbose function messagesquiet
Compute the relative absolute bias of multiple estimatorsRAB
Combine two separate SimDesign objects by rowrbind.SimDesign
Compute the relative differenceRD
Compute the relative efficiency of multiple estimatorsRE
Rejection sampling (i.e., accept-reject method)rejectionSampling
Run a summarise step for results that have been saved to the hard drivereSummarise
Generate non-normal data with Headrick's (2002) methodrHeadrick
Generate integer values within specified rangerint
Generate data with the inverse Wishart distributionrinvWishart
Generate data with the multivariate g-and-h distributionrmgh
Compute the (normalized) root mean square errorRMSD RMSE
Generate data with the multivariate normal (i.e., Gaussian) distributionrmvnorm
Generate data with the multivariate t distributionrmvt
Robbins-Monro (1951) stochastic root-finding algorithmplot.RM print.RM RobbinsMonro
Compute the relative standard error ratioRSE
Generate a random set of values within a truncated rangertruncate
Run a Monte Carlo simulation using array job submissions per conditionrunArraySimulation
Run a Monte Carlo simulation given conditions and simulation functionsprint.SimDesign runSimulation summary.SimDesign
Generate non-normal data with Vale & Maurelli's (1983) methodrValeMaurelli
Empirical detection robustness method suggested by Serlin (2000)Serlin2000
Surrogate Function Approximation via the Generalized Linear Modelprint.SFA SFA
Decompose the simulation into ANOVA-based effectsSimAnova
Check for missing files in array simulationsSimCheck
Removes/cleans files and folders that have been savedSimClean
Collapse separate simulation files into a single resultaggregate_simulations SimCollect
Structure for Organizing Monte Carlo Simulation DesignsSimDesign-package SimDesign
Extract Simulation ErrorsSimErrors
Extract extra information from SimDesign objectsSimExtract
Template-based generation of the Generate-Analyse-Summarise functionsSimFunctions
Read simulation filesSimRead
Read in saved simulation resultsSimResults
Generate a basic Monte Carlo simulation GUI templateSimShiny
One Dimensional Root (Zero) Finding in Simulation Experimentsplot.SimSolve SimSolve summary.SimSolve
Extract Simulation WarningsSimWarnings
Summarise simulated data using various population comparison statisticsSummarise
Format time string to suitable numeric outputtimeFormater