Learn R Programming

⚠️There's a newer version (4.6.1) of this package.Take me there.

cobalt

Welcome to cobalt, which stands for Covariate Balance Tables (and Plots). cobalt allows users to assess balance on covariate distributions in preprocessed groups generated through weighting, matching, or subclassification, such as by using the propensity score. cobalt's primary function is bal.tab(), which stands for "balance table", and essentially repalces (or supplements) the balance assessment tool found in the R packages twang, MatchIt, CBPS, and Matching. To examine how bal.tab() integrates with these packages, see the help file for bal.tab() with ?bal.tab, which links to the methods used for each package. Each page has examples of how bal.tab() is used with the package. There is also a vignette detailing the use of all cobalt, which can be accessed with browseVignettes("cobalt").

Also included are two plotting functions, bal.plot() and love.plot(), and a utility function, f.build(). See the help files or vignette for these functions to learn what they do and how to use them.

Please remember to cite this package when using it to analyze data. For example, in a manuscript, write: "Matching was performed using Matching (Sekhon, 2011), and covariate balance was assessed using cobalt (Greifer, 2016) in R (R Core team, 2016)." Use citation("cobalt") to generate a bibliographic reference for the cobalt package. Thank you very much!

Copy Link

Version

Install

install.packages('cobalt')

Monthly Downloads

25,603

Version

1.3.0

License

GPL (>= 2)

Maintainer

Noah Greifer

Last Published

October 23rd, 2016

Functions in cobalt (1.3.0)

bal.tab.df.formula

Balance Statistics for Data Sets
lalonde

Lalonde's National Supported Work Demonstration data
bal.tab.Match

Balance Statistics for Matching Objects
bal.tab

Generates Balance Statistics
f.build

Convenient Formula Generation
love.plot

Generate Balance Plots for Publication
bal.tab.CBPS

Balance statistics for CBPS Objects
bal.plot

Generate Univariate Balance Plots
bal.tab.ps

Balance Statistics for twang Objects
bal.tab.matchit

Balance Statistics for Matchit Objects
print.bal.tab

Print Results of a Call to bal.tab()