Given a vector of FOIs for all circulating years, a matrix of infection histories and the vector specifying if individuals were alive or not, returns the log probability of the FOIs given the infection histories.

calc_phi_probs(phis, infection_history, age_mask, sample_mask)

Arguments

phis

a vector of FOIs

infection_history

the matrix of infection histories

age_mask

the age mask vector as returned by create_age_mask

sample_mask

the sample mask vector giving the last possible infection-time index for each individual

Value

a single log probability for the infection histories