Converts a data frame of individual sampling times to give the index of the last infection that individual could have had (as we can't observe anything after the last observation)

create_sample_mask(antibody_data, possible_exposure_times)

Arguments

antibody_data

the data frame of antibody data. See example_antibody_data

possible_exposure_times

the vector of times that individuals can be infected

Value

a vector giving the last index of possible_exposure_times that an individual can be infected

See also

Other create_masks: create_age_mask()

Examples

data(example_antibody_data)
data(example_antigenic_map)
times <- example_antigenic_map$inf_times
sample_mask <- create_sample_mask(example_antibody_data, times)