Package: medsim 0.2.1.9000

medsim: Simulation Infrastructure for Mediation Analysis

Provides standardized infrastructure for conducting Monte Carlo simulation studies in mediation analysis. Features include environment-aware execution (local vs HPC cluster), parallel processing with progress reporting, ground truth caching, automated result analysis, and publication-ready visualization. Designed to work seamlessly with the mediationverse ecosystem: 'medfit', 'probmed', 'RMediation', and 'medrobust'.

Authors:Davood Tofighi [aut, cre]

medsim_0.2.1.9000.tar.gz
medsim_0.2.1.9000.zip(r-4.7)medsim_0.2.1.9000.zip(r-4.6)medsim_0.2.1.9000.zip(r-4.5)
medsim_0.2.1.9000.tgz(r-4.6-any)medsim_0.2.1.9000.tgz(r-4.5-any)
medsim_0.2.1.9000.tar.gz(r-4.7-any)medsim_0.2.1.9000.tar.gz(r-4.6-any)
medsim_0.2.1.9000.tgz(r-4.6-emscripten)
manual.pdf |manual.html
card.svg |card.png
medsim/json (API)
NEWS

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

Bug tracker:https://github.com/data-wise/medsim/issues

On CRAN:

Conda:

quarto

3.91 score 1 packages 18 scripts 45 exports 26 dependencies

Last updated from:fe5e50ea79 (on dev). Checks:9 OK. Indexed: yes.

TargetResultTimeFilesSyslog
linux-devel-x86_64OK310
source / vignettesOK202
linux-release-x86_64OK162
macos-release-arm64OK168
macos-oldrel-arm64OK151
windows-develOK165
windows-releaseOK234
windows-oldrelOK147
wasm-releaseOK123

Exports:medsim_amputatemedsim_analyzemedsim_analyze_coveragemedsim_analyze_powermedsim_cache_clearmedsim_cache_existsmedsim_cache_infomedsim_cache_initmedsim_cache_listmedsim_cache_loadmedsim_cache_savemedsim_check_resultsmedsim_compare_configsmedsim_compare_methodsmedsim_configmedsim_detect_coresmedsim_detect_environmentmedsim_estimate_speedupmedsim_figuresmedsim_get_optimal_coresmedsim_method_ipwmedsim_method_mbco_mimedsim_method_mc_cimedsim_plot_combined_panelmedsim_plot_coveragemedsim_plot_error_boxplotmedsim_plot_timingmedsim_rnonnormalmedsim_runmedsim_run_parallelmedsim_scenariomedsim_scenario_missingmedsim_scenario_missing_gridmedsim_scenarios_mediationmedsim_summarize_branch_switchmedsim_table_accuracymedsim_table_comparisonmedsim_table_coveragemedsim_table_powermedsim_table_timingmedsim_tablesmedsim_tables_workflowmedsim_validate_scenariomedsim_workflowmedsim_write_table

Dependencies:clicpp11dplyrfarvergenericsggplot2gluegtableisobandlabelinglifecyclemagrittrpbapplypillarpkgconfigR6RColorBrewerrlangS7scalestibbletidyselectutf8vctrsviridisLitewithr

Getting Started with medsim

Rendered fromgetting-started.qmdusingquarto::htmlon Jun 12 2026.

Last update: 2026-06-11
Started: 2025-12-04

Readme and manuals

Help Manual

Help pageTopics
Insert missing values under MCAR / MAR / MNARmedsim_amputate
Analyze Simulation Resultsmedsim_analyze
Analyze Coverage Ratesmedsim_analyze_coverage
Analyze Statistical Powermedsim_analyze_power
Clear Cachemedsim_cache_clear
Check if Cache Existsmedsim_cache_exists
Get Cache Infomedsim_cache_info
Initialize Cache Directorymedsim_cache_init
List Cache Filesmedsim_cache_list
Load Object from Cachemedsim_cache_load
Save Object to Cachemedsim_cache_save
Check Results for Errorsmedsim_check_results
Compare Multiple Configurationsmedsim_compare_configs
Compare Multiple Methodsmedsim_compare_methods
Create Simulation Configurationmedsim_config
Detect Number of Available Coresmedsim_detect_cores
Detect Computing Environmentmedsim_detect_environment
Estimate Parallel Speedupmedsim_estimate_speedup
Generate all standard figures from simulation resultsmedsim_figures
Get Optimal Number of Coresmedsim_get_optimal_cores
Thin IPW estimator adapter (robustness appendix)medsim_method_ipw
MBCO-MI estimator adaptermedsim_method_mbco_mi
Monte-Carlo CI estimator adaptermedsim_method_mc_ci
Create Combined Multi-Panel Figuremedsim_plot_combined_panel
Plot Coverage Ratesmedsim_plot_coverage
Plot Error Distribution Boxplotsmedsim_plot_error_boxplot
Plot Timing Comparisonmedsim_plot_timing
Draw nonnormal values with a target marginal skew/kurtosismedsim_rnonnormal
Run Simulation Studymedsim_run
Run Tasks in Parallelmedsim_run_parallel
Create Custom Simulation Scenariomedsim_scenario
Construct a missing-data mediation scenariomedsim_scenario_missing
Build the full factorial of missing-data scenariosmedsim_scenario_missing_grid
Create Standard Mediation Scenariosmedsim_scenarios_mediation
Summarize the MBCO branch-switch rate per scenariomedsim_summarize_branch_switch
Generate Accuracy Tablemedsim_table_accuracy
Generate Method Comparison Tablemedsim_table_comparison
Generate Coverage Tablemedsim_table_coverage
Generate Power Tablemedsim_table_power
Generate Timing Comparison Tablemedsim_table_timing
Generate all standard LaTeX tables from simulation resultsmedsim_tables
Generate All Tablesmedsim_tables_workflow
Validate Scenariomedsim_validate_scenario
Generate analysis, figures, and tables from simulation resultsmedsim_workflow
Write Table to Filemedsim_write_table
Print Analysis Resultsprint.medsim_analysis
Print Method Comparisonprint.medsim_comparison
Print Configuration Summaryprint.medsim_config
Print Coverage Resultsprint.medsim_coverage
Print Power Resultsprint.medsim_power
Print Simulation Resultsprint.medsim_results
Print Scenario Summaryprint.medsim_scenario
Print medsim_tableprint.medsim_table
Summarize Simulation Resultssummary.medsim_results