vaccine_allocation_closure: closure to make vaccine allocation function

Description Usage Arguments Value

View source: R/helpers.R

Description

a closure to make a function which returns a vector of length n = n_countries * n_ages * n_risk_groups: the number of vaccines to be allocated to each location, age, risk group

Usage

1
2
vaccine_allocation_closure(user_specified_vax_alloc_func, travel_matrix,
  vax_allocation_params, labels)

Arguments

user_specified_vax_alloc_func

function to allocate vaccines given the arguments #' @param sum_age_risk_func: a function which sums a vector across age and risk groups #' (created in the closure) #' @param travel_matrix: see below #' @param vax_allocation_params: see below #' @param S: numeric vector of length n. number of unvaccinated susceptibles #' @param E: numeric vector of length n. number of unvaccinated exposed #' @param I: numeric vector of length n. number of unvaccinated infectious #' @param R: numeric vector of length n. number of unvaccinated recovered #' @param vax_pool: numeric vector of length 1. number of vaccines available

travel_matrix

square matrix with side length n_countries. travel_matrix[x,y] is the proportion of time an individual in location x spends in location y

vax_allocation_params

list of parameters for vaccine allocation

labels

data frame containing location, age and risk group corresponding to a vector element

Value

a function which returns a vector of length


jameshay218/vaxedemic documentation built on Nov. 6, 2018, 12:27 p.m.