`rm(list = ls())`

# 30 Adding Demography to Your Network Model

In this lab, you will work to simulate a network-based epidemic model with demography (births and deaths, or another form of arrivals and departures). The specific learning objectives for this lab are to:

- Practice implementing vital dynamics (births and deaths) into a network-based epidemic model;
- Understand the unique contribution of assortative mixing and heterogeneity in activity on epidemic outcomes.

## 30.1 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:

## 30.2 Lab Steps

In the tutorial, we used a `risk`

attribute to define a heterogeneous population that varied in terms of mean degree and propensity for mixing. We then fit two models: one with homogeneity in activity levels and proportional (random) mixing, and one with heterogeneity in activity levels and preferential mixing by risk group. In this lab, you will fit the other two possible models to understand the unique contribution of assortative mixing and heterogeneity in activity on epidemic outcomes.

Change the network parameterization so that you run a model with the same assortative mixing as Model 2 in the tutorial, but no heterogeneity in activity. Use the same epidemic parameters as the tutorial. Run 5-10 simulations of this model, using the

`tergmLite`

approach. Compare visually the outcomes from the model to the two model outcomes in the tutorial.Change the network parameterization so that you run a model with the same heterogeneity in mean degree as Model 2 in the tutorial, but proportional (random) mixing. Use the same epidemic parameters as the tutorial. Run 10 simulations of this model, using the

`tergmLite`

approach. Compare visually the outcomes from the model to the two model outcomes in the tutorial.If time permits, assume that there is disease-induced mortality in your epidemic, by doubling the

`di.rate`

. What change needs to be made to the`dissolution_coefs`

inputs (use a basic estimate for the`d.rate`

)? Run one of the network model paramterizations with heterogeneity in mean degree. Evaluate how disease-induced mortality impacts the overall epidemic trajectory overall, and by risk group. Try plotting some of the other overall variables from the model (arrivals, departures, total population size).

## 30.3 Lab Questions

After you have completed running the models above, please answer the following questions and discuss in your work group.

What is the general relationship between assortative mixing on epidemic outcomes under different conditions of group heterogeneity?

How does disease-induced mortality impact the overall epidemic for the network model with heterogeneity in activity?