scm_inner_weights_cpp: SCM Inner Weights (QP Given V)

View source: R/RcppExports.R

scm_inner_weights_cppR Documentation

SCM Inner Weights (QP Given V)

Description

Solves the inner-loop QP for SCM: given a fixed diagonal metric matrix V, finds donor weights W on the simplex minimising the V-weighted covariate loss. The returned weights are a KKT-verified exact optimum whenever the active-set solver converges, with accelerated projected gradient as a fallback.

Usage

scm_inner_weights_cpp(X0, X1, V_diag, wolfe = FALSE)

Arguments

X0

Covariate matrix for control units (k x N_co)

X1

Covariate vector for the treated unit (k x 1)

V_diag

Diagonal of the metric matrix V (k x 1, non-negative, need not sum to 1)

wolfe

If TRUE, solve with the Wolfe min-norm-point method, which returns a Caratheodory-sparse optimum (at most k+1 donors carry weight) instead of one arbitrary point of a degenerate optimal face. FALSE (default) uses the warm-started active-set solver.

Value

Donor weight vector W (N_co x 1) on the unit simplex


coresynth documentation built on Aug. 28, 2026, 1:06 a.m.