eligiblity_flag: a list containing segment-wise eligibility flags.
segment: the segment index to read from.
simulation_constants: a named list containing simulation constants.
Returns
getEligibilityFlagInSegment returns a named list containing the following:
i: a length-ni) vector of 1 and 0 values.
s: a length-ns) vector of 1 and 0 values. Only returned when simulation_constants$group_by_stimulus is TRUE.
In each vector, 1 indicates the item/set is eligible to be selected in a shadowtest, and 0 indicates the item/set is not eligible to be selected in a shadowtest. The higher the observed exposure rate, the more likely the item/set will be flagged as 0.