Subsets or adds to the tibble/data.frame created by imputation_precompute(),
and sorts it to ensure compatibility with randomizr::block_ra().
check_impute(imputation_information, current_data, current_period)The success element of the imputation_information
list created by imputation_precompute() for the given period.
A tibble/data.table with only observations from the current sampling period.
Numeric value of length 1; current treatment wave of the simulation.
randomizr::block_ra() does not see the names
of the probabilities passed per block, so the imputation information must be subsetted
to only contain blocks which are present in a period, and sorted to comply with
randomizr::block_ra()'s internal ordering.
When blocks are required but do not exist in the information provided it is added to the tibble/data.table, with an estimated conditional probability of success as the average across other blocks.
When blocks are present but not required, they are removed from the tibble/data.table.