Package: conmat 0.0.2.9000

Nicholas Tierney

conmat: Builds contact matrices using GAMs and population data

Builds contact matrices using GAMs and population data. This package incorporates data that is copyright Commonwealth of Australia (Australian Electoral Commission and Australian Bureau of Statistics) 2020.

Authors:Nicholas Tierney [aut, cre], Nick Golding [aut], Aarathy Babu [aut], Michael Lydeamore [aut], Commonwealth of Australia AEC [cph], Australian Bureau of Statistics ABS [cph]

conmat_0.0.2.9000.tar.gz
conmat_0.0.2.9000.zip(r-4.5)conmat_0.0.2.9000.zip(r-4.4)conmat_0.0.2.9000.zip(r-4.3)
conmat_0.0.2.9000.tgz(r-4.4-any)conmat_0.0.2.9000.tgz(r-4.3-any)
conmat_0.0.2.9000.tar.gz(r-4.5-noble)conmat_0.0.2.9000.tar.gz(r-4.4-noble)
conmat_0.0.2.9000.tgz(r-4.4-emscripten)conmat_0.0.2.9000.tgz(r-4.3-emscripten)
conmat.pdf |conmat.html
conmat/json (API)
NEWS

# Install 'conmat' in R:
install.packages('conmat', repos = c('https://idem-lab.r-universe.dev', 'https://cloud.r-project.org'))

Peer review:

Bug tracker:https://github.com/idem-lab/conmat/issues

Datasets:

On CRAN:

contact-matricesinfectious-diseasespopulation-datapublic-health

6.88 score 17 stars 45 scripts 68 exports 78 dependencies

Last updated 3 months agofrom:86a8702ab6. Checks:OK: 1 WARNING: 6. Indexed: yes.

TargetResultDate
Doc / VignettesOKOct 25 2024
R-4.5-winWARNINGOct 25 2024
R-4.5-linuxWARNINGOct 25 2024
R-4.4-winWARNINGOct 25 2024
R-4.4-macWARNINGOct 25 2024
R-4.3-winWARNINGOct 25 2024
R-4.3-macWARNINGOct 25 2024

Exports:%>%abs_abbreviate_statesabs_age_education_lgaabs_age_education_stateabs_age_lgaabs_age_stateabs_age_work_lgaabs_age_work_stateabs_unabbreviate_statesadd_age_partial_sumadd_intergenerationaladd_modelling_featuresadd_offsetadd_population_age_toadd_school_work_participationadd_symmetrical_featuresageage_breaksage_labelage_populationaggregate_predicted_contactsapply_vaccinationas_conmat_populationas_setting_prediction_matrixautoplotclean_term_namesconmat_populationcreate_age_gridestimate_setting_contactsextract_term_namesextrapolate_polymodfit_setting_contactsfit_single_contact_modelgenerate_ngmgenerate_ngm_ozget_abs_household_size_distributionget_abs_household_size_populationget_abs_per_capita_household_sizeget_abs_per_capita_household_size_lgaget_abs_per_capita_household_size_stateget_age_population_functionget_polymod_contact_dataget_polymod_per_capita_household_sizeget_polymod_populationget_polymod_setting_dataget_setting_transmission_matricesgg_age_partial_pred_longgg_age_partial_sumgg_age_terms_settingsmatrix_to_predictionsnew_age_matrixnew_ngm_setting_matrixnew_setting_dataper_capita_household_sizepivot_longer_age_predspolymodpopulationpopulation_labelpredict_contactspredict_contacts_1ypredict_individual_termspredict_setting_contactspredictions_to_matrixprepare_population_for_modellingraw_eigenvaluescalingsetting_prediction_matrixtransmission_probability_matrix

