Skip to contents

This function generates seropositivity probabilities based on either a time-varying FOI model, an age-varying FOI model, or an age-and-time-varying FOI model. In all cases, it is possible to optionally include seroreversion.

Usage

probability_seropositive_by_age(model, foi, seroreversion_rate = 0)

Arguments

model

A string specifying the model type which can be one of 'age', 'time', 'age-time'.

foi

A dataframe containing the force of infection (FOI) values. For time-varying models the columns should be 'year', 'foi'. For age-varying models the columns should be 'age', 'foi'. For age-and-time-varying models the columns should be 'age', 'time', 'foi'.

seroreversion_rate

A non-negative value determining the rate of seroreversion (per year). Default is 0.

Value

A dataframe with columns 'age' and 'seropositivity'.