← Back to all sparks
M

medsim

ANALYTICS
Velocity6.3

R package medsim by Data-Wise — release notes from GitHub.

medsim is turning simulation runs into auditable artifacts, not just fast ones.

mediation analysismonte carloreproducibilityhpcmissing datar package
Current state
medsim is a young Monte Carlo harness for mediation-analysis simulation studies, first tagged in May 2026 and already at 0.5.1. The last two releases moved the package's center of gravity from running simulations to proving a run is trustworthy: chunk provenance headers, a single-SHA assertion across chunks, and a pilot-subset positive control. The statistical work sits in the missing-data line added in 0.2.0 — Fleishman non-normal generators, rate-calibrated MCAR/MAR/MNAR amputation, and a validated D4-stacked MBCO estimator.
Where it's heading
The arc is toward defensible HPC runs: each 0.5.x gate closes a way a cluster job could silently produce wrong output, and 0.5.1 extends the same suspicion to the estimator itself by exposing the branch disagreement the standard ARIV averages away. Releases are cadenced against discovered defects rather than a roadmap — 0.5.0 cites seven findings from a pre-integration review, and 0.5.1 cites an adversarial review of 0.5.0. The audit surface is widening faster than the method surface.
Prediction
The collapse-audit exclusion list has now been patched twice for method-specific diagnostic columns, so the next likely move is a contract letting methods declare their own discrete fields instead of medsim naming them centrally.

Recent moves

  1. 6h ago

    medsim 0.5.1 — fixed-branch ARIV

    Adds an opt-in fixed-branch ARIV to the MBCO-MI estimator plus branch diagnostics, after a comparator pilot found that averaging per-imputation statistics each computed on its own winning branch under-estimates the ARIV when imputations disagree. The default stays on legacy behavior, so this reads as instrumentation first and a method change second. The accompanying fix stops the new diagnostic columns from tripping the collapse audit 0.5.0 introduced.

    View source ↗
  2. 16d ago

    medsim 0.5.0 — chunked-run integrity

    ⚡ SPARK

    The release where medsim stops being only a runner and starts being a chain of custody: provenance headers on every chunk, one asserted code SHA across a run, and a pilot-subset positive control that re-checks seeding and environment. It also repairs the collapse audit, which previously could not see a fully collapsed estimate column.

    View source ↗
  3. 1mo ago

    seed= now honored in sequential fallback paths

    Fixes a reproducibility bug where the seed= argument was ignored in the sequential fallback paths of medsim_run_parallel — exactly the path R CMD check and single-core machines take. Test coverage rose from 93.2% to 95.1%, concentrated on progress, plotting and workflow error branches.

    View source ↗
  4. 2mo ago

    Docs and dependency metadata synced to the 0.2.0 state

    Documentation and metadata only — the notes state the installed package is identical to 0.2.0. Remotes: is trimmed to medfit alone, continuing the dependency pruning that started in 0.1.1.

    View source ↗
  5. 2mo ago

    Missing-data mediation: amputation, non-normal DGMs, D4-MBCO

    ⚡ SPARK

    The release that gave medsim its missing-data line: rate-calibrated MCAR/MAR/MNAR amputation, Fleishman non-normal generators, and a D4-stacked MBCO estimator validated to reproduce mitml::testModels(method='D4') exactly. Everything the 0.5.x integrity work protects was defined here.

    View source ↗
  6. 3mo ago

    v0.1.1 — cleanup release

    Pure hygiene ahead of CRAN: probmed and medrobust dropped from Suggests and Remotes because no medsim code referenced them, cache examples moved to tempdir(), and three broken README URLs fixed. No API changes.

    View source ↗