Dependencies:askpassbitbit64cachemclicliprcodetoolscolorspacecountrycodecpp11crayoncurldata.tablediffobjdigestdplyrenglishfansifarverfastmapfurrrfuturegenericsggplot2globalsgluegtablehmshttrisobandjsonlitelabelinglatticelifecyclelistenvlubridatemagrittrMASSMatrixmemoisemgcvmimemunsellnlmeoaiopensslparallellypatchworkpillarpkgconfigplyrprettyunitsprogresspurrrR6RColorBrewerRcppreadrrematch2rlangscalessocialmixrstringistringrsystibbletidyrtidyselecttimechangetzdbutf8vctrsviridisLitevroomwaldowithrwpp2017xml2

Conmat Population Data

Rendered fromconmat-population.Rmdusingknitr::rmarkdownon Oct 25 2024.

Last update: 2023-03-08
Started: 2022-12-23

Data Sources

Rendered fromdata-sources.Rmdusingknitr::rmarkdownon Oct 25 2024.

Last update: 2023-01-17
Started: 2022-09-08

Example Pipeline

Rendered fromexample-pipeline.Rmdusingknitr::rmarkdownon Oct 25 2024.

Last update: 2023-01-20
Started: 2022-09-08

Getting Started

Rendered fromgetting-started.Rmdusingknitr::rmarkdownon Oct 25 2024.

Last update: 2024-06-20
Started: 2021-09-06

Parallel Computing

Rendered fromparallel-computing.Rmdusingknitr::rmarkdownon Oct 25 2024.

Last update: 2023-02-09
Started: 2022-12-23

SIR modelling with conmat

Rendered fromsir-model.Rmdusingknitr::rmarkdownon Oct 25 2024.

Last update: 2023-03-08
Started: 2023-02-07

Using other data sources

Rendered fromother-data-sources.Rmdusingknitr::rmarkdownon Oct 25 2024.

Last update: 2023-03-08
Started: 2022-12-23

Visualisation gallery

Rendered fromvisualising-conmat.Rmdusingknitr::rmarkdownon Oct 25 2024.

Last update: 2023-03-08
Started: 2022-12-23

Readme and manuals

Help Manual

