Checks that the infection history matrix is allowable given the birth dates and sampling times of the data

check_inf_hist(
  antibody_data,
  possible_exposure_times,
  inf_hist,
  verbose = FALSE
)

Arguments

antibody_data

the data frame of antibody data

possible_exposure_times

vector of times at which individuals could be exposed e.g., `seq(1968,2015,by=1)`

inf_hist

the infection history matrix, with nrows = number indivs and ncols = length(possible_exposure_times)

verbose

if TRUE, prints warning messages

Value

a single boolean value, FALSE if the check passes, otherwise throws an error

Examples

data(example_antibody_data)
data(example_inf_hist)
times <- 1968:2015
check_inf_hist(example_antibody_data, times, example_inf_hist)
#> [1] FALSE