Helper function to determine if any CV fold found a subgroup involving the same covariate (not necessarily same cut).
find_covariate_any_match(sg_target, sg1, sg2, confs)Numeric vector (0/1) indicating match for each fold.
Character. Target subgroup definition to match.
Character vector. Subgroup 1 labels for each fold.
Character vector. Subgroup 2 labels for each fold.
Character vector. Confounder names.