make_age_contact_rate_array: Make the contact by age array given the specified inputs

View source: R/Schistox.R

make_age_contact_rate_arrayR Documentation

Make the contact by age array given the specified inputs

Description

Make the contact by age array given the specified inputs

Usage

make_age_contact_rate_array(pars, scenario, input_ages, input_contact_rates)

Arguments

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

Value

will return the parameters object

Examples


# 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)


mattg3004/SchistoxpkgR documentation built on March 1, 2023, 10:46 a.m.