The art of modeling

John M. Drake & Pej Rohani

Why make a model?


Discussion

What can models do?


Discussion

What can models do? My answer(s)


  • Estimation
  • Inference
  • Prediction
  • Scenario analysis
  • Coherence (“sanity check”)
  • Synthesis

Some (proposed) principles


  1. The model is only as good as the data it's based on

  2. A model is just an idea

Exercise: Critique these perspectives

Note: Models can't make up for what we lack in empirical information

Some data

plot of chunk unnamed-chunk-1

Questions

  1. What is the etiological agent?
  2. Is it novel?
  3. What is the spectrum of presentation?
  4. How should cases be treated?
  5. Is a vaccine available?

Where does modeling fit it?


Infectious disease management requires a multi-disciplinary approach

  • Medicine
  • Genetics/Genomics
  • Microbiology
  • Immunology
  • Vaccines & Drugs

Although each of these approaches are important for understanding individual response and clinical care they don't address important questions at the population level

Some population level questions


  • Will this disease invade the population or go extinct?
  • How fast will it grow?
  • When will the epidemic peak?
  • When will it disappear?
  • Is it evolving? If so, why and how fast?
  • Many, many more

Some questions about control


  • How to prevent spatial spread?
  • How to prevent reintroduction?
  • When is it best to implement interventions?
  • How drastic of an intervention is required for containment?
  • Should interventions be general or targeted?
  • What interventions will be most effective?
  • Many, many more

Emerging pathogens vs endemic diseases


Models are appropriate for both emerging and endemic diseases, but depending on the epidemiology may emphasize different aspects of transmission and control.


Emerging pathogens arise in a wholly susceptible population and may exhibit transient trajectories (epidemics) that are far from equilibrium

Endemic pathogens exhibit quasi-stationary behavior

What is a model?


  • A model is an abstract representation of a system
  • A model is the mathematical or computational description of an idea
  • A model is described in terms of its state and processes that result in a change of state
  • In compartmental models, the primary focus of this course, these are often represented by two kinds of variables, referred to as the state variables and the parameters

The art of modeling: Idealization

The relationship between models and reality is one of abstraction and interpretation.

Different kinds of models


Developments in recent years have blurred these categories significantly

  • Statistical (including AI) vs mechanistic
  • Compartmental models
  • Deterministic vs stochastic
  • Agent-based models
  • Network models

Statistical models (including AI)


(Generalized) linear models, nonlinear regression, anova, additive models, multivariate adaptive regression splines, boosted regression trees, convolutional neural nets

\( y = f(x) + \epsilon \)

Mechanistic models


All model terms refer to parts or processes

Compartmental models


Each individual in the population belong to one and only one compartment.

This is the extent to which individuals have attributes. Individuals flow from compartment to compartment.

Deterministic models


States at one time, together with parameters, uniquely determine states at all other times (past and future). Flows are expressed by ordinary differential equations (continuous time) or maps (discrete time).

Stochastic models


States at one time, together with parameters, probabilistically determine states at all other times (past and future).

We distinguish among the concepts of stochasticity, variability, and uncertainty

Agent based models

Computer simulations use the paradigm of object-oriented programming in which attributes (e.g. infection status, location, etc.) are attached to objects (individuals) that belong to declared classes (e.g. hosts).

Network models

Network models seek to reflect realistic contact patters.

Bansal et al. 2007. When individual behaviour matters:homogeneous and network modelsin epidemiology. Journal of the Royal Society Interface 4:879–891

a. Regular random network with 15 nodes

b. Poisson random graph with 15 nodes

c. Scale-free random graph with 100 nodes

d. Zachary Karate Club contact network (Zachary 1977)

e. Sexual network for adolescents in a Midwestern US town

Network models may be approximated with differential equations, solved stochastically using Gillespie's direct method and other approaches, or treated as agent based models where the edges connecting individuals are attributes.

Other model types


  • Time lagged models (renewal equation)
  • McKendrick-von Foerster type models (partial differential equation)
  • Reaction-diffusion models (partial differential equation)

What is a good model?


Choice of model depends on

  1. The purpose for which the model is constructed (estimation, inference, prediction…)
  2. The information (or data) available to inform the model


There is no validation without an objective.

The strategies of model-building in population biology

The strategies of model-building in population biology

“The multiplicity of models is imposed by the contradictory demands of a complex, heterogeneous nature and a mind that can only cope with few variables at a time; by the contradictory desiderata of generality, realism, and precision; by the need to understand and also to control; even by the opposing esthetic standards which emphasize the stark simplicity and power of a general theorem as against the richness and diversity of living nature. These conflicts are irreconcilable. Therefore, the alternative approaches even of contending schools are part of a larger mixed strategy. But the conflict is about method, not nature, for theindividual models, while they are essential for understanding reality, should not be confused with that reality itself.”

Levins, R. 1966. The strategy of model-building in population biology. American Scientist 54:421-431

Numerical tradeoffs


  • Precision/Accuracy

Model complexity (number of state variables, nonlinearity)

Ability to account for observations

Practical tradeoffs


  • Intelligibility

Intelligible to human consumers/decision-makers

  • Flexibility

Adaptability to new scenarios

A pluralistic approach to modeling

Brett T, et al. (2020) Detecting critical slowing down in high-dimensional epidemiological systems. PLoS Comput Biol 16(3): e1007679.

A pluralistic approach to modeling

Study objective: To understand the phenomenon of critical slowing down in systems of different dimension.


Brett T, et al. (2020) Detecting critical slowing down in high-dimensional epidemiological systems. PLoS Comput Biol 16(3): e1007679.

A pluralistic approach to modeling

Brett T, et al. (2020) Detecting critical slowing down in high-dimensional epidemiological systems. PLoS Comput Biol 16(3): e1007679.

Bias and variance

The bias-variance tradeoff

"How" do you make a model?


  • Express concept mathematically (equations, rates of change, etc.)
  • Solve analytically (the general solution) or numerically (specific solutions) – Note: only the simplest models are analytically tractable
  • Ready made software (e.g. ModelMaker, R packages, Berkeley Madonna)
  • “Big” simulators (GLEAM, MOBS, etc.)
  • Note on terminology: simulation vs solution

Recommended resources

  • Anderson & May (1991)
  • Otto & Day (2007)
  • Keeling & Rohani (2008)
  • Vynnycky & White (2010)
  • Diekmann et al. (2012)