verify_inputs_EMD {natstrat} | R Documentation |
Verify the inputs to the earthmover's distance problem
Description
Check that the ratio, strata, and treated indicator provided to generate_qs()
are in the correct forms and that the desired ratio is feasible
across the population.
Usage
verify_inputs_EMD(ratio, st, z, treated = 1)
Arguments
ratio |
a numeric or vector specifying the desired ratio of controls to 'treated' in
each stratum. If there is one control group and all treated units should be included,
this can be a numeric. Otherwise, this should be
a vector with one entry per treatment group, in the same order as the levels of
|
st |
a stratum vector with the |
z |
a factor with the |
treated |
which treatment value should be considered the treated units. This
must be one of the values of |
Value
No return value. If there is a problem with the inputs to generate_qs()
,
an error is raised.