@@ -361,25 +361,25 @@ output <- epidemics::model_vacamole(
3613611 . Run the model
362362
363363``` {r, message = FALSE, warning = FALSE}
364- survey_files_2 <- contactsurveys::download_survey(
364+ survey_files_uk <- contactsurveys::download_survey(
365365 survey = "https://doi.org/10.5281/zenodo.3874557",
366366 verbose = FALSE
367367)
368- survey_load_2 <- socialmixr::load_survey(files = survey_files_2 )
368+ survey_load_uk <- socialmixr::load_survey(files = survey_files_uk )
369369
370- contacts_byage_2 <- socialmixr::contact_matrix(
371- survey = survey_load_2 ,
370+ contacts_byage_uk <- socialmixr::contact_matrix(
371+ survey = survey_load_uk ,
372372 countries = "United Kingdom",
373373 age_limits = c(0, 20, 40),
374374 symmetric = TRUE,
375375 return_demography = TRUE
376376)
377377# prepare contact matrix
378- contacts_byage_matrix_2 <- t(contacts_byage_2 $matrix)
378+ contacts_byage_matrix_uk <- t(contacts_byage_uk $matrix)
379379
380380# extract demography vector
381- demography_vector <- contacts_byage_2 $demography$population
382- names(demography_vector) <- rownames(contacts_byage_matrix_2 )
381+ demography_vector <- contacts_byage_uk $demography$population
382+ names(demography_vector) <- rownames(contacts_byage_matrix_uk )
383383
384384# prepare initial conditions
385385initial_i <- 1e-6
@@ -397,12 +397,12 @@ initial_conditions_vacamole <- rbind(
397397 initial_conditions_vacamole,
398398 initial_conditions_vacamole
399399)
400- rownames(initial_conditions_vacamole) <- rownames(contacts_byage_matrix_2 )
400+ rownames(initial_conditions_vacamole) <- rownames(contacts_byage_matrix_uk )
401401
402402# prepare population object
403403uk_population_vacamole <- epidemics::population(
404404 name = "UK",
405- contact_matrix = contacts_byage_matrix_2 ,
405+ contact_matrix = contacts_byage_matrix_uk ,
406406 demography_vector = demography_vector,
407407 initial_conditions = initial_conditions_vacamole
408408)
0 commit comments