calculate_var_balance: Calculate Variable-Level Balance Statistics

View source: R/matching_diagnostics.R

calculate_var_balanceR Documentation

Calculate Variable-Level Balance Statistics

Description

Calculate Variable-Level Balance Statistics

Usage

calculate_var_balance(
  left_vals,
  right_vals,
  var_name,
  w_left = NULL,
  w_right = NULL
)

Arguments

left_vals

Numeric vector of values from left group

right_vals

Numeric vector of values from right group

var_name

Character, name of the variable

w_left

Optional numeric vector of weights for left_vals (e.g. stratum weights from full matching, CEM, or subclassification). Defaults to equal weights.

w_right

Optional numeric vector of weights for right_vals.

Value

List with balance statistics for this variable


couplr documentation built on Sept. 17, 2026, 1:08 a.m.