get_weights_for_group_neg: Closed-form SBW group weights (negative weights allowed)

View source: R/weights.R

get_weights_for_group_negR Documentation

Closed-form SBW group weights (negative weights allowed)

Description

Solves for weights on one treatment-arm's covariate data that exactly balance its mean to the target X_n, minimizing sum of squared weights, via the closed-form solution (no nonnegativity constraint).

Usage

get_weights_for_group_neg(data, X_n)

Arguments

data

Covariate data frame for the group (one treatment arm).

X_n

Target covariate mean to balance to.

Value

Numeric vector of weights, one per row of data.


sbwadjust documentation built on Oct. 10, 2026, 5:08 p.m.