Help pageTopics
Abbreviate Australian State Namesabs_abbreviate_states
Return Australian Bureau of Statistics (ABS) age population data for a given Local Government Area (LGA) or stateabs_age_data abs_age_lga abs_age_state
Return data on educated population for a given age and state or lga of Australia.abs-age-education abs_age_education_lga abs_age_education_state
Return data on employed population for a given age and state or lga of Australiaabs-age-work abs_age_work_lga abs_age_work_state
ABS education data for 2016abs_avg_school
ABS work data for 2016abs_avg_work
ABS education by state for 2006-2020abs_education_state
2020 ABS education population data, interpolated into 1 year bins, by state.abs_education_state_2020
ABS employment by age and LGA for 2016abs_employ_age_lga
ABS household data for 2016abs_household_lga
ABS lookup table of states, lga code and lga nameabs_lga_lookup
ABS population by age for 2016 for LGAsabs_pop_age_lga_2016
ABS population by age for 2020 for LGAsabs_pop_age_lga_2020
ABS state population data for 2020abs_state_age
Un-abbreviate Australian state namesabs_unabbreviate_states
Add column, "intergenerational"add_intergenerational
Add features required for modelling to the datasetadd_modelling_features
Adds offset variablesadd_offset
Add the population distribution for contact ages.add_population_age_to
Add columns describing the fractions of the population in each age group that attend school/work (average FTE)add_school_work_participation
Add symmetrical, age based featuresadd_symmetrical_features
Accessing conmat attributesage age_label age_label.conmat_population age_label.default population population_label population_label.conmat_population population_label.default
Extract age break attribute informationage_breaks age_breaks.array age_breaks.conmat_age_matrix age_breaks.conmat_setting_prediction_matrix age_breaks.default age_breaks.matrix age_breaks.ngm_setting_matrix age_breaks.numeric age_breaks.predicted_contacts age_breaks.setting_contact_model age_breaks.setting_data age_breaks.setting_vaccination_matrix age_breaks.transmission_probability_matrix
Lookup table of age groups in 5 year binsage_group_lookup
Get cleaned population data with lower and upper limits of age.age_population
Aggregate predicted contacts to specified age breaksaggregate_predicted_contacts
Apply vaccination effects to next generation contact matricesapply_vaccination
Convert to conmat populationas_conmat_population as_conmat_population.data.frame as_conmat_population.default as_conmat_population.grouped_df as_conmat_population.list
Coerce object to a setting prediction matrixas_setting_prediction_matrix
Plot setting matrices using ggplot2autoplot-conmat autoplot.conmat_age_matrix autoplot.conmat_setting_prediction_matrix autoplot.ngm_setting_matrix autoplot.setting_vaccination_matrix autoplot.transmission_probability_matrix
Original school demographics for conmatconmat_original_school_demographics
Original work demographics for conmatconmat_original_work_demographics
Define a conmat populationconmat_population
LGA wise ABS education population data on different ages for year 2016data_abs_lga_education
LGA wise ABS work population data on different ages for year 2016data_abs_lga_work
State wise ABS education population data on different ages for year 2016data_abs_state_education
State wise ABS work population data on different ages for year 2016data_abs_state_work
Susceptibility and clinical fraction parameters from Davies et al.davies_age_extended
Get predicted setting specific as well as combined contact matricesestimate_setting_contacts
Fit all-of-polymod model and extrapolate to a given population an age breaksextrapolate_polymod
Transmission probabilities of COVID19 from Eyre et al.eyre_transmission_probabilities
Fit a contact model to a survey populationfit_setting_contacts
Fit a single GAM contact model to a datasetfit_single_contact_model
Calculate next generation contact matricesgenerate_ngm generate_ngm.conmat_population generate_ngm.conmat_setting_prediction_matrix
Calculate next generation contact matrices from ABS datagenerate_ngm_oz
Get household size distribution based on state or LGA nameget_abs_household_size_distribution
Get population associated with each household size in an LGA or a stateget_abs_household_size_population
Get per capita household size based on state or LGA nameget_abs_per_capita_household_size
Get household size distribution based on LGA nameget_abs_per_capita_household_size_lga
Get household size distribution based on state nameget_abs_per_capita_household_size_state
Return an interpolating function for populations in 1y age incrementsget_age_population_function get_age_population_function.conmat_population get_age_population_function.data.frame
Format POLYMOD data and filter contacts to certain settingsget_polymod_contact_data
Get polymod per capita household size.get_polymod_per_capita_household_size
Return the polymod-average population age distribution in 5yget_polymod_population
Get polymod setting dataget_polymod_setting_data
Get Setting Transmission Matricesget_setting_transmission_matrices
Convert a contact matrix as output into a long-form tibblematrix_to_predictions
Build new age matrixnew_age_matrix
Establish new BGM setting datanew_ngm_setting_matrix
Establish new setting datanew_setting_data
Get per capita household size with household size distributionper_capita_household_size
Social contact data from 8 European countries (imported from 'socialmixr')polymod
Polymod Settings modelspolymod_setting_models
Predict contact rate between two age populations, given some model.predict_contacts
Predict contact rate to a given population at full 1y resolutionpredict_contacts_1y
Predict setting contactspredict_setting_contacts
Convert dataframe of predicted contacts into matrixpredictions_to_matrix
Contact matrices as calculated by Prem. et al.prem_germany_contact_matrices
Get raw eigvenvalue from NGM matrixraw_eigenvalue
Get the scaling from NGM matrixscaling
Create a setting prediction matrixsetting_prediction_matrix
Setting weights computed for transmission probabilities.setting_weights
Create a setting transmission matrixtransmission_probability_matrix
Example dataset with information on age based vaccination coverage, acquisition and transmissionvaccination_effect_example_data