Skip to content

Commit

Permalink
Removed ggGranova to fix R CMD check.
Browse files Browse the repository at this point in the history
  • Loading branch information
jbryer committed Nov 13, 2023
1 parent a59e489 commit 98d0c62
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 18 deletions.
1 change: 1 addition & 0 deletions .Rbuildignore
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,4 @@ docs/
^\.github$
^LICENSE\.md$
^CODE_OF_CONDUCT\.md$
render-readme.yaml
26 changes: 12 additions & 14 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ Date: 2023-07-04
Author: Jason Bryer <jason@bryer.org>
Maintainer: Jason Bryer <jason@bryer.org>
Description: Shiny application and utility functions to assist with
conducting propensity score analysis in R. The functions and data in this
package are also used to support the 'bookdown' book, "Applied Propensity
Score Analaysis with R" <https://psa.bryer.org>.
conducting propensity score analysis in R. The functions and data in
this package are also used to support the 'bookdown' book, "Applied
Propensity Score Analaysis with R" <https://psa.bryer.org>.
License: GPL (>= 3)
URL: http://github.com/jbryer/psa
BugReports: https://github.com/jbryer/psa/issues
Expand All @@ -31,27 +31,25 @@ Suggests:
lubridate,
mvtnorm,
party,
rmarkdown,
stargazer
rmarkdown
Enhances:
granovaGG,
badger,
BART,
bookdown,
devtools,
granova,
gdata,
GGally,
granova,
multilevelPSA,
PSAboot,
PSAgraphics,
randomForest,
rbounds,
rgenoud,
scholar,
rbounds,
tree,
TriMatch,
badger,
BART,
randomForest,
stargazer,
gdata
tree,
TriMatch
VignetteBuilder:
knitr
Encoding: UTF-8
Expand Down
6 changes: 3 additions & 3 deletions book/01-Introduction.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ Simply put, what Rosenbaum and Rubin (1983) proved was that observations similar

## Phases of Propensity Score Analysis

Propensity score analysis is typically conducted in three phases, namely:
Propensity score analysis is typically conducted in three phases (see \@ref(fig:psa-flow)), namely:

1. Model for selection bias

Expand All @@ -223,7 +223,7 @@ Propensity score analysis is typically conducted in three phases, namely:

3. Check for sensitivity to unobserved confounders.

```{r psa_flow, echo=FALSE, fig.cap='Process of conducting propensity score analysis'}
```{r psa-flow, echo=FALSE, fig.cap='Process of conducting propensity score analysis'}
knitr::include_graphics("figures/PSA_Flow.png")
```

Expand Down Expand Up @@ -449,7 +449,7 @@ granovagg.ds(dat_match[,c('control_outcome', 'treat_outcome')],

#### Weighting

Propensity score weighting is useful when you wish to use the propensity scores within other regression models. Specifically, each observation is weighted by the inverse of the probability of being in that group. Figure \@ref(fig:intro-weighting) plots the propensity scores against the outcome, however here the size of the point is proportional to the propensity score weight. In this example the weights are calculated to estimate the average treatment effect. Details on the different treatment effects are discussed in section \@ref(intro-treatment-effects). A Loess regression line (blue) with an approximate 95% confidence interval (grey) is provided along with a line $y - 0$. Since the Loess regression lines does not overlap zero, we would conclude there is a statistically significant treatment effect across the entire range of propensity scores. In later examples of the book we will find that not all treatment effects are homogeneous meaning the treatment effect is not the same across the entire range of propensity scores. This plot, along with the Loess regression plot (Figure \@ref(intro-sim-loess)) are effective tools for determining whether treatment effects may differ depending on different covariate profiles.
Propensity score weighting is useful when you wish to use the propensity scores within other regression models. Specifically, each observation is weighted by the inverse of the probability of being in that group. Figure \@ref(fig:intro-weighting) plots the propensity scores against the outcome, however here the size of the point is proportional to the propensity score weight. In this example the weights are calculated to estimate the average treatment effect. Details on the different treatment effects are discussed in section \@ref(intro-treatment-effects). A Loess regression line (blue) with an approximate 95% confidence interval (grey) is provided along with a line $y - 0$. Since the Loess regression lines does not overlap zero, we would conclude there is a statistically significant treatment effect across the entire range of propensity scores. In later examples of the book we will find that not all treatment effects are homogeneous meaning the treatment effect is not the same across the entire range of propensity scores. This plot, along with the Loess regression plot (Figure \@ref(fig:intro-sim-loess)) are effective tools for determining whether treatment effects may differ depending on different covariate profiles.


```{r intro-weighting, echo=FALSE, fig.height = 4, fig.cap='Scatter plot of propensity scores versus outcome with point sizes corresponding to propensity score weights'}
Expand Down
2 changes: 1 addition & 1 deletion build.R
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ remotes::install_github('jbryer/PSAboot')
# library(bookdown)
wd <- setwd('book')
bookdown::render_book(input = "index.Rmd", output_format = "bookdown::bs4_book")
# bookdown::render_book(input = "index.Rmd", output_format = "bookdown::pdf_book")
# bookdown::render_book(input = "index.Rmd", output_format = "bookdown::pdf_book")
setwd(wd)

library(RefManageR)
Expand Down

0 comments on commit 98d0c62

Please sign in to comment.