get_cohorts: Multi-annual model of infection and vaccination (version 2)

View source: R/get_cohorts.R

get_cohortsR Documentation

Multi-annual model of infection and vaccination (version 2)

Description

This function gets attack rates for a rolling cohort.

Usage

get_cohorts(
  inf_history,
  vac_history,
  ages,
  enrollment_start_year = 2000,
  ncohorts = 10,
  total_year_range,
  length_study = 18,
  write.file = FALSE,
  file = "test"
)

Arguments

inf_history

sparse matrix of infection histories for each person

vac_history

sparse matrix of vaccination history for each person

ages

matrix of ages of each person for every year

enrollment_start_year

year for cohort enrollment to start (YYYY format)

ncohorts

number of cohorts to enroll

total_year_range

vector of years to run simulations over

length_study

number of years to follow each cohort

write.file

logical. if true, the infection histories and vaccination histories are written to the working directory

file

character string used as the prefix for the output file if write.file = TRUE

Value

data frame of attack rates within the cohort by year


kylieainslie/MoreVac documentation built on March 22, 2022, 8:49 a.m.