Skip to content

Causal Mediation Analysis Using Weighting Approach

0packages depend
3Kdownloads / year
–test coverage
13/13flavors OK

Overview

About
Maintained by Xu QinCRAN page ↗

We implement causal mediation analysis using the methods proposed by Hong (2010) and Hong, Deutsch & Hill (2015) doi:10.3102/1076998615583902. It allows the estimation and hypothesis testing of causal mediation effects through ratio of mediator probability weights (RMPW). This strategy conveniently relaxes the assumption of no treatment-by-mediator interaction while greatly simplifying the outcome model specification without invoking strong distributional assumptions. We also implement a sensitivity analysis by extending the RMPW method to assess potential bias in the presence of omitted pretreatment or posttreatment covariates. The sensitivity analysis strategy was proposed by Hong, Qin, and Yang (2018) doi:10.3102/1076998617749561.

Install

Health

CRAN checks
13OK
Slowest check: 57 s · r-devel-windows-x86_64
Status changes
  • OK13 OK2026-08-05
  • NOTE12 OK, 1 NOTE2026-08-01
  • OK14 OK2026-03-10
Advisories

none known

Documentation

In release 0.0.7
READMENoVignettesNoNEWSNoCitation fileNoWebsitenot declared in DESCRIPTION
Help pages
4
Examples that run
0%3 only when donttest examples are enabled (R CMD check --as-cran)
Exported functions with examples
100%
Documented parameters
100%
Return-value docs
100%
Help pages citing references
75%

Downloads

3K
CRAN downloads in the past year
Rank #12,562 · ~8/day · ~247/mo
Daily download trend is not available in this view yet.
42830 days
89790 days
3K1 year
Compare downloads with other packages →
Also on101 r2u3 autocran

Dependencies

Declared dependencies
1 external dependency (excludes base and recommended)

Installing rmpw adds 1 package (1 with compiled code, 236 KB of source tarballs). Heaviest: gtools 236 KB.

Depends (4)
R >= 3.5.0gtoolsMASSboot
Imports (0)
none
LinkingTo (0)
none
Suggests (0)
none
Enhances (0)
none
Reverse dependencies
0direct
0indirect

Nothing depends on this yet.

Datasets

People & History

People (3)
Author, Maintainer since 0.0.1 (2017)
Author · added in 0.0.2
Releases (7)

Pick two releases to compare their code metrics.

  • 0.0.7Latest
    record
    2026-10-01 · current release · diff ↗
  • R
    R 4.6.0 released · 2026-04-24
  • 0.0.6
    record
    2025-11-17 · diff ↗
  • R
    R 4.5.0 released · 2025-04-11
  • R
    R 4.4.0 released · 2024-04-24
  • 0.0.5
    record
    2024-03-06 · diff ↗
  • R
    R 4.3.0 released · 2023-04-21
  • R
    R 4.2.0 released · 2022-04-22
  • R
    R 4.1.0 released · 2021-05-18
  • R
    R 4.0.0 released · 2020-04-24
  • R
    R 3.6.0 released · 2019-04-26
  • 0.0.4
    record
    2018-07-18 · diff ↗
  • R
    R 3.5.0 released · 2018-04-23
  • 0.0.3
    record
    2018-01-04 · diff ↗
  • 0.0.2
    record
    2017-12-21 · diff ↗ ·
    added 2 exports
    sensitivity, sensitivity.plot
  • R
    R 3.4.0 released · 2017-04-21
Show 2 earlier eventsHide 2 earlier events
  • 0.0.1
    record
    2017-02-27
  • R
    R 3.3.0 released · 2016-05-03

Package metadata

First published
2017-02-27
Total releases
7 / 9 yrs
License
GPL-2 OSI
Minimum R
≥ 3.5.0
Bundled data
17 KB / 1 file
Download size
33 KB
Appears in task views

Cite

Cite this package

Run in R for the authors' preferred citation:

citation("rmpw")
Qin, X., Hong, G., & Yang, F. (2026). rmpw: Causal Mediation Analysis Using Weighting Approach (Version 0.0.7) [Computer software]. https://doi.org/10.32614/CRAN.package.rmpw

This package has no citation file, so citation() returns this entry built from DESCRIPTION.

Cite the R Observatory

For a number measured here: a download total, a coverage figure, an archival date.

APA

Balamuta, J. J. (2026). R Observatory: Metrics for rmpw version 0.0.7 [Data set]. HJJB, LLC. Data release v2026-10-24. https://doi.org/10.5281/zenodo.21843040

From data release v2026-10-24, which the citation names so these numbers can be found later. More on citing and the projects behind them.

Report a problem with this page →

Privacy choices

These apply to this browser and are stored on this device only. Nothing about your choice is sent to us.

Read the privacy policy