make_age_contact_rate_array | R Documentation |
Make the contact by age array given the specified inputs
make_age_contact_rate_array(pars, scenario, input_ages, input_contact_rates)
pars |
parameters we are using |
scenario |
can be one of "low adult", "moderate adult" and "high adult" |
input_ages |
if scenario not specified, we can input ages at which we wish contact rates to change. Ages must be integers, and input with as.integer() |
input_contact_rates |
the contact rates corresponding to the ages in the input_ages variable |
will return the parameters object
# define input ages input_ages = array(data = c(as.integer(4), as.integer(9), as.integer(15), as.integer(120))) # define contact rates for age groups input_contact_rates = array(data = c(0.64, 0.91, 1, 0.018)) # normalize so that the sum of the contact rates is 1 input_contact_rates = input_contact_rates/sum(input_contact_rates) # make the contact by age array within the parameters object #pars = default_pars() #pars = make_age_contact_rate_array(pars, scenario, input_ages, input_contact_rates)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.