bal.stat {twang} | R Documentation |
bal.stat
compares the treatment and control subjects by means, standard
deviations, effect size, and KS statistics
bal.stat(data, vars = NULL, treat.var, w.all, get.means = TRUE, get.ks = TRUE, na.action = "level")
data |
a data frame containing the data |
vars |
a vector of character strings with the names of the variables on which the function will assess the balance |
treat.var |
the name of the treatment variable |
w.all |
observation weights (e.g. propensity score weights, sampling weights, or both) |
get.means |
logical. If TRUE then bal.stat will compute means
and variances |
get.ks |
logical. If TRUE then bal.stat will compute KS
statistics |
na.action |
a character string indicating how bal.stat should
handle missing values. Current options are "level",
"exclude", or "lowest" |
bal.stat
calls ps.summary.f
and
ps.summary.n
for each variable and assembles the results in
a table
See ps.summary
for details on the returned object.
get.means
and get.ks
manipulate the inclusion of certain
columns in the returned result.
The example for ps
contains an example of the
use of bal.table