
Assess balance between treated and control groups
balance_assessment.RdThis function performs a balance assessment between treated and control groups using Seemingly Unrelated Regression (SUR) and Hotelling's T-squared test.
Value
A list with two elements: 'SUR' (results of the SUR) and 'Hotelling' (results of the Hotelling's T-squared test).
Examples
if (FALSE) { # \dontrun{
set.seed(123)
data = mtcars %>%
dplyr::select(mpg, cyl, disp, hp, wt) %>%
dplyr::rowwise() %>%
dplyr::mutate(treatment = sample(c(0,1), 1, replace = TRUE)) %>%
dplyr::ungroup()
results <- balance_assessment(data, "treatment", "mpg", "cyl")
print(results$SUR)
print(results$Hotelling)
} # }