EconPapers    
Economics at your fingertips  
 

A regression-with-residuals method for analyzing causal mediation: The rwrmed package

Ariel Linden, Chuck Huber () and Geoffrey T. Wodtke ()
Additional contact information
Chuck Huber: StataCorp
Geoffrey T. Wodtke: University of Chicago

Stata Journal, 2021, vol. 21, issue 3, 559-574

Abstract: In this article, we introduce the rwrmed package, which performs mediation analysis using the methods proposed by Wodtke and Zhou (2020, Epi- demiology 31: 369–375). Specifically, rwrmed estimates interventional direct and indirect effects in the presence of treatment-induced confounding by fitting models for 1) the conditional mean of the mediator given the treatment and a set of base- line confounders and 2) the conditional mean of the outcome given the treatment, mediator, baseline confounders, and a set of treatment-induced confounders that have been residualized with respect to the observed past. Interventional direct and indirect effects are simple functions of the parameters in these models when they are correctly specified and when there are no unobserved variables that confound the treatment-outcome, treatment-mediator, or mediator-outcome relationships. When no treatment-induced confounders are specified, rwrmed produces natural direct and indirect effect estimates.

Keywords: rwrmed; mediation; effect decomposition; causal inference; confounding (search for similar items in EconPapers)
Date: 2021
Note: to access software from within Stata, net describe http://www.stata-journal.com/software/sj21-3/st0646/
References: Add references at CitEc
Citations:

Downloads: (external link)
http://www.stata-journal.com/article.html?article=st0646 link to article purchase

Related works:
This item may be available elsewhere in EconPapers: Search for items with the same title.

Export reference: BibTeX RIS (EndNote, ProCite, RefMan) HTML/Text

Persistent link: https://EconPapers.repec.org/RePEc:tsj:stataj:v:21:y:2021:i:3:p:559-574

Ordering information: This journal article can be ordered from
http://www.stata-journal.com/subscription.html

DOI: 10.1177/1536867X211045511

Access Statistics for this article

Stata Journal is currently edited by Nicholas J. Cox and Stephen P. Jenkins

More articles in Stata Journal from StataCorp LLC
Bibliographic data for series maintained by Christopher F. Baum () and Lisa Gilmore ().

 
Page updated 2025-03-20
Handle: RePEc:tsj:stataj:v:21:y:2021:i:3:p:559-574