View source: R/predict_setting_contacts.R
predict_setting_contacts | R Documentation |
Predict contact rate for each setting. Note that this function is
parallelisable with future
, and will be impacted by any future
plans
provided.
predict_setting_contacts(
population,
contact_model,
age_breaks,
per_capita_household_size = NULL,
model_per_capita_household_size = get_polymod_per_capita_household_size()
)
population |
population |
contact_model |
contact_model |
age_breaks |
age_breaks |
per_capita_household_size |
Optional (defaults to NULL). When set, it
adjusts the household contact matrix by some per capita household size.
To set it, provide a single number, the per capita household size. More
information is provided below in Details. See
|
model_per_capita_household_size |
modelled per capita household size.
Default values for this are from
|
We use Per-capita household size instead of mean household size. Per-capita household size is different to mean household size, as the household size averaged over people in the population, not over households, so larger households get upweighted. It is calculated by taking a distribution of the number of households of each size in a population, multiplying the size by the household by the household count to get the number of people with that size of household, and computing the population-weighted average of household sizes. We use per-capita household size as it is a more accurate reflection of the average number of household members a person in the population can have contact with.
List of setting matrices
Nicholas Tierney
# don't run as it takes too long to fit
## Not run:
fairfield <- abs_age_lga("Fairfield (C)")
fairfield
age_break_0_85_plus <- c(seq(0, 85, by = 5), Inf)
polymod_contact_data <- get_polymod_setting_data()
polymod_survey_data <- get_polymod_population()
setting_models <- fit_setting_contacts(
contact_data_list = polymod_contact_data,
population = polymod_survey_data
)
synthetic_settings_5y_fairfield <- predict_setting_contacts(
population = fairfield,
contact_model = setting_models,
age_breaks = age_break_0_85_plus
)
fairfield_hh_size <- get_abs_per_capita_household_size(lga = "Fairfield (C)")
fairfield_hh_size
synthetic_settings_5y_fairfield_hh <- predict_setting_contacts(
population = fairfield,
contact_model = setting_models,
age_breaks = age_break_0_85_plus,
per_capita_household_size = fairfield_hh_size
)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.