Skip to contents

See balance statisitics of variables between treatment and control groups.

Usage

print_balance(.data, treatment, confounders, estimand = c("ATE", "ATT", "ATC"))

Arguments

.data

dataframe

treatment

the column denoted treatment. Must be binary.

confounders

character list of column names denoting the X columns of interest

estimand

character of either ATE, ATT or ATC the causal estimand you are making inferences about

Value

tibble

Author

George Perrett

Examples

data(lalonde)
print_balance(lalonde, 'treat', confounders = c('re78', 'age', 'educ'), estimand = 'ATE')
#> # A tibble: 3 × 4
#>   variable `difference in means` standardized differenc…¹ ratio of the varianc…²
#>   <chr>                    <dbl> <chr>                    <chr>                 
#> 1 age                       0.76 0.11                     1.01                  
#> 2 educ                      0.26 0.14                     1.25                  
#> 3 re78                   1794.   0.26                     1.43                  
#> # ℹ abbreviated names: ¹​`standardized difference in means`,
#> #   ²​`ratio of the variance`