randomized_rounding_expectation {natstrat} | R Documentation |
Sample integer solution from linear programming solution with sample sizes correct in expectation
Description
The linear programming solution of balance_LP()
that is used
within optimize_controls()
sometimes selects fractional control units.
Here, we select any unit the linear programming solution chose with coefficient 1.
Then, we select sample each unit with a fractional solution with
probability equal to the linear programming solution. The total sample
size is then correct in expectation. Used within optimize_controls()
if correct_sizes = FALSE
.
Usage
randomized_rounding_expectation(o, N, n_comp)
Arguments
o |
linear programming results, as found in the 'o' element of the
returned list from |
N |
the total number of available controls in the data. |
Value
Dataframe with two columns: pr
, which contains
the coefficient determined for that unit from the linear programming
solution, and select
, a boolean vector stating whether that
unit was selected for inclusion by randomized rounding.