baltest.collect {ebal} | R Documentation |
Collect Covariate Balance Statistics
Description
A function that summarizes the covariate balance statistics that are computed by MatchBalance(Matching)
in a balance table.
Usage
baltest.collect(matchbal.out, var.names, after = TRUE)
Arguments
matchbal.out |
An object from a call to |
var.names |
A vector of covariate names. |
after |
A logical flag for whether the results from before or after Matching should be summarized. If TRUE |
Details
See MatchBalance(Matching)
for details.
Value
A matrix that contains the covariate balance statistics in tabular format.
Author(s)
Jens Hainmueller
See Also
MatchBalance
in the Matching
package.
Examples
## load(Matching) to run this example
## create toy data: one treatment indicator and three covariates X1-3
#dat <- data.frame(treatment=rbinom(50,size=1,prob=.5),replicate(3,rnorm(50)))
#covarsname <- colnames(dat)[-1]
## run balance checks
#mout <- MatchBalance(treatment~X1+X2+X3,data=dat)
## summarize in balance table
#baltest.collect(matchbal.out=mout,var.names=covarsname,after=FALSE)
[Package ebal version 0.1-8 Index]