Giter Site home page Giter Site logo

cbal's Introduction

cbal: Covariate Balancing Weights

An R package for finding covariate balancing weights for causal inference. These functions find the solution to a convex optimization problem using Bregman distances as the criterion function. The balancing weights are evaluated as the generalized projection of the sampling weights into an intersection of hyperplanes that form the basis of a linear subspace. This linear subspace constrains the moments for the empirical distribution of the covariates to be identical between treatment groups.

In its current form, cbal supports three Bregman distances and requires a binary treatment assignment. In the future, this package will be extended to allow for other criterion distance functions and multivalued treatment assignments.

Installing cbal

Options for installing cbal:

  1. Install the developmental version from github. This will require you to have devtools installed and, if you are using Windows, you'll need Rtools installed as well.
library(devtools)
install_github("kevjosey/cbal", build_vignettes = TRUE)
  1. Clone the repo and use GNU make
make install
  1. Go to the release page and download the tar.gz file of the version you want to install.
  • Install from the command line
R CMD INSTALL cbal_<version>.tar.gz
  • Within R
install.packages(<path_to_file>, repos = NULL, type = "source")

cbal's People

Contributors

kevjosey avatar dewittpe avatar

Stargazers

Noah Greifer avatar

Forkers

dewittpe ghoshlab

cbal's Issues

Documentation Issues

There are at least three issues to address in the documentation. From R CMD check (assuming #1 has been accepted)

* checking R code for possible problems ... NOTE
transport: no visible binding for global variable ‘Y1’
Undefined global functions or variables:
  Y1
* checking Rd files ... NOTE
prepare_Rd: lagrange.Rd:36-38: Dropping empty section \references
* checking Rd metadata ... OK
* checking Rd cross-references ... OK
* checking for missing documentation entries ... OK
* checking for code/documentation mismatches ... OK
* checking Rd \usage sections ... WARNING
Undocumented arguments in documentation object 'balance'
  ‘Y’

At Y1 in transport needs to be defined. It is used

Y[S == 1] <- Y1

but is not in the function arguments or @param tags. The tests are passing because the ... is capturing the Y1 input. However, adding Y1 to the functional arguments will result in the tests failing.

I have not check for a solution for the undocumented argument in balance.

@kevjosey please update the documentation so the notes and warning are resolved.

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.