Package: medrobust 0.1.0.9000

medrobust: Robust Causal Mediation Analysis Under Differential Misclassification

Provides tools for conducting sensitivity analysis for causal mediation effects when the exposure or mediator is measured with differential misclassification (e.g., recall bias, outcome-dependent measurement error). Unlike existing measurement error correction methods that assume non-differential error or require validation data, 'medrobust' derives partial identification bounds that remain valid without gold-standard measurements. The package implements methods developed in Tofighi (2025) for partial identification bounds for Natural Direct Effects (NDE) and Natural Indirect Effects (NIE), data-driven falsification via testable implications, sensitivity analysis over user-specified ranges of misclassification parameters, diagnostic tools and publication-quality visualizations, bootstrap inference for confidence intervals (percentile and BCa methods), and synthetic data generation for power analysis and methods research. The package handles both mediator misclassification and exposure misclassification within a unified framework.

Authors:Davood Tofighi [aut, cre]

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

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

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

Datasets:
  • heals_data - Synthetic HEALS Data with Differential Measurement Error

On CRAN:

Conda:

quarto

4.64 score 21 scripts 23 exports 25 dependencies

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

TargetResultTimeFilesSyslog
linux-devel-x86_64OK221
source / vignettesOK381
linux-release-x86_64OK190
macos-release-arm64OK223
macos-oldrel-arm64OK208
windows-develOK193
windows-releaseOK231
windows-oldrelOK221
wasm-releaseOK115

Exports:as_sensitivity_regionbootstrap_resultsbootstrap_width_summarybound_cibound_necheck_compatibilitycompare_boundscompatibility_testcompute_bound_seextract_boundsextract_falsified_regionfalsification_summaryformat_effectmedrobust_boundsnew_falsification_summaryplot_bootstrap_distributionpower_analysispower_analysis_resultsensitivity_plotsensitivity_regionsimulate_dm_datasimulated_dm_datatest_multiple_hypotheses

Dependencies:clicpp11dplyrfarvergenericsggplot2gluegtableisobandlabelinglifecyclemagrittrpillarpkgconfigR6RColorBrewerrlangS7scalestibbletidyselectutf8vctrsviridisLitewithr

Advanced Grid Search Algorithms

Rendered fromgrid-search-algorithms.qmdusingquarto::htmlon Jun 12 2026.

Last update: 2025-11-15
Started: 2025-11-15

Getting Started with medrobust

Rendered fromintroduction.qmdusingquarto::htmlon Jun 12 2026.

Last update: 2025-11-16
Started: 2025-11-15

Identification Mathematics

Rendered fromidentification-math.qmdusingquarto::htmlon Jun 12 2026.

Last update: 2026-06-12
Started: 2026-06-12

Methodology

Rendered frommethodology.qmdusingquarto::htmlon Jun 12 2026.

Last update: 2025-11-16
Started: 2025-11-16

S7 Class Design and Usage in medrobust

Rendered froms7-documentation.qmdusingquarto::htmlon Jun 12 2026.

Last update: 2025-11-16
Started: 2025-11-16

Synthetic HEALS Data: Ground Truth with Differential Measurement Error

Rendered fromheals-synthetic-data.qmdusingquarto::htmlon Jun 12 2026.

Last update: 2025-11-17
Started: 2025-11-17

Readme and manuals

Help Manual

Help pageTopics
Create sensitivity_region object from listas_sensitivity_region
Coerce to data frame (S3 - Legacy)as.data.frame.medrobust_bounds
Convert sensitivity_region S7 object to listas.list.sensitivity_region
Bootstrap Results Classbootstrap_results
Compute Width of Bootstrap Distributionbootstrap_width_summary
Confidence intervals for partial-identification bounds (Imbens-Manski)bound_ci
Partial Identification Bounds for Natural Effects Under Differential Misclassificationbound_ne
Check Compatibility of Misclassification Parameterscheck_compatibility
Compare Bounds Across Multiple Analysescompare_bounds
Compatibility Test Classcompatibility_test
Compute Standard Errors for Boundscompute_bound_se
Extract Compatible Parameter Setsextract_bounds
Extract Falsified Regionextract_falsified_region
Summarize Falsification Resultsfalsification_summary
Format Effect Estimate for Reportingformat_effect
Synthetic HEALS Data with Differential Measurement Errorheals_data
Medrobust Bounds Classmedrobust_bounds
Create Falsification Summary Objectnew_falsification_summary
Plot Bootstrap Distributionplot_bootstrap_distribution
Power Analysis for Partial Identification Boundspower_analysis
Power Analysis Result Classpower_analysis_result
Print Method for compatibility_testprint.compatibility_test
Create Sensitivity Analysis Plotssensitivity_plot
Create Sensitivity Regionsensitivity_region
Simulate Data with Differential Misclassificationsimulate_dm_data
Simulated Data with Differential Misclassification Classsimulated_dm_data
Summary Method for compatibility_testsummary.compatibility_test
Test Multiple Hypothesestest_multiple_hypotheses