precmed
A doubly robust precision medicine approach to estimate and validate conditional average treatment effects
https://github.com/smartdata-analysis-and-statistics/precmed
Science Score: 26.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
○DOI references
-
○Academic publication links
-
○Academic email domains
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (14.7%) to scientific vocabulary
Keywords
cran
precision-medicine
r
r-package
Last synced: 10 months ago
·
JSON representation
Repository
A doubly robust precision medicine approach to estimate and validate conditional average treatment effects
Basic Info
- Host: GitHub
- Owner: smartdata-analysis-and-statistics
- License: apache-2.0
- Language: R
- Default Branch: main
- Homepage: https://smartdata-analysis-and-statistics.github.io/precmed/
- Size: 52.1 MB
Statistics
- Stars: 5
- Watchers: 3
- Forks: 1
- Open Issues: 10
- Releases: 3
Topics
cran
precision-medicine
r
r-package
Created almost 4 years ago
· Last pushed about 1 year ago
Metadata Files
Readme
Changelog
License
README.Rmd
---
output: github_document
bibliography: references.bib
---
```{r, echo = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "man/figures/"
)
options(width = 60, digits = 3)
```
# precmed
[](https://cran.r-project.org/package=precmed)
[](https://cran.r-project.org/package=precmed)
[](https://github.com/smartdata-analysis-and-statistics/precmed/actions/workflows/R-CMD-check.yaml)
## Overview
**precmed** was developed to help researchers with the implementation of precision medicine in R. A key objective of precision medicine is to determine the optimal treatment separately for each patient instead of applying a common treatment to all patients. Personalizing treatment decisions becomes particularly relevant when treatment response differs across patients, or when patients have different preferences about benefits and harms. This package offers statistical methods to develop and validate prediction models for estimating individualized treatment effects. These treatment effects are also known as the conditional average treatment effects (CATEs) and describe how different subgroups of patients respond to the same treatment. Presently, **precmed** focuses on the personalization of two competitive treatments using randomized data from a clinical trial [@zhao2013effectively] or using real-world data (RWD) from a non-randomized study [@yadlowsky2020estimation].
## Installation
The `precmed` package can be installed from CRAN as follows:
``` r
install.packages("precmed")
```
The latest version can be installed from GitHub as follows:
``` r
install.packages("devtools")
devtools::install_github(repo = "smartdata-analysis-and-statistics/precmed")
```
## Package capabilities
The main functions in the **precmed** package are:
Function | Description
-------------------|---------------------------------
[catefit](https://smartdata-analysis-and-statistics.github.io/precmed/reference/catefit.html)() | Estimation of the conditional average treatment effect (CATE)
[atefit](https://smartdata-analysis-and-statistics.github.io/precmed/reference/atefit.html)() | Doubly robust estimator for the average treatment effect (ATE)
[catecv](https://smartdata-analysis-and-statistics.github.io/precmed/reference/catecv.html)() | Development and cross-validation of the CATE
[abc](https://smartdata-analysis-and-statistics.github.io/precmed/reference/abc.html)() | Compute the area between the average treatment difference curve of competing models for the CATE [@zhao2013effectively]
[plot](https://smartdata-analysis-and-statistics.github.io/precmed/reference/plot.precmed.html)() | Two side-by-side line plots of validation curves from the `precmed` object
[boxplot](https://smartdata-analysis-and-statistics.github.io/precmed/reference/boxplot.precmed.html)() | Plot the proportion of subjects with an estimated treatment effect no less than $c$ over a range of values for $c$ [@zhao2013effectively].
For more info: https://smartdata-analysis-and-statistics.github.io/precmed/
## Recommended workflow
We recommend the following workflow to develop a model for estimating the CATE in order to identify treatment effect heterogeneity:
1. Compare up to five modelling approaches (e.g., Poisson regression, boosting) for estimating the CATE using cross-validation through [catecv](https://smartdata-analysis-and-statistics.github.io/precmed/reference/catecv.html).
2. Select the best modelling approach using 3 metrics:
* Compare the steepness of the validation curves in the validation samples across methods using `plot()`. Two side-by-side plots are generated, visualizing the estimated average treatment effects in a series of nested subgroups. On the left side the curve is shown for the training set, and on the right side the curve is shown for the validation set. Each line in the plots represents one scoring method (e.g., boosting, randomForest) specified under the argument `score.method`.
* The area between curves (ABC) using [abc](https://smartdata-analysis-and-statistics.github.io/precmed/reference/abc.html) quantifies a model’s ability to capture treatment effect heterogeneity. Higher ABC values are preferable as they indicate that more treatment effect heterogeneity is captured by the scoring method.
* Compare the distribution of the estimated ATE across different levels of the CATE score percentiles using `boxplot()`.
3. Apply the best modelling approach in the original data or in a new external dataset using `catefit()`.
4. Optional. Use `atefit()` to estimate ATE between 2 treatment groups with a doubly robust estimator and estimate the variability of the ATE with a bootstrap approach.
In the vignettes, we will adopt a different workflow to gradually expose the user from simple to more complex methods.
## User input
When applying `catefit()` or `catecv()`, the user has to (at least) input:
- `response`: type of outcome/response (either `count` or `survival`)
- `data`: a data frame with individual patient data
- `score.method`: methods to estimate the CATE (e.g., `boosting`, `poisson`, `twoReg`, `contrastReg`)
- `cate.model`: a formula describing the outcome model (e.g., outcome ~ age + gender + previous_treatment)
- `ps.model`: a formula describing the propensity score model to adjust for confounding (e.g., treatment ~ age + previous_treatment)
## Vignettes
1. [Examples with count outcome of the entire workflow](https://smartdata-analysis-and-statistics.github.io/precmed/articles/Count-examples.html)
2. [Examples with survival outcome of the entire workflow](https://smartdata-analysis-and-statistics.github.io/precmed/articles/Survival-examples.html)
3. [Additional examples for the `precmed` package](https://smartdata-analysis-and-statistics.github.io/precmed/articles/Additional-examples.html)
4. [Theoretical details](https://smartdata-analysis-and-statistics.github.io/precmed/articles/Theoretical-details.html)
# References
Owner
- Name: Smart Data Analysis and Statistics
- Login: smartdata-analysis-and-statistics
- Kind: organization
- Location: Netherlands
- Website: https://www.fromdatatowisdom.com
- Repositories: 3
- Profile: https://github.com/smartdata-analysis-and-statistics
GitHub Events
Total
- Issues event: 1
- Push event: 2
- Pull request event: 2
Last Year
- Issues event: 1
- Push event: 2
- Pull request event: 2
Issues and Pull Requests
Last synced: 10 months ago
All Time
- Total issues: 55
- Total pull requests: 3
- Average time to close issues: 13 days
- Average time to close pull requests: about 1 month
- Total issue authors: 4
- Total pull request authors: 2
- Average comments per issue: 1.24
- Average comments per pull request: 0.0
- Merged pull requests: 2
- Bot issues: 0
- Bot pull requests: 0
Past Year
- Issues: 2
- Pull requests: 2
- Average time to close issues: N/A
- Average time to close pull requests: 2 months
- Issue authors: 2
- Pull request authors: 1
- Average comments per issue: 0.0
- Average comments per pull request: 0.0
- Merged pull requests: 1
- Bot issues: 0
- Bot pull requests: 0
Top Authors
Issue Authors
- NightlordTW (35)
- StanWijn (10)
- jcaldasmagalhaes (9)
- zhangkaicr (1)
Pull Request Authors
- phoebejiang (2)
- NightlordTW (1)
Top Labels
Issue Labels
documentation (14)
vignette (9)
wontfix (4)
urgent (3)
help wanted (3)
invalid (2)
question (1)
Pull Request Labels
Packages
- Total packages: 1
-
Total downloads:
- cran 144 last-month
- Total dependent packages: 0
- Total dependent repositories: 0
- Total versions: 2
- Total maintainers: 1
cran.r-project.org: precmed
Precision Medicine
- Homepage: https://github.com/smartdata-analysis-and-statistics/precmed
- Documentation: http://cran.r-project.org/web/packages/precmed/precmed.pdf
- License: Apache License (== 2.0)
-
Latest release: 1.1.0
published over 1 year ago
Rankings
Dependent packages count: 29.8%
Dependent repos count: 35.5%
Average: 48.9%
Downloads: 81.5%
Maintainers (1)
Last synced:
10 months ago
Dependencies
.github/workflows/pkgdown.yaml
actions
- JamesIves/github-pages-deploy-action 4.1.4 composite
- actions/checkout v2 composite
- r-lib/actions/setup-pandoc v2 composite
- r-lib/actions/setup-r v2 composite
- r-lib/actions/setup-r-dependencies v2 composite
DESCRIPTION
cran
- R >= 3.5.0 depends
- MASS * imports
- MESS * imports
- dplyr * imports
- gam * imports
- gbm * imports
- ggplot2 * imports
- glmnet * imports
- graphics * imports
- mgcv * imports
- randomForestSRC * imports
- rlang * imports
- stringr * imports
- survival * imports
- tidyr * imports
.github/workflows/R-CMD-check.yaml
actions
- actions/checkout v3 composite
- r-lib/actions/check-r-package v2 composite
- r-lib/actions/setup-pandoc v2 composite
- r-lib/actions/setup-r v2 composite
- r-lib/actions/setup-r-dependencies v2 composite