------------------------------------------------------------------------------- help forimbalance-------------------------------------------------------------------------------Check covariate imbalance before and after matching---------------------------------------------------

Syntax------imbalancedataname varname treatname blockname savfile

Description-----------imbalancecalculates absolute standardized difference in covariate means (ASAM) before matching (dx) and after matching (dxm), as described by Haviland, Nagin, and Rosenbaum (2007). It allows the analyst to evaluate whether matching balances an observed covariate between treated and control observations.datanamespecifies the name of data file containing covariates to be checked.varnameis the name of a covariate on which the analyst wants to check its balance between treated and control observations.treatnamespecifies the name of the dichotomous variable identifying treatment conditions. Forimbalanceto run properly,treatnamemust be coded treatname = 1 if the observation receives treatment, and treatname = 0 if the observation is a control.blocknamespecifies the variable name that identifies matched sets.Output and Return Values------------------------After runningimbalance, Stata returnsdx¨C the absolute standardized difference in covariate means before matching,dxm- the absolute standardized difference in covariate means after matching, and thenameof the covariate along with the blockname. Both dx and dxm are similar to CohenĄ¯s d. After running imbalance, Stata saves the results in a file namedsavfile. The analyst can usereturn listimmediately after runningimbalanceto see statistics saved for further analysis.Examples--------

. imbalance cds black kuse fm results. imbalance "D:\PSA\cds.dta" black kuse fm "C:\tmp\results". return list. use "C:\tmp\results", clear. listReferences----------Guo, S., & Fraser, M. (2009). Propensity score analysis: Statistical methods and applications. Thousand Oaks, CA: Sage Publications Inc. Haviland, A., Nagin, D. S., & Rosenbaum, P. R. (2007). Combining propensity score matching and group-based trajectory analysis in an observational study. Psychological Methods, 12, 247-267.Author------Shenyang Guo University of North Carolina at Chapel Hill sguo@email.unc.edu

Also see:---------