imbalance {cem}R Documentation

Calculates several imbalance measures

Description

Calculates several imbalance measures for the original and matched data sets

Usage

imbalance(group, data, drop=NULL, breaks = NULL, weights)

Arguments

group the group variable
data the data
drop a vector of variable names in the data frame to ignore
breaks a list of vectors of cutpoints used to calculate the L1 measure. See Details.
weights weights

Details

This function calculates several imbalance measures. For numeric variables, the difference in means (under the column statistic), the difference in quantiles and the L1 measure is calculated. For categorical variables the L1 measure and the Chi-squared distance (under column statistic) is calculated. Column type reports either (diff) or (Chi2) to indicate the type of statistic being calculated.

If breaks is not specified, the Scott automated bin calculation is used (which coarsens less than Sturges, which used in cem). Please refer to cem help page. In this case, breaks are used to calculate the L1 measure.

This function also calculate the global L1 imbalance measure. If breaks is missing, the default rule to calculate cutpoints is the Scott's rule. See L1.meas help page for details.

Value

An object of class imbalance which is a list with the following two elements

tab Table of imbalance measures
L1 The global L1 measure of imbalance

Author(s)

Stefano Iacus, Gary King, and Giuseppe Porro

References

Stefano Iacus, Gary King, Giuseppe Porro, ``Matching for Casual Inference Without Balance Checking,'' http://gking.harvard.edu/files/abs/cem-abs.shtml

Examples

 

data(LL)

todrop <- c("treated","re78")
   
imbalance(LL$treated, LL, drop=todrop)

# cem match: automatic bin choice
mat <- cem(treatment="treated", data=LL, drop="re78")

[Package cem version 1.0.90 Index]