
Covariate balance after weighting or matching
Source:R/causal_match_native.R
morie_covariate_balance_check.RdStandardised mean differences, before and after weighting, plus the variance ratio per covariate.
Arguments
- X
covariate matrix.
- treat
0/1 treatment indicator.
- weights
optional weights, e.g. from
morie_causal_iptw_atoweights.- threshold
|SMD| above which a covariate counts as imbalanced.
Details
The SMD rather than a t-test, deliberately: a hypothesis test conflates imbalance with sample size, so a large study reports "significant imbalance" on differences too small to matter and a small one reports balance it has no power to reject. The SMD is a magnitude and does not move with n.
Balance on MEANS is necessary, not sufficient. Two distributions can
share a mean and differ everywhere else, which is what
variance_ratio is for – it should sit near 1.