cdgd

Causal Decomposition of Group Disparities

https://github.com/ang-yu/cdgd

Science Score: 39.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
    Found 1 DOI reference(s) in README
  • Academic publication links
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (10.7%) to scientific vocabulary
Last synced: 9 months ago · JSON representation

Repository

Causal Decomposition of Group Disparities

Basic Info
  • Host: GitHub
  • Owner: ang-yu
  • License: other
  • Language: R
  • Default Branch: master
  • Homepage:
  • Size: 934 KB
Statistics
  • Stars: 1
  • Watchers: 2
  • Forks: 0
  • Open Issues: 0
  • Releases: 9
Created about 4 years ago · Last pushed 10 months ago
Metadata Files
Readme Changelog License

README.Rmd

---
output: github_document
---

```{r, include = FALSE}
knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>",
  fig.path = "man/figures/README-",
  out.width = "100%"
)
```

# cdgd

[![R-CMD-check](https://github.com/ang-yu/cdgd/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/ang-yu/cdgd/actions/workflows/R-CMD-check.yaml)
![CRAN Downloads overall](https://cranlogs.r-pkg.org/badges/grand-total/cdgd)


The package cdgd implements the causal decompositions of group disparities in [Yu and Elwert (2025)](https://projecteuclid.org/journals/annals-of-applied-statistics/volume-19/issue-1/Nonparametric-causal-decomposition-of-group-disparities/10.1214/24-AOAS1990.full).

## Installation

The latest release of the package can be installed through CRAN.

```R
install.packages("cdgd")
```

The current development version can be installed from source using devtools.

```R
devtools::install_github("ang-yu/cdgd")
```

## Examples 
  
```{r example}
library(cdgd)  

# load the simulated example data
data(exp_data)
head(exp_data)
```

### Use cdgd0_ml, cdgd0_pa, or cdgd0_manual for unconditional decomposition

```{r unconditional}
results0 <- cdgd0_pa(Y="outcome",D="treatment",G="group_a",X=c("confounder","Q"),data=exp_data,alpha=0.05)

round(results0$results, 4)
```

### Use cdgd1_ml, cdgd1_pa, or cdgd1_manual for conditional decomposition 

```{r conditional}
results1 <- cdgd1_pa(Y="outcome",D="treatment",G="group_a",X="confounder",Q="Q",data=exp_data,alpha=0.05)

round(results1, 4)
```

Owner

  • Name: angyu
  • Login: ang-yu
  • Kind: user
  • Location: Madison, WI

PhD Candidate in Sociology at the University of Wisconsin-Madison

GitHub Events

Total
  • Create event: 1
  • Release event: 1
  • Issues event: 2
  • Watch event: 1
  • Issue comment event: 2
  • Push event: 3
Last Year
  • Create event: 1
  • Release event: 1
  • Issues event: 2
  • Watch event: 1
  • Issue comment event: 2
  • Push event: 3

Issues and Pull Requests

Last synced: over 2 years ago

All Time
  • Total issues: 2
  • Total pull requests: 0
  • Average time to close issues: 19 days
  • Average time to close pull requests: N/A
  • Total issue authors: 1
  • Total pull request authors: 0
  • Average comments per issue: 0.0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 2
  • Pull requests: 0
  • Average time to close issues: 19 days
  • Average time to close pull requests: N/A
  • Issue authors: 1
  • Pull request authors: 0
  • Average comments per issue: 0.0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • ang-yu (3)
  • ejwatson (1)
Pull Request Authors
Top Labels
Issue Labels
Pull Request Labels

Packages

  • Total packages: 1
  • Total downloads:
    • cran 333 last-month
  • Total dependent packages: 0
  • Total dependent repositories: 0
  • Total versions: 7
  • Total maintainers: 1
cran.r-project.org: cdgd

Causal Decomposition of Group Disparities

  • Versions: 7
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Downloads: 333 Last month
Rankings
Forks count: 28.8%
Dependent packages count: 29.6%
Stargazers count: 35.2%
Dependent repos count: 35.3%
Average: 43.7%
Downloads: 89.7%
Maintainers (1)
Last synced: 10 months ago

Dependencies

DESCRIPTION cran
  • R >= 4.0.0 depends
  • caret >= 6.0.0 imports
  • gbm >= 2.1.8 suggests
  • nnet >= 7.3.0 suggests
  • ranger >= 0.14.1 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