optimize_controls()Makes sure that the inputs for supplemental comparisons to optimize_controls() are in the correct
format and feasible.
verify_multi_comp_inputs(
q_s,
q_star_s,
n_s,
treated,
treated_star,
weight_star,
group,
correct_sizes
)No return value. If there is a problem with the inputs to optimize_controls(),
an error is raised.
a named vector or matrix indicating how many units are to be selected from each stratum.
If there is one control group and all treated units are desired, this can be a vector; otherwise,
this should have one row per treatment group, where the order of the rows matches the order of
the levels of z, including the treated level.
If NULL, ratio should be specified. If both are specified, q_s will take priority.
Typically, if the desired ratio is not feasible for every stratum, q_s should be generated
using generate_qs().
a named vector or matrix,
indicating how many supplemental units are to be selected from each stratum.
The matrix should have one row per treatment group, where the order of the rows matches the order of
the levels of z, including the treated level.
If multiple supplemental comparisons are desired, this should be a list with one entry per supplemental
comparison.
which treatment value should be considered the treated units. This
must be one of the values of z.
which treatment value should be considered the treated units
for the supplemental comparison. This
must be one of the values of z.
If multiple supplemental comparisons are desired, this should be a vector with one entry per supplemental
comparison.
a numeric stating how much to prioritize balance between the supplemental units as compared to balance between the main units. If multiple supplemental comparisons are desired, this should be a vector with one entry per supplemental comparison.
boolean stating whether the desired sample sizes should
be exactly correct (if correct_sizes = TRUE) or only need to be correct
in expectation. For multiple comparisons, sample sizes may only be
correct in expectation.