Skip to content

Commit

Permalink
Updated slides.
Browse files Browse the repository at this point in the history
Updated README.
Added ... parameter for shiny functions to pass parameters to runApp.
  • Loading branch information
jbryer committed Nov 14, 2023
1 parent 98d0c62 commit cf39786
Show file tree
Hide file tree
Showing 14 changed files with 54 additions and 151 deletions.
14 changes: 10 additions & 4 deletions R/psa_shiny.R
Original file line number Diff line number Diff line change
@@ -1,13 +1,19 @@
#' Run the PSA shiny application.
#'
#' @param ... other parameters passed to [shiny::runApp].
#' @export
psa_shiny <- function() {
shiny::runApp(paste0(find.package(package='psa'), '/shiny/psa'))
psa_shiny <- function(...) {
shiny::runApp(
appDir = paste0(find.package(package='psa'), '/shiny/psa'),
...)
}

#' Run the PSA simulation shiny application.
#'
#' @param ... other parameters passed to [shiny::runApp].
#' @export
psa_simulation_shiny <- function() {
shiny::runApp(paste0(find.package(package='psa'), '/shiny/psa_simulation'))
psa_simulation_shiny <- function(...) {
shiny::runApp(
appDir = paste0(find.package(package='psa'), '/shiny/psa_simulation'),
...)
}
38 changes: 1 addition & 37 deletions README.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ ggplot(psa_citations, aes(x = Year, y = Citations, color = Search_Term)) +

## Slides

[Click here](Slides/Intro_PSA.pdf) for latest version slides introducing propensity score analysis.
The latest version slides introducing propensity score analysis: [PDF](Slides/Intro_PSA.pdf) or [HTML](Slides/Intro_PSA.html).

<!--
## CUNY MSDS Talk
Expand Down Expand Up @@ -176,42 +176,6 @@ There are a number of R packages available for conducting propensity score analy
* [`rpart`](http://cran.r-project.org/web/packages/rpart/index.html) (Therneau, Atkinson, & Ripley, 2012) Recursive Partitioning
* [`TriMatch`](http://jason.bryer.org/TriMatch) (Bryer, 2013) Propensity Score Matching for Non-Binary Treatments

## References

Rosenbaum, P.R., & Rubin, D.B. (1983). [The central role of the propensity score in observational studies for causal effects](http://faculty.smu.edu/Millimet/classes/eco7377/papers/rosenbaum%20rubin%2083a.pdf). *Biometrika, 70*(1), 41-55.

Rosenbaum, P.R. (2010). *Design of Observational Studies*. New York: Springer.

Austin, P. C. (2011). Comparing paired vs non-paired statistical methods of analyses when making inferences about absolute risk reductions in propensity-score matched samples. *Statistics in Medicine, 30*.

Bryer, J. (2011). multilevelPSA: Multilevel propensity score analysis [Computer software manual]. Retrieved from http://github.com/jbryer/multilevelPSA

Bryer, J., & Pruzek, R.M. (2011). An international comparison of private and public schools using multilevel propensity score methods and graphics (Abstract). *Multivariate Behavioral Research, 46*(6), 1010-1011.

Helmreich, J. E., & Pruzek, R. M. (2009). PSAgraphics: An R package to support propensity score analysis. *Journal of Statistical Software, 29*(6). Available from http://www.jstatsoft.org/v29/i06/paper

Ho, D.E., Imai, K., King, G., and Stuart, E.A (2011). [MatchIt: Nonparametric Preprocessing for Parametric Causal Inference](http://www.jstatsoft.org/v42/i08/). *Journal of Statistical Software 42*(8).

Hothorn, T., Hornik, K., & Zeileis, A. (2006). Unbiased Recursive Partitioning: A Conditional Inference Framework. *Journal of Computational and Graphical Statistics, 15*(3), 651--674.

R Core Team (2012). [R: A language and environment for statistical computing](http://www.R-project.org/). R Foundation for Statistical Computing, Vienna, Austria. ISBN 3-900051-07-0.

Rosenbaum, P.R. (2005). Sensitivity analysis in observational studies. In B.S. Everitt & D.C. Howell *Encyclopedia of Statistics in Behavioral Science*, pp. 1809-1814. Chichester: John Wiley & Sons.

Rosenbaum, P.R. (2012). Testing one hypothesis twice in observational studies. *Biometrika*.

Sekhon, J.S. (2011). [Multivariate and Propensity Score Matching Software with Automated Balance Optimization: The Matching Package for R](http://www.jstatsoft.org/v42/i07/). *Journal of Statistical Software, 42*(7), 1-52.

Shadish, W.R., Clark, M.H., & Steiner, P.M. (2008). Can nonrandomized experiments yield accurate answers? A randomized experiment comparing random and nonrandom assignments. *Journal of the American Statistical Association, 103*(484). 1334-1356.

Stuart, E. A. (2010). Matching methods for causal inference: A review and a look forward. *Statistical Science, 25*, 1-21.

Stuart, E.A., & Rubin, D.B. (2007). Best practices in quasi-experimental designs: Matching methods for causal inference. Chapter 11 (pp. 155-176) in J. Osborne (Ed.). *Best Practices in Quantitative Social Science*. Thousand Oaks, CA: Sage Publications.

Therneau, T., Atkinson, B., & Ripley, B. (2012). [rpart: Recursive Partitioning](http://CRAN.R-project.org/package=rpart). R package version 4.0-1.

Thoemmes, F. J., & Kim, E. S. (2011). A systematic review of propensity score methods in the social sciences. Multivariate Behavioral Research, 46, 90-118.


## Code of Conduct

Expand Down
77 changes: 2 additions & 75 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ be demonstrated.

## Slides

[Click here](Slides/Intro_PSA.pdf) for latest version slides introducing
propensity score analysis.
The latest version slides introducing propensity score analysis:
[PDF](Slides/Intro_PSA.pdf) or [HTML](Slides/Intro_PSA.html).

<!--
## CUNY MSDS Talk
Expand Down Expand Up @@ -219,79 +219,6 @@ score analysis. These are the packages this workshop will make use of:
- [`TriMatch`](http://jason.bryer.org/TriMatch) (Bryer, 2013) Propensity
Score Matching for Non-Binary Treatments

## References

Rosenbaum, P.R., & Rubin, D.B. (1983). [The central role of the
propensity score in observational studies for causal
effects](http://faculty.smu.edu/Millimet/classes/eco7377/papers/rosenbaum%20rubin%2083a.pdf).
*Biometrika, 70*(1), 41-55.

Rosenbaum, P.R. (2010). *Design of Observational Studies*. New York:
Springer.

Austin, P. C. (2011). Comparing paired vs non-paired statistical methods
of analyses when making inferences about absolute risk reductions in
propensity-score matched samples. *Statistics in Medicine, 30*.

Bryer, J. (2011). multilevelPSA: Multilevel propensity score analysis
\[Computer software manual\]. Retrieved from
<http://github.com/jbryer/multilevelPSA>

Bryer, J., & Pruzek, R.M. (2011). An international comparison of private
and public schools using multilevel propensity score methods and
graphics (Abstract). *Multivariate Behavioral Research, 46*(6),
1010-1011.

Helmreich, J. E., & Pruzek, R. M. (2009). PSAgraphics: An R package to
support propensity score analysis. *Journal of Statistical Software,
29*(6). Available from <http://www.jstatsoft.org/v29/i06/paper>

Ho, D.E., Imai, K., King, G., and Stuart, E.A (2011). [MatchIt:
Nonparametric Preprocessing for Parametric Causal
Inference](http://www.jstatsoft.org/v42/i08/). *Journal of Statistical
Software 42*(8).

Hothorn, T., Hornik, K., & Zeileis, A. (2006). Unbiased Recursive
Partitioning: A Conditional Inference Framework. *Journal of
Computational and Graphical Statistics, 15*(3), 651–674.

R Core Team (2012). [R: A language and environment for statistical
computing](http://www.R-project.org/). R Foundation for Statistical
Computing, Vienna, Austria. ISBN 3-900051-07-0.

Rosenbaum, P.R. (2005). Sensitivity analysis in observational studies.
In B.S. Everitt & D.C. Howell *Encyclopedia of Statistics in Behavioral
Science*, pp. 1809-1814. Chichester: John Wiley & Sons.

Rosenbaum, P.R. (2012). Testing one hypothesis twice in observational
studies. *Biometrika*.

Sekhon, J.S. (2011). [Multivariate and Propensity Score Matching
Software with Automated Balance Optimization: The Matching Package for
R](http://www.jstatsoft.org/v42/i07/). *Journal of Statistical Software,
42*(7), 1-52.

Shadish, W.R., Clark, M.H., & Steiner, P.M. (2008). Can nonrandomized
experiments yield accurate answers? A randomized experiment comparing
random and nonrandom assignments. *Journal of the American Statistical
Association, 103*(484). 1334-1356.

Stuart, E. A. (2010). Matching methods for causal inference: A review
and a look forward. *Statistical Science, 25*, 1-21.

Stuart, E.A., & Rubin, D.B. (2007). Best practices in quasi-experimental
designs: Matching methods for causal inference. Chapter 11 (pp. 155-176)
in J. Osborne (Ed.). *Best Practices in Quantitative Social Science*.
Thousand Oaks, CA: Sage Publications.

Therneau, T., Atkinson, B., & Ripley, B. (2012). [rpart: Recursive
Partitioning](http://CRAN.R-project.org/package=rpart). R package
version 4.0-1.

Thoemmes, F. J., & Kim, E. S. (2011). A systematic review of propensity
score methods in the social sciences. Multivariate Behavioral Research,
46, 90-118.

## Code of Conduct

Please note that the psa project is released with a [Contributor Code of
Expand Down
4 changes: 2 additions & 2 deletions Slides/Intro_PSA.Rmd
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: "Introduction to Propensity Score Analysis with R"
# subtitle: "Propensity Score Analysis with R"
title: "A Visual Introduction to Propensity Score Analysis with R"
subtitle: "New York Open Statistical Programming Meetup"
author: "Jason Bryer, Ph.D."
# date: "`r format(Sys.Date(), '%B %d, %Y')`"
output:
Expand Down
62 changes: 31 additions & 31 deletions Slides/Intro_PSA.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<!DOCTYPE html>
<html lang="" xml:lang="">
<head>
<title>Introduction to Propensity Score Analysis with R</title>
<title>A Visual Introduction to Propensity Score Analysis with R</title>
<meta charset="utf-8" />
<meta name="author" content="Jason Bryer, Ph.D." />
<script src="libs/header-attrs/header-attrs.js"></script>
Expand All @@ -20,10 +20,10 @@



# Introduction to Propensity Score Analysis with R
##
# A Visual Introduction to Propensity Score Analysis with R
## New York Open Statistical Programming Meetup
### Jason Bryer, Ph.D.
### Last updated: November 13, 2023
### Last updated: November 14, 2023


---
Expand Down Expand Up @@ -1256,56 +1256,56 @@
## Stratification Results:
## Complete estimate = 1587
## Complete CI = [224, 2950]
## Bootstrap pooled estimate = 1624
## Bootstrap weighted pooled estimate = 1625
## Bootstrap pooled CI = [196, 3053]
## Bootstrap pooled estimate = 1610
## Bootstrap weighted pooled estimate = 1558
## Bootstrap pooled CI = [234, 2985]
## 68% of bootstrap samples have confidence intervals that do not span zero.
## 68% positive.
## 0% negative.
## ctree Results:
## Complete estimate = 1598
## Complete CI = [-6.62, 3203]
## Bootstrap pooled estimate = 1592
## Bootstrap weighted pooled estimate = 1615
## Bootstrap pooled CI = [325, 2858]
## 38% of bootstrap samples have confidence intervals that do not span zero.
## 38% positive.
## Bootstrap pooled estimate = 1654
## Bootstrap weighted pooled estimate = 1643
## Bootstrap pooled CI = [228, 3080]
## 37.1% of bootstrap samples have confidence intervals that do not span zero.
## 37.1% positive.
## 0% negative.
## rpart Results:
## Complete estimate = 1332
## Complete CI = [-295, 2959]
## Bootstrap pooled estimate = 1434
## Bootstrap weighted pooled estimate = 1419
## Bootstrap pooled CI = [-286, 3154]
## Bootstrap pooled estimate = 1529
## Bootstrap weighted pooled estimate = 1537
## Bootstrap pooled CI = [24.7, 3034]
## 31% of bootstrap samples have confidence intervals that do not span zero.
## 31% positive.
## 0% negative.
## Matching Results:
## Complete estimate = 1827
## Complete CI = [1210, 2444]
## Bootstrap pooled estimate = 1537
## Bootstrap weighted pooled estimate = 1540
## Bootstrap pooled CI = [-332, 3406]
## 87% of bootstrap samples have confidence intervals that do not span zero.
## 86% positive.
## 1% negative.
## Bootstrap pooled estimate = 1494
## Bootstrap weighted pooled estimate = 1463
## Bootstrap pooled CI = [-297, 3285]
## 84% of bootstrap samples have confidence intervals that do not span zero.
## 84% positive.
## 0% negative.
## MatchIt Results:
## Complete estimate = 2031
## Complete CI = [797, 3266]
## Bootstrap pooled estimate = 1855
## Bootstrap weighted pooled estimate = 1802
## Bootstrap pooled CI = [373, 3336]
## 73% of bootstrap samples have confidence intervals that do not span zero.
## 73% positive.
## Bootstrap pooled estimate = 1899
## Bootstrap weighted pooled estimate = 1907
## Bootstrap pooled CI = [410, 3389]
## 78% of bootstrap samples have confidence intervals that do not span zero.
## 78% positive.
## 0% negative.
## Weighting Results:
## Complete estimate = 1641
## Complete CI = [380, 2902]
## Bootstrap pooled estimate = 1639
## Bootstrap weighted pooled estimate = 1627
## Bootstrap pooled CI = [176, 3102]
## 73% of bootstrap samples have confidence intervals that do not span zero.
## 73% positive.
## Bootstrap pooled estimate = 1622
## Bootstrap weighted pooled estimate = 1602
## Bootstrap pooled CI = [227, 3016]
## 75% of bootstrap samples have confidence intervals that do not span zero.
## 75% positive.
## 0% negative.
```

Expand Down
Binary file modified Slides/Intro_PSA.pdf
Binary file not shown.
Binary file modified Slides/Intro_PSA_files/figure-html/unnamed-chunk-60-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified Slides/Intro_PSA_files/figure-html/unnamed-chunk-61-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified Slides/Intro_PSA_files/figure-html/unnamed-chunk-62-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified Slides/Intro_PSA_files/figure-html/unnamed-chunk-63-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified man/figures/README-loess_plot-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified man/figures/README-matching_plot-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 4 additions & 1 deletion man/psa_shiny.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 4 additions & 1 deletion man/psa_simulation_shiny.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit cf39786

Please sign in to comment.