Given a vector of possible infection times, simulates attack rates from a log-normal distribution with specified mean and log-scale standard deviation.
simulate_attack_rates(
infection_years,
mean_par = 0.15,
sd_par = 0.5,
large_first_year = FALSE,
big_year_mean = 0.5,
n_groups = 1
)vector of possible infection times
target mean attack rate, either one value or one value per population group
standard deviation on the log scale, either one value or one value per population group
logical value indicating whether to simulate an extra-large attack rate in the first time period
target mean for the first time period when `large_first_year = TRUE`
number of population groups to simulate
A long-format data frame with `population_group`, `time`, and `prob_infection` columns.
Other simulation_functions:
simulate_data(),
simulate_infection_histories()