Learn R Programming

Matching (version 3.3-3)

balanceUV: Univariate Balance Tests

Description

This function provides a number of univariate balance metrics. 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, paired=TRUE, match=FALSE,
          weights.Tr=rep(1,length(Tr)), weights.Co=rep(1,length(Co)))

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
paired
A flag for if the paired t.test should be used.
match
A flag for if the Tr and Co objects are the result of a call to Match.
weights.Tr
A vector of weights for the treated observations.
weights.Co
A vector of weights for the control observations.

Value

  • sdiffThis is the standardized difference between the treated and control units. That is, the mean difference between treatment and control units divided by the pooled standard deviation.
  • 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.
  • ksThe object returned by ks.boot.
  • ttThe object returned by two-sided weighted t.test.
  • qqsummaryThe return object from a call to qqstats with standardization.
  • qqsummary.rawThe return object from a call to qqstats without standardization.

References

Sekhon, Jasjeet S. 2006. ``Alternative Balance Metrics for Bias Reduction in Matching Methods for Causal Inference.'' Working Paper. http://sekhon.berkeley.edu/papers/SekhonBalanceMetrics.pdf

Sekhon, Jasjeet S. 2006. ``Matching: Algorithms and Software for Multivariate and Propensity Score Matching with Balance Optimization via Genetic Search.'' http://sekhon.berkeley.edu/matching/ Hollander, Myles and Douglas A. Wolfe. 1973. Nonparametric statistical inference. New York: John Wiley & Sons.

See Also

Also see summary.balanceUV, qqstats ks.boot, Match, GenMatch, 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