Description Usage Arguments Value
Figure out how many units to take from each stratum when some strata are deficient.
The result should be used as an input to optimize_controls()
.
1 2 3 4 5 6 7 8 9 | generate_qs(
z,
st,
ratio,
treated = 1,
max_ratio = NULL,
max_extra_s = 5,
strata_dist = NULL
)
|
z |
a factor with the |
st |
a stratum vector with the |
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
|
treated |
which treatment value should be considered the treated units. This
must be one of the values of |
max_ratio |
a numeric or vector specifying the maximum ratio to allow in a stratum to achieve
the overall |
max_extra_s |
single numeric or named vector or matrix with values corresponding to the maximum desired number
of extra controls to be chosen from each stratum to achieve the overall
|
strata_dist |
matrix with both row and column names with names corresponding
to the stratum values from |
A named vector stating how many controls to take from each stratum.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.