Skip to content

Commit

Permalink
revised description and help files
Browse files Browse the repository at this point in the history
  • Loading branch information
ang-yu committed Jun 30, 2023
1 parent b4aa08c commit 4c173d3
Show file tree
Hide file tree
Showing 11 changed files with 24 additions and 21 deletions.
8 changes: 4 additions & 4 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ Version: 0.3.1.9000
Authors@R:
person("Ang", "Yu", , "ang_yu@outlook.com", role = c("aut", "cre", "cph"),
comment = c(website = "<https://ang-yu.github.io/>", ORCID = "0000-0002-1828-0165"))
Description: The causal decompositions of group disparities developed by
Description: The framework of causal decomposition of group disparities developed by
Yu and Elwert (2023)
<https://ang-yu.github.io/files/Causal_Decomposition_of_Group_Disparities_2023.pdf>.
This package implements the estimators for the decomposition
components that are based on efficient influence functions. For the
<https://arxiv.org/abs/2306.16591>.
This package implements the decomposition estimators
that are based on efficient influence functions. For the
nuisance functions of the estimators, both parametric and
nonparametric options are provided, as well as manual options in case
the default models are not satisfying.
Expand Down
4 changes: 4 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# cdgd (development version)

# cdgd 0.3.2

* Revised package description and help files. No change in the actual code.

# cdgd 0.3.1

* Fixed an issue that prevents the ranger option from working when there is only one Q variable.
Expand Down
2 changes: 1 addition & 1 deletion R/cdgd0_manual.R
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#' For the unconditional decomposition, three nuisance functions (YgivenGX.Pred_D0, YgivenGX.Pred_D1, and DgivenGX.Pred) need to be estimated.
#' The nuisance functions should be estimated using cross-fitting if Donsker class is not assumed.
#'
#' @param Y Outcome. The name of a continuous variable.
#' @param Y Outcome. The name of a numeric variable.
#' @param D Treatment status. The name of a binary numeric variable taking values of 0 and 1.
#' @param G Advantaged group membership. The name of a binary numeric variable taking values of 0 and 1.
#' @param YgivenGX.Pred_D0 A numeric vector of predicted Y values given X, G, and D=0. Vector length=nrow(data).
Expand Down
4 changes: 2 additions & 2 deletions R/cdgd0_ml.R
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@

#' Perform unconditional decomposition via machine learning
#'
#' @param Y Outcome. The name of a continuous variable.
#' @param Y Outcome. The name of a numeric variable.
#' @param D Treatment status. The name of a binary numeric variable taking values of 0 and 1.
#' @param G Advantaged group membership. The name of a binary numeric variable taking values of 0 and 1.
#' @param X Confounders. The vector of the names of numeric variables.
#' @param X Confounders. A vector of names of numeric variables.
#' @param data A data frame.
#' @param algorithm The ML algorithm for modelling. "nnet" for neural network, "ranger" for random forests, "gbm" for generalized boosted models.
#' @param alpha 1-alpha confidence interval.
Expand Down
4 changes: 2 additions & 2 deletions R/cdgd0_pa.R
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@

#' Perform unconditional decomposition via parametric models
#'
#' @param Y Outcome. The name of a continuous variable.
#' @param Y Outcome. The name of a numeric variable.
#' @param D Treatment status. The name of a binary numeric variable taking values of 0 and 1.
#' @param G Advantaged group membership. The name of a binary numeric variable taking values of 0 and 1.
#' @param X Confounders. The vector of the names of numeric variables.
#' @param X Confounders. A vector of names of numeric variables.
#' @param data A data frame.
#' @param alpha 1-alpha confidence interval.
#' @param trim Threshold for trimming the propensity score. When trim=a, individuals with propensity scores lower than a or higher than 1-a will be dropped.
Expand Down
2 changes: 1 addition & 1 deletion R/cdgd1_manual.R
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#' For the unconditional decomposition, ten nuisance functions need to be estimated.
#' The nuisance functions should be estimated using cross-fitting if Donsker class is not assumed.
#'
#' @param Y Outcome. The name of a continuous variable.
#' @param Y Outcome. The name of a numeric variable.
#' @param D Treatment status. The name of a binary numeric variable taking values of 0 and 1.
#' @param G Advantaged group membership. The name of a binary numeric variable taking values of 0 and 1.
#' @param YgivenGXQ.Pred_D0 A numeric vector of predicted Y values given X, G, and D=0. Vector length=nrow(data).
Expand Down
6 changes: 3 additions & 3 deletions R/cdgd1_ml.R
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@

#' Perform conditional decomposition via machine learning
#'
#' @param Y Outcome. The name of a continuous variable.
#' @param Y Outcome. The name of a numeric variable.
#' @param D Treatment status. The name of a binary numeric variable taking values of 0 and 1.
#' @param G Advantaged group membership. The name of a binary numeric variable taking values of 0 and 1.
#' @param Q Conditional set. The vector of the names of numeric variables.
#' @param X Confounders. The vector of the names of numeric variables.
#' @param Q Conditional set. A vector of names of numeric variables.
#' @param X Confounders. A vector of names of numeric variables.
#' @param data A data frame.
#' @param algorithm The ML algorithm for modelling. "nnet" for neural network, "ranger" for random forests, "gbm" for generalized boosted models.
#' @param alpha 1-alpha confidence interval.
Expand Down
6 changes: 3 additions & 3 deletions R/cdgd1_pa.R
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@

#' Perform conditional decomposition via parametric models
#'
#' @param Y Outcome. The name of a continuous variable.
#' @param Y Outcome. The name of a numeric variable.
#' @param D Treatment status. The name of a binary numeric variable taking values of 0 and 1.
#' @param G Advantaged group membership. The name of a binary numeric variable taking values of 0 and 1.
#' @param Q Conditional set. The vector of the names of numeric variables.
#' @param X Confounders. The vector of the names of numeric variables.
#' @param Q Conditional set. A vector of names of numeric variables.
#' @param X Confounders. A vector of names of numeric variables.
#' @param data A data frame.
#' @param alpha 1-alpha confidence interval.
#' @param trim1 Threshold for trimming the propensity score. When trim1=a, individuals with propensity scores lower than a or higher than 1-a will be dropped.
Expand Down
2 changes: 1 addition & 1 deletion README.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ knitr::opts_chunk$set(
![CRAN Downloads overall](http://cranlogs.r-pkg.org/badges/grand-total/cdgd)


The goal of cdgd is to implement the causal decompositions of group disparities in [Yu and Elwert (2023)](https://ang-yu.github.io/files/Causal_Decomposition_of_Group_Disparities_2023.pdf).
The package cdgd implements the causal decompositions of group disparities in [Yu and Elwert (2023)](https://arxiv.org/abs/2306.16591).

## Installation

Expand Down
5 changes: 2 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,8 @@
![CRAN Downloads
overall](http://cranlogs.r-pkg.org/badges/grand-total/cdgd)

The goal of cdgd is to implement the causal decompositions of group
disparities in [Yu and Elwert
(2023)](https://ang-yu.github.io/files/Causal_Decomposition_of_Group_Disparities_2023.pdf).
The package cdgd implements the causal decompositions of group
disparities in [Yu and Elwert (2023)](https://arxiv.org/abs/2306.16591).

## Installation

Expand Down
2 changes: 1 addition & 1 deletion cran-comments.md
Original file line number Diff line number Diff line change
@@ -1 +1 @@
* This is a patch release that fixes a couple of small issues.
* This is a patch release that revises package description and help files.

0 comments on commit 4c173d3

Please sign in to comment.