bal.table: Compute the balance table.

View source: R/bal.table.R

bal.tableR Documentation

Compute the balance table.

Description

Extract the balance table from ps, dx.wts, and mnps objects

Usage

bal.table(
  x,
  digits = 3,
  collapse.to = c("pair", "covariate", "stop.method")[1],
  subset.var = NULL,
  subset.treat = NULL,
  subset.stop.method = NULL,
  es.cutoff = 0,
  ks.cutoff = 0,
  p.cutoff = 1,
  ks.p.cutoff = 1,
  timePeriods = NULL,
  ...
)

Arguments

x

A ps or dx.wts object.

digits

The number of digits that the numerical entries should be rounded to. Default: 3.

collapse.to

For mnps ATE objects, the comparisons can be given for all pairs (default), summarized by pre-treatment covariate and stop.method, or as a single summary for each stop.method.

subset.var

Eliminate all but a specified subset of covariates.

subset.treat

Subset to either all pairs that include a specified treatment or a single pair of treatments.

subset.stop.method

Subset to either all pairs that include a specified treatment or a single pair of treatments.

es.cutoff

Subsets to comparisons with absolute ES values bigger than es.cutoff. Default: 0.

ks.cutoff

Subsets to comparisons with KS values bigger than ks.cutoff. Default: 0.

p.cutoff

Subsets to comparisons with t- or chi-squared p-values no bigger than p.cutoff. Default: 1.

ks.p.cutoff

Subsets to comparisons with t- or chi-squared p-values no bigger than p.cutoff. Default: 1.

timePeriods

Used to subset times for iptw fits.

...

Additional arugments.

Details

bal.table is a generic function for extracting balance tables from ps and dx.wts objects. These objects usually have several sets of candidate weights, one for an unweighted analysis and perhaps several stop.methods. bal.table will return a table for each set of weights combined into a list. Each list component will be named as given in the x, usually the name of the stop.method. The balance table labeled “unw” indicates the unweighted analysis.

Value

Returns a data frame containing the balance information.

  • tx.mn The mean of the treatment group.

  • tx.sd The standard deviation of the treatment group.

  • ct.mn The mean of the control group.

  • ct.sd The standard deviation of the control group.

  • std.eff.sz The standardized effect size, (tx.mn-ct.mn)/tx.sd. If tx.sd is small or 0, the standardized effect size can be large or INF. Therefore, standardized effect sizes greater than 500 are set to NA.

  • stat The t-statistic for numeric variables and the chi-square statistic for continuous variables.

  • p The p-value for the test associated with stat ks The KS statistic.

  • ks.pval The KS p-value computed using the analytic approximation, which does not necessarily work well with a lot of ties.


twang documentation built on Sept. 11, 2024, 8:47 p.m.