Learn R Programming

twang (version 1.3-14)

ps.summary: Computes balance measures

Description

Computes balance measures (mean differences and KS statistics) for a particular covariate and a set of propensity score weights. This function is not intended to be called directly by the user but is used by other functions in the package.

Usage

ps.summary(x, t, w, get.means = TRUE, get.ks = TRUE, 
           na.action = c("level", "exclude", "lowest")[1], 
           collapse.by.var = FALSE,
           estimand, multinom)
ps.summary.f(x, t, w, get.means = TRUE, get.ks = TRUE, 
             na.action = c("level", "exclude", "lowest")[1], 
             collapse.by.var = TRUE,
             estimand, multinom)
ps.summary.n(x, t, w, get.means = TRUE, get.ks = TRUE, 
             na.action = c("level", "exclude", "lowest")[1], 
             collapse.by.var = FALSE,
             estimand, multinom)

Arguments

x
a vector containing the data for a single covariate
t
a vector of the same length as x with the 0/1 treatment assigniments
w
a vector of the same length as x with the weights
get.means
if TRUE, mean comparisons are computed
get.ks
if TRUE, the KS statistics are computed
na.action
a string indicating the method for handling missing data
collapse.by.var
if TRUE, then statistics computed for factors are collapsed across the levels
estimand
either "ATT" or "ATE"
multinom
TRUE if used in for in call from mnps

Value

  • Returns a data frame containing the balance information.
  • tx.mnThe mean of the treatment group
  • tx.sdThe standard deviation of the treatment group
  • ct.mnThe mean of the control group
  • ct.sdThe standard deviation of the control group
  • std.eff.szThe standardized effect size, (tx.mn-ct.mn)/tx.sd
  • statthe t-statistic for numeric variables and the chi-square statistic for continuous variables
  • pthe p-value for the test associated with stat
  • ksthe KS statistic
  • ks.pvalthe KS p-value computed using the analytic approximation, which does not necessarily work well with a lot of ties
  • get.means and get.ks manipulate the inclusion of certain columns in the returned result.

Details

ps.summary dispatches ps.summary.n or ps.summary.f depending on whether x is a numeric vector or a factor.

See Also

bal.stat