In this lab, you will work modify the new demographic features of the COVID model to incorporate new features to the network model and epidemic model parameterization. This will provide some additional practice in working with nodal attributes in the context of demographics. The specific learning objectives for this lab are to:

  1. Practice adding and updating a nodal attribute;
  2. Simulating an epidemic model with different forms of age homophily with this new attribute.

Setup

Once you are ready, start out by clearing your R object environment, to make sure that you do not have any objects lingering from the tutorial. This can be accomplished with:

rm(list = ls())

Lab Steps

  1. Start with the model code and module functions from the tutorial, and add a categorical age attribute, age.grp, that classifies everyone based on being an adult (18+) versus a minor (<18). This first should be added as a nodal attribute on the network with set_vertex_attribute. You can create a single binary, 0/1, attribute based on the vector of ages with ifelse.
  2. Edit the module functions to update this age attribute. There will be changes to the aging module (to recalculate age group over time), and the arrivals (birth) module (to append this new attribute as 0 to all incoming births). Add 1 or 2 summary statistics within the modules to validate this new age group approach.
  3. Change the network model parameterization to handle age mixing with this categorical attribute (hint: nodematch instead of absdiff), and pick a target statistic that is reasonable (no right/wrong answers here, but extreme values might cause problems with the model fit).
  4. Run the model with a single simulation to ensure that the simulations are behaving as expected.

Lab Questions

This lab has been more focused on the technical and computational aspects of modeling building. We suggest you review what you have learned so far about model extensions, including the EpiModel API rules.



Last updated: 2022-07-07 with EpiModel v2.3.0