Skip to contents

This vignette demonstrates how the output of the dynamic yellow fever model functions (see Worked Example 1 - Single Model Run) can be processed using functions in the YEPaux package.

Data is generated as described in Worked Example 1:

library(YEP)
input_data <- readRDS(file=paste(path.package("YEP"),
                                 "/exdata/input_data_example.Rds",sep=""))
model_data <- Model_Run(FOI_spillover = 1.0e-8, R0 = 0.0, vacc_data = input_data$vacc_data[1,,], 
                        pop_data = input_data$pop_data[1,,], years_data, year0 = input_data$years_labels[1],
                        vaccine_efficacy = 1.0, time_inc = 1.0, output_type = "full", mode_start = 1,  
                        start_SEIRV = NULL, mode_time = 0, n_particles = 1, n_threads = 1, deterministic = TRUE)

Values can be quickly combined across age categories by running the convert_model_output_combine_by_age() function from YEPaux:

model_data_ages_combined <- YEPaux::convert_model_output_combine_by_age(model_data)

The model output can be converted to a simple data frame with each line giving age, particle number, date and S, E, I, R and V. This allows the data to be processed using functions from the tidyr package

model_data_frame <- YEPaux::convert_model_output_tidy(model_data)
head(model_data_frame)