Science Score: 13.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
-
○DOI references
-
○Academic publication links
-
○Academic email domains
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (15.6%) to scientific vocabulary
Last synced: 10 months ago
·
JSON representation
Repository
Regression Standardization for Causal Inference
Basic Info
- Host: GitHub
- Owner: sachsmc
- License: agpl-3.0
- Language: R
- Default Branch: main
- Homepage: https://sachsmc.github.io/stdReg2/
- Size: 9.56 MB
Statistics
- Stars: 4
- Watchers: 2
- Forks: 0
- Open Issues: 0
- Releases: 0
Created almost 3 years ago
· Last pushed over 1 year ago
Metadata Files
Readme
Changelog
License
README.Rmd
---
output: github_document
editor_options:
chunk_output_type: console
---
```{r, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "man/figures/README-",
out.width = "100%"
)
```
# stdReg2: Regression Standardization for Causal Inference
Goals: create a unified interface for regression standardization to obtain estimates of causal effects such as the average treatment effect, or relative treatment effect.
1. Should be easy to use for applied practitioners, i.e., as easy as running glm or coxph.
2. We want to implement modern, theoretically grounded, doubly-robust estimators, and their associated variance estimators.
3. We want it to be extensible for statistical researchers, i.e., possible to implement new estimators and get other models used within the interface.
4. Robust and clear documentation with lots of examples and explanation of the necessary assumptions.
## Difference between `stdReg2` and `stdReg`
`stdReg2` is the next generation of `stdReg`. If you are happy using `stdReg`, you can continue using it and nothing will change in the near future. With `stdReg2` we aim to solve similar problems but with nicer output, more available methods, the possibility to include new methods, and mainly to make maintenance and updating easier.
## Installation
`stdReg2` is available on CRAN and can be installed with:
```r
install.packages("stdReg2")
```
You can install the development version of `stdReg2` from [GitHub](https://github.com/) with:
``` r
# install.packages("remotes")
remotes::install_github("sachsmc/stdReg2")
```
## Example
This is a basic example which shows you how to use regression standardization in a logistic regression model to obtain estimates of the causal risk difference and causal risk ratio:
```{r example}
library(stdReg2)
# basic example
# need to correctly specify the outcome model and no unmeasured confounders
# (+ standard causal assumptions)
set.seed(6)
n <- 100
Z <- rnorm(n)
X <- rnorm(n, mean = Z)
Y <- rbinom(n, 1, prob = (1 + exp(X + Z))^(-1))
dd <- data.frame(Z, X, Y)
x <- standardize_glm(
formula = Y ~ X * Z,
family = "binomial",
data = dd,
values = list(X = 0:1),
contrasts = c("difference", "ratio"),
reference = 0
)
x
plot(x)
tidy(x)
```
For more detailed examples, see the vignette "Estimation of causal effects using stdReg2".
## Citation
```{r}
citation("stdReg2")
```
Owner
- Name: Michael Sachs
- Login: sachsmc
- Kind: user
- Location: Copenhagen, Denmark
- Company: University of Copenhagen
- Website: sachsmc.github.io
- Repositories: 91
- Profile: https://github.com/sachsmc
GitHub Events
Total
- Issues event: 1
- Watch event: 3
- Issue comment event: 3
- Push event: 5
Last Year
- Issues event: 1
- Watch event: 3
- Issue comment event: 3
- Push event: 5
Issues and Pull Requests
Last synced: 10 months ago
All Time
- Total issues: 1
- Total pull requests: 0
- Average time to close issues: 9 days
- Average time to close pull requests: N/A
- Total issue authors: 1
- Total pull request authors: 0
- Average comments per issue: 2.0
- Average comments per pull request: 0
- Merged pull requests: 0
- Bot issues: 0
- Bot pull requests: 0
Past Year
- Issues: 1
- Pull requests: 0
- Average time to close issues: 9 days
- Average time to close pull requests: N/A
- Issue authors: 1
- Pull request authors: 0
- Average comments per issue: 2.0
- Average comments per pull request: 0
- Merged pull requests: 0
- Bot issues: 0
- Bot pull requests: 0
Top Authors
Issue Authors
- sachsmc (1)
- dominicmagirr (1)
Pull Request Authors
Top Labels
Issue Labels
Pull Request Labels
Packages
- Total packages: 1
-
Total downloads:
- cran 224 last-month
- Total dependent packages: 0
- Total dependent repositories: 0
- Total versions: 2
- Total maintainers: 1
cran.r-project.org: stdReg2
Regression Standardization for Causal Inference
- Homepage: https://sachsmc.github.io/stdReg2/
- Documentation: http://cran.r-project.org/web/packages/stdReg2/stdReg2.pdf
- License: AGPL (≥ 3)
-
Latest release: 1.0.3
published over 1 year ago
Rankings
Dependent packages count: 28.2%
Dependent repos count: 34.8%
Average: 49.9%
Downloads: 86.7%
Maintainers (1)
Last synced:
11 months ago
Dependencies
DESCRIPTION
cran
- knitr * suggests
- rmarkdown * suggests
- testthat >= 3.0.0 suggests
.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
.github/workflows/rhub.yaml
actions
- r-hub/actions/checkout v1 composite
- r-hub/actions/platform-info v1 composite
- r-hub/actions/run-check v1 composite
- r-hub/actions/setup v1 composite
- r-hub/actions/setup-deps v1 composite
- r-hub/actions/setup-r v1 composite