content_image/321165.jpg
ω$_{b}$$_{j}$$_{,b}$$_{j}$$_{′}$ between the blocks to which nodes j and j ′ belong. The full likelihood of this model is 

<img src='content_image/321165.jpg'>

where ν$_{jj}$ ′ = θ$_{j}$θ$_{j}$ ′ ω$_{b}$$_{j}$$_{,b}$$_{j}$$_{′}$ . The model assumes that e$_{jj}$ ′ is Poisson distributed (allowing for multiple edges between pairs of nodes), which converges to a simple Bernoulli network for sparse networks in the limit n$_{i}$ → ∞ $^{14}$. The 1/2 terms in the second half of the likelihood account for the fact that self-edges (edges from one node to itself) are counted twice by this indexing. 

In addition to block structure and node degree, networks may vary in the extent to which degrees of adjacent nodes are correlated$^{11}$. One metric for quantifying this property is degree assortativity, which was defined above. Degree assortativity can be varied in the network generating process by performing degree assortative rewiring , which increases or decreases the assortativity in the network while preserving block structure and each node’s degree$^{15,16}$. The details of this algorithm are given in the Appendix. 

## Contagion Process 

We simulate a contagion process operating on the collection of networks 17 by employing a stochastic compartmental SI (susceptible-infectious) model$^{18}$, shown in Algorithm 1. S % of all nodes are initially selected to be affected by the contagion process (capable of transmitting) at random across all study networks i = 1 , ..., m . After initiation, affected node j in network i selects q$_{ij}$ of their k$_{ij}$ neighbors at random and transmit to them with probability p$_{0}$ , where q$_{ij}$ is the node’s affectivity , which may vary between 0 and k$_{ij}$ . Zhou et al. showed that the properties of spreading processes on networks can depend strongly on affectivity$^{19}$. Unit affectivity and degree affectivity occur when an individual attempts to affect either one partner (selected at random) or all partners, respectively. (Illustrative diagrams of the contagion process over time are given in Section 1 of supplementary material.) This process is repeated until B % of the population is affected by contagion, which defines the baseline, or earliest time an infection is assumed to be observed, and can be included in the estimation procedure without risk of bias in the exposure effect estimate. Half of the clusters are exposed ( A$_{i}$ = 1 ) and half unexposed ( A$_{i}$ = 0 ) and the probability of assignment depends on a single confounder. The contagion process continues for T time steps with a probability to infect p$_{0}$ for unexposed clusters and p$_{1}$ for exposed clusters. The contagion process ends at time T . 

