View source: R/simulate_serosurvey.R
prob_seroprev_by_age | R Documentation |
This function generates seropositivity probabilities based on either a time-varying Force-of-Infection (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.
prob_seroprev_by_age(model, foi, seroreversion_rate = 0)
model |
A string specifying the model type which can be either '"age"', '"time"', '"age-time"'. |
foi |
A dataframe containing the FoI values. For time-varying models the columns should be:
For age-varying models the columns should be:.
For age-and-time-varying models the columns should be:
|
seroreversion_rate |
A non-negative value determining the rate of seroreversion (per year). Default is 0. |
A dataframe with columns 'age' and 'seropositivity'.
prob_seroprev_by_age(
model = "age",
foi = data.frame(
age = 1:80,
foi = rep(0.01, 80)
)
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.