Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mattblackwell/DirectEffects
An R package for estimating controlled direct effects.
https://github.com/mattblackwell/DirectEffects
Last synced: 1 day ago
JSON representation
An R package for estimating controlled direct effects.
- Host: GitHub
- URL: https://github.com/mattblackwell/DirectEffects
- Owner: mattblackwell
- Created: 2016-09-23T14:01:43.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2024-10-01T18:32:05.000Z (about 1 month ago)
- Last Synced: 2024-10-07T16:37:12.732Z (about 1 month ago)
- Language: HTML
- Homepage: https://mattblackwell.github.io/DirectEffects/
- Size: 10.7 MB
- Stars: 18
- Watchers: 7
- Forks: 5
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
[![R-CMD-check](https://github.com/mattblackwell/DirectEffects/workflows/R-CMD-check/badge.svg)](https://github.com/mattblackwell/DirectEffects/actions)
## Overview
DirectEffects is an R package to estimate controlled direct effects (CDEs), which are the effect of a treatment fixing a set of downstream mediators to particular values. As of now, the package supports sequential g-estimation and a two-stage matching approach called telescope matching. For more information on how CDEs can be useful for applied research and a brief introduction to sequential g-estimation, see [Acharya, Blackwell, and Sen (2016)][de-paper]. For more on the telescope matching procedure, see [Blackwell and Strezhnev (2022)][tm-paper].
## Installation
You can install DirectEffects via CRAN for the current stable version or via GitHub for the development version.
```{r}
# Installing from CRAN
install.packages("DirectEffects")# Installing development version from Github:
# install.packages("devtools")
devtools::install_github("mattblackwell/DirectEffects", build_vignettes = TRUE)
```## Usage
The main functions for estimating CDEs in DirectEffects are:
- [`sequential_g()`](https://mattblackwell.github.io/DirectEffects/articles/DirectEffects.html): estimate controlled direct effects using two-stage linear models.
- [`telescope_match()`](https://mattblackwell.github.io/DirectEffects/articles/telescope_matching.html): estimated controlled direct effects using a two-stage matching procedure with bias correction.DirectEffects also provides diagnostics for these two approaches, including sensitivity analyses and balance checks.
[de-paper]: http://www.mattblackwell.org/files/papers/direct-effects.pdf
[tm-paper]: https://www.mattblackwell.org/files/papers/telescope_matching.pdf