custom_data_process_wrapper
custom_data_process_wrapper.Rd
Load, Process, and Optionally Override All Model Input Data
Usage
custom_data_process_wrapper(
iso,
disease,
R0,
cfr_off = T,
year_start = "",
year_end = "",
WHO_seed_switch = TRUE,
aggregate_age = TRUE,
new_age_breaks = c(0, 5, 10, 15, 20, 25, 30, 35, 40, 45, 50, 55, 60, 65, 70, 75, 80,
Inf),
custom_migration = NA,
custom_fertility = NA,
custom_mortality = NA,
custom_population = NA,
custom_contact_matricies = NA,
custom_routine_vaccination = NA,
custom_sia_vaccination = NA,
custom_disease_data = NA,
custom_vaccination_schedule = NA,
custom_disease_parameters = NA,
custom_vaccine_parameters = NA
)
Arguments
- iso
A 3-letter ISO country code identifying the country for analysis (e.g., "ETH" for Ethiopia).
- disease
A character string specifying the disease of interest (e.g., "measles", "diphtheria", "pertussis").
- R0
Numeric scalar or vector specifying the basic reproduction number, defining disease transmissibility.
- cfr_off
Logical; Sets the CFR to zero. Used when calculating current susceptibility as prior mortality rates will already include disease specific mortality.
- year_start
Optional numeric value specifying the first year of the simulation window. Default ("") uses the earliest available data year.
- year_end
Optional numeric value specifying the last year of the simulation window. Default ("") uses the latest available data year.
- WHO_seed_switch
Logical; use WHO-style seeding to replicate historical case-reporting patterns (default TRUE).
- aggregate_age
Logical; aggregate data from single-year age groups into custom intervals (default TRUE).
- new_age_breaks
Numeric vector; breakpoints for age group aggregation. Default is c(0, 5, ..., Inf).
- custom_migration
Optional. Data frame to override default migration data.
- custom_fertility
Optional. Data frame to override default fertility data.
- custom_mortality
Optional. Data frame to override default mortality data.
- custom_population
Optional. Data frame to override default population (total) data.
- custom_contact_matricies
Optional. Data frame to override default contact matrix data.
- custom_routine_vaccination
Optional. Data frame to override default routine vaccination data.
- custom_sia_vaccination
Optional. Data frame to override default SIA vaccination data.
- custom_disease_data
Optional. Data frame to override default disease surveillance data.
- custom_vaccination_schedule
Optional. Data frame to override default vaccination schedule.
- custom_disease_parameters
Optional. Data frame to override default disease parameter values.
- custom_vaccine_parameters
Optional. Data frame to override default vaccine parameter values.
Value
A named list containing structured parameters ready for use in the PREVAIL dynamic transmission model.
Details
This wrapper function loads internal datasets and processes them into structured model input
parameters for a specified country, disease, and vaccine. Compared to data_load_process_wrapper
,
this function allows users to override any internal demographic, vaccination, or disease dataset
with a custom data frame provided through the custom_*
arguments. All data are formatted
appropriately for use in the dynamic transmission model within PREVAIL.
Any custom_*
argument can be used to override the corresponding internal dataset
with a user-supplied data frame. If provided (not NA), these inputs are reformatted as needed
and replace the matching internal dataset for this model run.
If any custom_*
argument is provided, it replaces the corresponding PREVAIL internal dataset for that run.
Demographic custom data is reformatted with reformat_demographic_data
before use.