
Calls C++ implementation to calculate standardized mean differences.
Source:R/diagnostics.R
standardized_mean_differences.Rd
Calculates standardized mean differences between treated and controls and towards target means for an outcome weights matrix with potentially many rows like for CATEs.
Arguments
- X
Covariate matrix with N rows and p columns.
- treat
Binary treatment variable.
- omega
Outcome weights matrix with dimension number of weight vectors for which balancing should be checked x number of training units.
- target
Optional matrix with dimension number of weight vectors for which balancing should be checked x p indicating the target values the covariates should be balanced towards. If NULL, average of X used as target of ATE.
Value
3D-array of dimension p x 6 x number of weight vectors for which balancing should be checked where the second dimension provides the following quantities:
"Mean 0": The weighted control mean
"Mean 1": The weighted treated mean
"SMD balancing": Standardized mean differences for covariate balancing (Mean 1 - Mean 0) / sd(X)
"SMD targeting 0": Standardized mean difference to assess targeting of control (Mean 0 - target) / sd(X)
"SMD targeting 1": Standardized mean difference to assess targeting of treated (Mean 1 - target) / sd(X)