where g is the probability generating function for the degree distribution, p S and p I correspond to the number of contacts of a susceptible that are susceptible or infected, respectively, and θ is defined as probability that a link randomly selected from the entire network has not been associated with the transmission of infection. Here, the closure assumption is implicit in the definition of S; that is, an individual only remains susceptible if all of its links have not seen the transmission of infection, and that the probability is independent for each link, which is comparable to the assumptions underlying the formulation by Ball and Neal [69] , equation (14) . The precise link between this PGF formulation and the pairwise approach is discussed more fully in House and Keeling [134] . There are many other extensions of this general methodology that are possible. Writing ODEs for the time evolution of triples and closing at a higher order allows the consideration of the epidemiological consequences of varying motif structure [98] . Sharkey et al. [135] considered closure at triple level on directed networks, which involved a more sophisticated treatment of third-order clustering due to the larger repertoire of three-motifs in directed (as compared to undirected) networks. It is also possible to combine stochastic and network moment closure [136] . Timevarying, dynamical networks, particularly applied to sexually transmitted infections where partnerships vary over the course of an epidemic, were considered using approximate ODE-based models by Eames and Keeling [137] and Volz and Meyers [138] . Sharkey [139] considered models appropriate for local networks with large shortest path lengths, where the generic indices μ, λ in (21) stand for node numbers i, j rather than node degrees k, l.