Learn R Programming

Matching (version 0.53)

balanceUV: Univariate Balance Tests

Description

This function provides a number of univariate balance tests. Generally, users should call MatchBalance and not this function directly.

Usage

balanceUV(Tr, Co, weights = rep(1, length(Co)), exact = FALSE, ks=FALSE,
          nboots = 1000)

Arguments

Tr
A vector containing the treatment observations.
Co
A vector containing the control observations.
weights
A vector containing the observation specific weights. Only use this option when the treatment and control observations are paired (as they are after matching).
exact
A logical flag indicating if the exact Wilcoxon test should be used instead of the test with a correction. See wilcox.test for details.
ks
A logical flag for if the univariate bootstrap Kolmogorov-Smirnov (KS) test should be calculated. If the ks option is set to true, the univariate KS test is calculated for all non-dichotomous variables. The bootstrap KS test is consistent ev
nboots
The number of bootstrap samples to be run for the ks test. If zero, no bootstraps are done. Bootstrapping is highly recommended because the bootstrapped Kolmogorov-Smirnov test only provides correct coverage even for non-continu

Value

  • sdiffThis is the standardized difference which is the mean difference between treatment and control divided by the square root of the average variance (of treatment and control). The entire quantity is then multiplied by a 100.
  • mean.TrThe mean of the treatment group.
  • mean.CoThe mean of the control group.
  • var.TrThe variance of the treatment group.
  • var.CoThe variance of the control group.
  • p.valueThe p-value from the two-sided weighted t.test.
  • var.ratiovar.Tr/var.Co.
  • pdiscordantThe proportion of observations which are discordant.
  • ksThe object returned by ks.boot.
  • wcThe object returned by wilcox.test.
  • ttThe object returned by two-sided weighted t.test.

References

Hollander, Myles and Douglas A. Wolfe. 1973. Nonparametric statistical inference. New York: John Wiley & Sons.

Sekhon, Jasjeet S. 2004. ``Balance Tests for Matching Estimators.'' Working Paper.

See Also

Also see summary.balanceUV, ks.boot, Match, MatchBalance, balanceMV, GerberGreenImai, lalonde

Examples

Run this code
data(lalonde)
attach(lalonde)

foo  <- balanceUV(re75[treat==1],re75[treat!=1])
summary(foo)

Run the code above in your browser using DataLab