Skip to content

Commit

Permalink
rename
Browse files Browse the repository at this point in the history
  • Loading branch information
vincentarelbundock committed Oct 20, 2023
1 parent 6618d42 commit b2354b6
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion book/articles/NEWS.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -367,7 +367,7 @@ New or improved vignettes:

* Hypothesis Tests and Custom Contrasts using the Delta Method: https://marginaleffects.com/articles/hypothesis.html
* Multiple Imputation: https://marginaleffects.com/articles/multiple_imputation.html
* Causal Inference with the g-Formula: https://marginaleffects.com/articles/gformula.html
* Causal Inference with the g-Formula: https://marginaleffects.com/articles/gcomputation.html
(Thanks to Rohan Kapre for the idea)

Deprecated or renamed arguments:
Expand Down
2 changes: 1 addition & 1 deletion book/articles/logit.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ comparisons(
variables = "tx")
```

Population-averaged (aka "marginal") adjusted risk difference ([see this vignette](gformula.html)) can be obtained using the `avg_*()` functions or using the `by` argument:
Population-averaged (aka "marginal") adjusted risk difference ([see this vignette](gcomputation.html)) can be obtained using the `avg_*()` functions or using the `by` argument:

```{r}
avg_comparisons(mod, variables = "tx")
Expand Down
4 changes: 2 additions & 2 deletions book/articles/matching.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ The procedure we highlight can be broken down into three steps:

1. Use `MatchIt` to pre-process the data and achieve better covariate balance
2. Fit a regression model to the outcome of interest
3. Use `marginaleffects` and [G-Computation](https://marginaleffects.com/articles/gformula.html) to estimate a quantity of interest, such as the Average treatment effect on the treated (ATT)
3. Use `marginaleffects` and [G-Computation](https://marginaleffects.com/articles/gcomputation.html) to estimate a quantity of interest, such as the Average treatment effect on the treated (ATT)

To begin, we load libraries and the data from the classic Lalonde experiment:

Expand Down Expand Up @@ -49,7 +49,7 @@ fit <- lm(

## Quantity of interest

Finally, we use the `avg_comparisons()` function of the `marginaleffects` package to estimate the ATT and its standard error. In effect, this function applies [G-Computation](https://marginaleffects.com/articles/gformula.html) to estimate the quantity of interest. We use the following arguments:
Finally, we use the `avg_comparisons()` function of the `marginaleffects` package to estimate the ATT and its standard error. In effect, this function applies [G-Computation](https://marginaleffects.com/articles/gcomputation.html) to estimate the quantity of interest. We use the following arguments:

* `variables="treat"` indicates that we are interested in the effect of the `treat` variable.
* `newdata=subset(dat, treat == 1)` indicates that we want to estimate the effect for the treated individuals only (i.e., the ATT).
Expand Down
2 changes: 1 addition & 1 deletion book/utils/_quarto.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ book:
- articles/equivalence.qmd
- articles/experiments.qmd
- articles/gam.qmd
- articles/gformula.qmd
- articles/gcomputation.qmd
- articles/ipw.qmd
- articles/logit.qmd
- articles/lme4.qmd
Expand Down

0 comments on commit b2354b6

Please sign in to comment.