Package: medrobust 0.4.4

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 via percentile and bias-corrected and accelerated (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. The partial identification approach builds on Manski (2003, ISBN:978-0387004549); confidence intervals for the partially identified bounds use the construction of Imbens and Manski (2004) <doi:10.1111/j.1468-0262.2004.00549.x>.

Authors:Davood Tofighi [aut, cre, cph]

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

# 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

Pkgdown/docs site:https://data-wise.github.io

Datasets:
  • gesthtn - Gestational Hypertension as a Differentially Misclassified Binary Mediator
  • heals_data - Synthetic HEALS Data with Differential Measurement Error
  • nhanes_pa - Physical Inactivity as a Differentially Misclassified Binary Exposure

On CRAN:

Conda:

causal-inferencecausal-mediationmeasurementmeasurement-errormediation-analysis

2.86 score 18 scripts 23 exports 25 dependencies

Last updated from:61d0afb9f1 (on main). Checks:9 OK. Indexed: yes.

TargetResultTimeFilesSyslog
linux-develOK512
source / vignettesOK406
linux-releaseOK508
macos-releaseOK484
macos-oldrelOK376
windows-develOK393
windows-releaseOK303
windows-oldrelOK490
wasm-releaseOK117

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

Readme and manuals

Help Manual

Help pageTopics
Create sensitivity_region object from listas_sensitivity_region
Convert partial identification bounds to a data frameas.data.frame.medrobust_bounds
Convert a sensitivity region to a 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
Gestational Hypertension as a Differentially Misclassified Binary Mediatorgesthtn
Synthetic HEALS Data with Differential Measurement Errorheals_data
Medrobust Bounds Classmedrobust_bounds
Create Falsification Summary Objectnew_falsification_summary
Physical Inactivity as a Differentially Misclassified Binary Exposurenhanes_pa
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