Estimating Controlled Direct Effects for Explaining Causal Findings

A set of functions to estimate the controlled direct effect of treatment fixing a potential mediator to a specific value. Implements the sequential g-estimation estimator described in Vansteelandt (2009) and Acharya, Blackwell, and Sen (2016) .

DirectEffects is an R package to estimate controlled direct effects (CDEs). As of now, the only model supported is sequential g-estimation, but we plan to expand to other models, including doubly robust estimators, in the future. For more information on how CDEs can be useful for applied research and a brief introduction to sequential g-estimation, see our 2016 APSR. To install the development version of DirectEffects, run the following code in R:

install_github("mattblackwell/DirectEffects", ref = "master")


Reference manual

It appears you don't have a PDF plugin for this browser. You can click here to download the reference manual.


0.2.1 by Matthew Blackwell, 6 months ago

Report a bug at

Browse source code at

Authors: Matthew Blackwell [aut, cre] , Avidit Acharya [aut] , Maya Sen [aut] , Shiro Kuriwaki [aut] , Jacob Brown [aut]

Documentation:   PDF Manual  

GPL (>= 2) license

Imports stats, sandwich, Formula, glue

Suggests knitr, dplyr, ggplot2, reshape2, scales, testthat, rmarkdown

See at CRAN