View source: R/baltest.collect.R
baltest.collect | R Documentation |
A function that summarizes the covariate balance statistics that are computed by MatchBalance(Matching)
in a balance table.
baltest.collect(matchbal.out, var.names, after = TRUE)
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 |
See MatchBalance(Matching)
for details.
A matrix that contains the covariate balance statistics in tabular format.
Jens Hainmueller
MatchBalance
in the Matching
package.
## 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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.