57  Introduction

This module is the capstone of NME-II. It is where pieces built separately across the course (extension modules, open populations, age structure, and interventions) assemble into one research-level model of a real pathogen. It is also the course’s main example outside sexually transmitted infections, showing how the same network machinery applies to a respiratory infection spreading through everyday contact. The network parameterization is kept deliberately simple so that attention stays on the new epidemic processes relevant to SARS-CoV-2.

We work through two tutorials. The first adds demography (aging, births, and deaths) to an SEIR model of COVID, including the bookkeeping that arrivals and departures require of an extension model. The second builds a more complex natural history with clinical and subclinical pathways, adds screening and diagnosis, and layers a case isolation intervention on top. Each tutorial is followed by a lab in which you modify the model yourself.

57.1 Module Learning Objectives

  • Implement an EpiModel extension model with demographic change, handling the attribute bookkeeping that births and deaths require.
  • Add a COVID natural history that separates clinical (symptomatic) from subclinical (asymptomatic) infection after exposure.
  • Implement screening and diagnosis, with imperfect test sensitivity and different screening rates by symptom status.
  • Add a case isolation intervention for diagnosed persons, and evaluate its effect on the epidemic.
  • Develop network parameterizations with age mixing, and age-specific natural history and intervention parameters.

57.2 How this module uses control.net

Both tutorials drive the entire simulation through a single large control.net call. The second tutorial passes six module functions (infection.FUN, progress.FUN, dx.FUN, aging.FUN, departures.FUN, and arrivals.FUN), where the Module 9 extension passed two. Two things follow from that scale, and they are what this module adds to your understanding of control.net.

The first is module order, since each module reads the state left by the ones before it. Module 9 established the rule: argument position in the call does not by itself tell you when a module runs, because EpiModel runs every user module (one passed under a name that is not itself an argument of control.net, such as progress.FUN, dx.FUN, and aging.FUN here) before every built-in module slot. The built-in slots include several you never pass, which run on their defaults: network resimulation, nodal-attribute update, and prevalence bookkeeping among them. Here is the consequence worth tracing in this model. Aging is a user module while departures and arrivals are built-in slots, so a node has always aged before the departures module looks up its age-specific mortality rate, and newborns appended by arrivals are not offered to departures until the following step. The rate lookup therefore never sees an age of exactly zero, which matters because ceiling(0) would return 0, and R silently drops index 0 from a vector subscript rather than raising an error. If you ever need a different order, control.net takes a module.order argument.

The second is set.control.tergm, which is genuinely new here and in the Module 7 serosorting model. It passes settings down to the TERGM machinery that redraws the network each step, and these tutorials use it to raise MCMC.burnin.min well above its default of 1000, so the resimulated network is well mixed before statistics are read off it. Note the tutorials use a higher value for the netdx diagnostics than for the epidemic run itself. The remaining settings you will see in these calls have all appeared before: resimulate.network and tergmLite in the open-population models of Module 7, and type = NULL in the first extension model of Module 9. For the argument-by-argument reference, see The control.net Guide.