Giter VIP home page Giter VIP logo

psaboot's Introduction

Bootstrapping Propensity Score Analysis

R-CMD-check CRAN Status

Package website: https://jbryer.github.io/PSAboot/
Poster: https://github.com/jbryer/PSAboot/blob/master/Poster/PSAboot_Poster.pdf

As the popularity of propensity score methods for estimating causal effects in observational studies increase, the choices researchers have for which methods to use has also increased. Estimated treatment effects may be sensitive to choice of method. One approach to test the sensitivity of method choice is to test the null hypothesis more than once using more than one method (Rosenbaum, 2012). With the wide availability of high power computers resampling methods such as bootstrapping (Efron, 1979) have become popular for providing more estimates of the sampling distribution. This paper introduces the PSAboot R package that provides functions for bootstrapping propensity score methods. It deviates from traditional bootstrapping methods by allowing for different sampling specifications for treatment and control groups, mainly to ensure the ratio of treatment-to-control observations are consistent. This approach can also be used in situations where there is imbalance between the number of treatment and control observations by allowing for up and/or down sampling. Lastly, by estimating balance statistics and treatment effects for each bootstrap sample we can compare the distributions across multiple propensity score methods to examine the relative performance of these methods.

Installation

You can download from CRAN using:

install.packages('PSAboot')

Or the latest development version using the remotes package:

remotes::install_github('jbryer/PSAboot')

Code of Conduct

Please note that the PSAboot project is released with a Contributor Code of Conduct. By contributing to this project, you agree to abide by its terms.

psaboot's People

Contributors

jbryer avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

psaboot's Issues

Cannot install

I'm trying to install PSAboot and failing. I'm running Rstudio in ubuntu using docker.

> install.packages("PSAboot", repos = "http://cran.r-project.org")
Installing package into ‘/home/ignacio/R/x86_64-pc-linux-gnu-library/3.2’
(as ‘lib’ is unspecified)
trying URL 'http://cran.r-project.org/src/contrib/PSAboot_1.1.tar.gz'
Content type 'application/x-gzip' length 1074617 bytes (1.0 MB)
==================================================
  downloaded 1.0 MB

* installing *source* package ‘PSAboot’ ...
** package ‘PSAboot’ successfully unpacked and MD5 sums checked
** R
** data
** demo
** inst
** preparing package for lazy loading
Note: the specification for S3 class “family” in package ‘MatrixModels’ seems equivalent to one from package ‘lme4’: not turning on duplicate class definitions for this class.
Error : objects ‘opts’, ‘theme_blank’, ‘theme_rect’ are not exported by 'namespace:ggplot2'
ERROR: lazy loading failed for package ‘PSAboot’
* removing ‘/home/ignacio/R/x86_64-pc-linux-gnu-library/3.2/PSAboot’
Warning in install.packages :
  installation of package ‘PSAboot’ had non-zero exit status

The downloaded source packages are in
‘/tmp/RtmpWtrPN4/downloaded_packages’

I also tried

> devtools::install_github("jbryer/PSAboot")
Downloading github repo jbryer/PSAboot@master
Installing PSAboot
Skipping 2 packages ahead of CRAN: ggplot2, scales
'/usr/lib/R/bin/R' --no-site-file --no-environ --no-save --no-restore CMD INSTALL '/tmp/RtmpWtrPN4/devtools63458362a1e/jbryer-PSAboot-727fc36'  \
--library='/home/ignacio/R/x86_64-pc-linux-gnu-library/3.2' --install-tests 

* installing *source* package ‘PSAboot’ ...
** R
** data
** demo
** inst
** preparing package for lazy loading
Note: the specification for S3 class “family” in package ‘MatrixModels’ seems equivalent to one from package ‘lme4’: not turning on duplicate class definitions for this class.
Error : objects ‘opts’, ‘theme_blank’, ‘theme_rect’ are not exported by 'namespace:ggplot2'
ERROR: lazy loading failed for package ‘PSAboot’
* removing ‘/home/ignacio/R/x86_64-pc-linux-gnu-library/3.2/PSAboot’
Error: Command failed (1)

Thanks for the help!

R CMD check NOTEs

I'm seeing:

checking R code for possible problems ... NOTE
boxplot.PSAboot: no visible global function definition for
  ‘geom_tufteboxplot’

Which you can probably fix with foo::bar() style

And

checking data for non-ASCII characters ... NOTE
  Note: found 4 marked UTF-8 strings

which I don't think is important, but I'm not sure

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.