# Network dynamics with a nested node set: sociability in seven villages in Senegal

Tom A.B. Snijders, Malick Faye, Julien Brailly

► To cite this version:

Tom A.B. Snijders, Malick Faye, Julien Brailly. Network dynamics with a nested node set: sociability in seven villages in Senegal. Statistica Neerlandica, 2020, pp.1-24. 10.1111/stan.12208. hal-02875027

HAL Id: hal-02875027

https://hal.science/hal-02875027

Submitted on 19 Jun 2020

HAL is a multi-disciplinary open access
archive for the deposit and dissemination of sci-
entific research documents, whether they are pub-
lished or not. The documents may come from
teaching and research institutions in France or
abroad, or from public or private research centers.

L'archive ouverte pluridisciplinaire HAL, est
destinée au dépôt et à la diffusion de documents
scientifiques de niveau recherche, publiés ou non,
émanant des établissements d'enseignement et de
recherche français ou étrangers, des laboratoires
publics ou privés.

<figure><img src="image_1.png" /></figure>

Distributed under a Creative Commons Attribution 4.0 International License
Open Archive Toulouse Archive Ouverte

OATAO is an open access repository that collects the work of Toulouse researchers and makes it freely available over the web where possible

This is a publisher's version published in: https://oatao.univ-toulouse.fr/26001

Official URL:

https://doi.org/10.1111/stan.12208

To cite this version:

Snijders, Tom A.B. and Faye, Malick and Brailly, Julien Network dynamics with a nested node set: sociability in seven villages in Senegal. (2020) Statistica Neerlandica. 1-24. ISSN 0039-0402.
SPECIAL ISSUE ARTICLE

WILEY

# Network dynamics with a nested node set: Sociability in seven villages in Senegal

Tom A.B. Snijders<fnref n="1" />,<fnref n="2" /> | Malick Faye<fnref n="3" /> | Julien Brailly<fnref n="4" />

**Correspondence**

Tom A.B. Snijders, Department of Sociology, Grote Rozenstraat 31, 9712TG Groningen, The Netherlands.

Email: t.a.b.snijders@rug.nl

We propose two complementary ways to deal with a nesting structure in the node set of a network—such a structure may be called a multilevel network, with a node set consisting of several groups. First, within-group ties are distinguished from between-group ties by considering them as two distinct but interrelated networks. Second, effects of nodal variables are differentiated according to the levels of the nesting structure, to prevent ecological fallacies. This is elaborated in a study of two repeated observations of a sociability network in seven villages in Senegal, analyzed using the Stochastic Actor-oriented Model.

**KEYWORDS**

covariates, ecological fallacy, multilayer, multilevel network, nesting, Stochastic Actor-oriented Model, within-group and between-group effects

# 1 | INTRODUCTION

Networks often have more structure than what is expressed by the nodes, the edges, and some covariates. For meaningful modeling, this additional structure may have important things to say. We present an approach for modeling repeated observations of a network on a nested node set, where the subsets of the node set are called “groups.” To take the nesting structure into account in the network analysis, we propose that it is important to pay attention to the distinction between within-group and between-group effects, with respect to effects of network structure as well as of covariates. We shall use the term “ties” to refer to the links, or edges, in the network; we shall always consider directed ties.

This is an open access article under the terms of the Creative Commons Attribution License, which permits use, distribution and reproduction in any medium, provided the original work is properly cited.

© 2020 The Authors. *Statistica Neerlandica* published by John Wiley & Sons Ltd on behalf of VVS.

<footnote n="1">¹University of Groningen, Groningen, The Netherlands</footnote>

<footnote n="2">²University of Oxford, Oxford, UK</footnote>

<footnote n="3">³Centre de Sociologie des Organisations, CNRS, Paris, France</footnote>

<footnote n="4">⁴ENSAT-INP/Université Fédérale de Toulouse, Toulouse, France</footnote>
There are many approaches to statistically modeling dynamics of networks. Wide-ranging overviews are given by Goldenberg, Zheng, Fienberg, and Airoldi (2009), section 2 and Kolaczyk (2009), and a more recent survey is Fritz, Lebacher, and Kauermann (2020) in this issue. Here we give a very brief overview of statistical models for longitudinal network data in the form of repeated observations of networks on a constant node set, each network being represented as a graph or a digraph. For the repeated observations we use the term “waves,” like in panel analysis. We restrict our overview to the case that the number of waves is small (two or a few more), and where covariate effects also are of interest.

An important distinction here is between models assuming a continuous-time underlying process (even though there are only few waves), and those based on a discrete-time model. Using a continuous-time model for network panel data was proposed by Holland and Leinhardt (1977). This idea was taken up by Wasserman (1980). Snijders (2001) proposed the Stochastic Actor-oriented Model, a continuous-time model, of which an overview is given in Snijders (2017). Another continuous-time model is the Longitudinal Exponential Random Graph Model of Koskinen and Snijders (2013). Discrete-time models were proposed, as autoregressive longitudinal extensions of the Exponential Random Graph Model (Lusher, Koskinen, & Robins, 2013), by Robins and Pattison (2001), Hanneke, Fu, and Xing (2010), and Krivitsky and Handcock (2014). The difference between a continuous-time approach and an autoregressive discrete-time approach is elaborated by Block, Koskinen, Hollway, Steglich, and Stadtfeld (2018). Latent variable models have also been proposed, of which dynamic stochastic block models are a special case; an overview is given by Kim, Lee, Xue, and Niu (2018). A continuous-time extension of the stochastic block model was proposed by Matias, Rebafka, and Villers (2018).

This article proposes ways to deal with a nested (“grouped”) structure in the node set of the network, and elaborates this using the Stochastic Actor-oriented Model. Two modeling principles are presented.

First, within-group ties are considered to be essentially different from between-group ties, and therefore represented by separate networks; this leads naturally to what might be called a multivariate or multilayer network. Multilayer networks have recently received a lot of attention; rich reviews are Boccaletti et al. (2014) and Kivelä et al. (2014). An extension of the Stochastic Actor-oriented Model to the case of multivariate networks was proposed by Snijders, Lomi, and Torló (2013).

Second, following well-known analytical principles in multilevel analysis and related to the ecological fallacy (Robinson, 1950), it is recognized that actor variables used as covariates may have different substantive meanings at different levels of analysis, and accordingly the model should contain a distinction between between-group and within-group coefficients.

These modeling principles are applied in an analysis of a network panel dataset, with two waves, of social relations in seven villages in rural Senegal.

In Section 2, we elaborate these modeling principles and the plan for the article. Section 3 introduces the case of seven villages in Senegal. The model is explained in Section 4, and Section 5 presents the results. The article ends with a discussion in Section 6.

## 2 | NETWORKS WITH A NESTED NODE SET

In this section, we elaborate the two modeling principles, mentioned above, for analyzing a network with a nested node set. For the sake of concreteness, we shall already employ some of the specifics of the dataset further described in Section 3.
The data are constituted by two repeated observations of a social network with a node set containing four levels of nesting: individuals, in households, in compounds, and in villages. The compound is an extended family of several households living closely together. Of these levels, the village level is mainly important for the network structure, while the other levels are important for moderating the effects of covariates.

## 2.1 | Within- and between-group ties

In the nesting structure defined by the villages, the groups are the villages. Social relations between inhabitants of different villages are of a different nature than between inhabitants of the same village. They require more effort to establish and maintain, are fewer in number, and may serve different purposes. This could be represented in the model by interactions of various effects with a dyadic dummy variable differentiating between-village from within-village contacts. This would lead, however, to a very large list of interaction effects. A more transparent analysis is obtained by representing within-village and between-village relations as two distinct but interdependent networks, with a common node set and disjoint edge sets: a multivariate or multilayer network

As our basic network variable we have one directed graph where the node set consists of all individuals. Each individual is inhabitant of precisely one village; suppose that the node set is ordered by village. The within-village network W is defined as the directed graph restricted to the pairs of inhabitants of the same village; and the between-village network B as the directed graph restricted to the pairs of inhabitants of different villages.

The adjacency matrix of the within-village network is composed of diagonal blocks $W_h$ and structurally zero off-diagonal blocks, as in Table 1. The adjacency matrix of the between-village network is composed of off-diagonal blocks $B_{hk}$ for $h \neq k$ and structurally zero diagonal blocks, as in Table 2.

The sum $B + W$ of these two adjacency matrices is the adjacency matrix of the original network.

This can be treated as a multivariate network $Y = (B, W)$, when the structural zero blocks are respected and no ties are allowed in them. The dynamic model used for this multivariate network will further be explained in Section 4.

<table><caption>TABLE 1 Within-village block structure for network W for seven villages</caption><thead><tr><th></th><th>V<sub>1</sub></th><th>V<sub>2</sub></th><th>V<sub>3</sub></th><th>V<sub>4</sub></th><th>V<sub>5</sub></th><th>V<sub>6</sub></th><th>V<sub>7</sub></th></tr></thead><tbody><tr><th>V<sub>1</sub></th><td>W<sub>1</sub></td><td>0</td><td>0</td><td>0</td><td>0</td><td>0</td><td>0</td></tr><tr><th>V<sub>2</sub></th><td>0</td><td>W<sub>2</sub></td><td>0</td><td>0</td><td>0</td><td>0</td><td>0</td></tr><tr><th>V<sub>3</sub></th><td>0</td><td>0</td><td>W<sub>3</sub></td><td>0</td><td>0</td><td>0</td><td>0</td></tr><tr><th>V<sub>4</sub></th><td>0</td><td>0</td><td>0</td><td>W<sub>4</sub></td><td>0</td><td>0</td><td>0</td></tr><tr><th>V<sub>5</sub></th><td>0</td><td>0</td><td>0</td><td>0</td><td>W<sub>5</sub></td><td>0</td><td>0</td></tr><tr><th>V<sub>6</sub></th><td>0</td><td>0</td><td>0</td><td>0</td><td>0</td><td>W<sub>6</sub></td><td>0</td></tr><tr><th>V<sub>7</sub></th><td>0</td><td>0</td><td>0</td><td>0</td><td>0</td><td>0</td><td>W<sub>7</sub></td></tr></tbody></table>
<table><caption>TABLE 2 Between-village block structure for network *B* for seven villages</caption><thead><tr><th></th><th>V<sub>1</sub></th><th>V<sub>2</sub></th><th>V<sub>3</sub></th><th>V<sub>4</sub></th><th>V<sub>5</sub></th><th>V<sub>6</sub></th><th>V<sub>7</sub></th></tr></thead><tbody><tr><th>V<sub>1</sub></th><td>0</td><td>B<sub>12</sub></td><td>B<sub>13</sub></td><td>B<sub>14</sub></td><td>B<sub>15</sub></td><td>B<sub>16</sub></td><td>B<sub>17</sub></td></tr><tr><th>V<sub>2</sub></th><td>B<sub>21</sub></td><td>0</td><td>B<sub>23</sub></td><td>B<sub>24</sub></td><td>B<sub>25</sub></td><td>B<sub>26</sub></td><td>B<sub>27</sub></td></tr><tr><th>V<sub>3</sub></th><td>B<sub>31</sub></td><td>B<sub>32</sub></td><td>0</td><td>B<sub>34</sub></td><td>B<sub>35</sub></td><td>B<sub>36</sub></td><td>B<sub>37</sub></td></tr><tr><th>V<sub>4</sub></th><td>B<sub>41</sub></td><td>B<sub>42</sub></td><td>B<sub>43</sub></td><td>0</td><td>B<sub>45</sub></td><td>B<sub>46</sub></td><td>B<sub>47</sub></td></tr><tr><th>V<sub>5</sub></th><td>B<sub>51</sub></td><td>B<sub>52</sub></td><td>B<sub>53</sub></td><td>B<sub>54</sub></td><td>0</td><td>B<sub>56</sub></td><td>B<sub>57</sub></td></tr><tr><th>V<sub>6</sub></th><td>B<sub>61</sub></td><td>B<sub>62</sub></td><td>B<sub>63</sub></td><td>B<sub>64</sub></td><td>B<sub>65</sub></td><td>0</td><td>B<sub>67</sub></td></tr><tr><th>V<sub>7</sub></th><td>B<sub>71</sub></td><td>B<sub>72</sub></td><td>B<sub>73</sub></td><td>B<sub>74</sub></td><td>B<sub>75</sub></td><td>B<sub>76</sub></td><td>0</td></tr></tbody></table>

## 2.2 | Within-group and between-group regressions

In a social context such as a classroom, a school, a neighborhood, or a family, individual attributes will have a distinct meaning from such attributes aggregated to the social context. For example, the ability of a student and the average ability of all students in a given classroom are distinct variables with distinct consequences. Neglecting this distinction is called the ecological fallacy (Robinson, 1950), discussed at length by the sociologists Lazarsfeld and Menzel (1961). Davis, Spaeth, and Huson (1961) proposed to deal with this simply, for a given individual-level variable *X* where individuals are nested in groups, by defining the contextual variable $\bar{X}$ as the mean of *X* for all individuals in the given group and using *X* and $\bar{X}$ together as explanatory variables in a regression analysis. An equivalent alternative is to use $\bar{X}$ together with the within-group deviation *X* - $\bar{X}$. In more modern methodological practice, it is common to do this not in an OLS regression model, but in a hierarchical linear model that contains random terms at both the individual and the group (contextual) level; see, for example, Neuhaus and Kalbfleisch (1998) and Snijders and Bosker (2012).

In our case, this issue is relevant especially for the three lowest levels: individuals, household, and compound. An important individual attribute is wealth. For wealth, the meaningful aggregation is not by averaging but by adding, and the aggregate then is total wealth at the household or compound level. If the wealth of individual *i* in household *j* in compound *k* is denoted $X_{ijk}$, the aggregate variables are household wealth and compound wealth,

$$ \tilde{X}_{+jk} = \sum_{i} X_{ijk} \quad \text{and} \quad \tilde{X}_{++k} = \sum_{i,j} X_{ijk}. \qquad (1) $$

## 3 | SEVEN SENEGALESE VILLAGES

We present the analysis of a longitudinal multilevel network in a case study of data, collected in 2010 and 2016, about sociability relations between adult inhabitants of seven villages in North-West Senegal, a rural region. See Faye (2011, 2013a, 2013b) and Brailly and Faye (2015) for further information.

The main substantive research questions are, first, how the structure of within-village relations differs from the structure of between-village relations, and how these two are connected;
second, how the wealth of the villagers plays a different role for the relations dependent on whether the wealth is considered at the individual, the household, or the compound level; third, how the pattern of relations is influenced by sex, age, and ethnicity of the inhabitants. The distance between compounds is another important variable, associated with the nesting levels, and therefore important to take into account.

The seven villages are near each other and share a common water resource. They are inhabited by two ethnic groups: Wolof, who are mainly peasants; and Fulani, who are transhumant or semi-nomads. Two villages are inhabited exclusively by Fulani, and two exclusively by Wolof. Three others villages are mainly Wolof, but include also some Fulani families. These ethnic groups have different languages, but most will also understand the other language.

The population structure is characterized by a majority of children, women, and elderly men. This is explained by the high rate of emigration, with many men working temporarily outside the village, often abroad. It was attempted to include all inhabitants of age 15 years and over in the survey, but this was not entirely possible because of prolonged absence of part of the population, especially younger men.

**3.1 | Data collection**

The first wave of data was collected between November 2009 and March 2010. For practical reasons, adults (individuals over 15 years of age) who were not emigrants were interviewed. A response rate of 70% (460 responses) was achieved despite the periodic absence of many of the male inhabitants.

**3.1.1 | Network**

The network survey was based on a number of name generators. For this article, a tie from the respondent to the nominee was supposed to exist if the nominee was included in the answers to at least one of the following questions.

* Loans. If you have an urgent need to buy a good or service, and you do not have the money for it, whom in the village community will you ask to lend you money?

* Advice. If you need advice on an important decision in your life, whom in the village community will you consult?

* Assistance. If you are ill, from whom in the village community will you seek help to assist and/or take care of yourself?

* Discussions. Most people discuss important topics with others. Apart from public discussions (in the village square, in the house yard, etc.), with whom in the village community have you recently discussed topics of importance to you?

* Visits. Can you name the people in the village community whom you regularly visit?

These name generators, common to many sociability surveys (Marsden, 2011), are essential regular exchanges for members of this community. We define the relation defined in this way as a *sociability relation*.
<table><caption>**TABLE 3** Mean, SD, minimum, and maximum of covariates</caption><thead><tr><th></th><th>Mean</th><th>SD</th><th>Min</th><th>Max</th></tr></thead><tbody><tr><td>Sex male</td><td>0.33</td><td></td><td></td><td></td></tr><tr><td>Ethnicity Wolof</td><td>0.74</td><td></td><td></td><td></td></tr><tr><td>Age (years)</td><td>40.9</td><td>18.0</td><td>13</td><td>87</td></tr><tr><td>Log distance</td><td>-0.16</td><td>1.29</td><td>-5.81</td><td>1.09</td></tr><tr><td>Log wealth personal</td><td>3.11</td><td>0.52</td><td>1.79</td><td>3.81</td></tr><tr><td>Log wealth household</td><td>4.43</td><td>0.55</td><td>3.00</td><td>5.19</td></tr><tr><td>Log wealth compound</td><td>5.53</td><td>0.72</td><td>3.40</td><td>6.62</td></tr></tbody></table>

The second wave of data collection took place in February and March 2016. Due to death, emigration, or transhumance, not everybody could be interviewed.

The data used is the network of all 406 individuals who were interviewed in both waves. Within-village outdegrees ranged from 0 to 21, and their means in the two waves were 6.0 and 4.1; between-village outdegrees ranged from 0 to 14, with means 0.8 and 0.7. The individuals lived in 135 households, and these were grouped in 54 compounds.

### 3.1.2 | Covariates

Several individual-level variables were collected including sex, age, and ethnic group. Wealth was defined as the aggregate of the value of cattle, harvest, and machines. Before adding, a few outliers were truncated, and the values were log-transformed. The locations of the houses were geocoded, and from this the distances in kilometers were calculated. These also were log-transformed. Descriptive statistics are given in Table 3.

## 4 | STOCHASTIC ACTOR-ORIENTED MODEL

After splitting the network in the within-village and the between-village networks, as discussed in Section 2.1, our data can be represented as two repeated observations ($W(t_1)$, $B(t_1)$), ($W(t_2)$, $B(t_2)$) of the within-village and between-village networks. These are modeled here by the multivariate version of the Stochastic Actor-oriented Model (“SAOM”) (Snijders et al., 2013).

This model is generally explained in Snijders (2017). We give here a concise overview of the model for the case of two repeated observations (“waves”). In view of the social science applications, nodes are called *actors*.

We consider a multivariate network $Y(t) = (Y^{(1)}(t), \dots, Y^{(K)}(t))$, where $Y^{(k)}(t)$ are adjacency matrices with elements $Y_{ij}^{(k)}(t)$, and $t$ is time. Observations are available for $t = t_1, t_2$ with $t_1 < t_2$.

The label $k$ indicates the network, and $i$ and $j$ are the sender and receiver of the tie $i \to j$. Indicator variable $Y_{ij}^{(k)}(t)$ is equal to 1 if the tie $i \to j$ exists, and 0 otherwise. Sender and receiver are also called “ego” and “alter,” respectively. Self-loops are excluded, so that $Y_{ii}^{(k)}(t) \equiv 0$. It is assumed that there is an unobserved stochastic process ($Y(t)$; $t_1 \le t \le t_2$) of which $Y(t_1)$ and $Y(t_2)$ are observations, and it is assumed that $Y(t)$ develops according to a continuous-time Markov process. The SAOM is built on two fundamental simplifying restrictions and parametric assumptions for the Markov process.
The first basic simplifying restriction is that at each time point $t \in (t_1, t_2)$, if there is a change at time $t$, only one of all the tie variables $Y_{ij}^{(k)}$ can change. This simplifies the definition of the transition process for the whole system $Y(t)$ to the definition of the conditional probabilities of changes in single tie variables. This restriction was proposed by Holland and Leinhardt (1977). The second basic assumption is that tie changes are organized by dependent networks $k$ and by actors $i$, hence the name “actor-oriented model.” Tie changes are modeled as choices between changes in the outgoing ties of a given actor $i$ in a given network $k$. This approach was proposed by Snijders (2001) (for the actors) and Snijders et al. (2013) (for the multivariate networks) and expresses the heuristic idea that actors have control over their outgoing ties, and tie changes reflect choices made by actors. The change probabilities will depend on the actor's neighborhood in all the networks simultaneously.

We characterize the transition distribution of the stochastic process by a simulation algorithm and by the transition intensity matrix, or Q-matrix (Norris, 1997). This is done on the basis of the rate functions $\lambda_i^k(y; \rho)$, which indicate the rate at which opportunities occur for change for actor $i$ in network $k$, and the evaluation functions $f_i^k(y; \beta)$. A higher value of $f_i^k(y; \beta)$ compared with $f_i^k(y'; \beta)$ indicates that, when actor $i$ could make a change in network $k$ to $y$ or to $y'$ (and perhaps other values), the probability of changing to $y$ is higher than that of changing to $y'$. The parameters of the model are $\rho$ and $\beta$. Heuristically, the evaluation function can be characterized as indicating the value that $i$ attaches to the combined network state $y$ in the event of contemplating a change in network $k$. It is similar to a utility function but applying to network $k$ only, and can be interpreted as the short-term balance of goals and restrictions.

A further aspect of the model is that a restriction may be given for the set of tie variables that is allowed to change. For all $k$ and $i$, subsets $N(k, i)$ are defined such that $N(k, i) \setminus \{i\}$ is the set of actors $j$ for which the tie variable $Y_{ij}^{(k)}$ can change. For the convenience of notation below, always $i \in N(k, i)$.

It will be convenient to have a notation for the network that results from a given tie change. Given a multivariate network $y$, a network index $k$, and actors $i, j$, we denote by $y^{(k \pm ij)}$ the multivariate network that results from $y$ by changing tie variable $y_{ij}^k$ to $1 - y_{ij}^k$. Formally, we denote $y^{(k \pm ii)} = y$.

Summation over an index is denoted by replacing this index by a $+$. The simulation algorithm proceeds as follows. For convenience we set $t_1 = 0, t_2 = 1$. For concise notation, we drop the dependence on parameters $\rho$ and $\beta$.

1. Start with $Y(t)$ and $t = 0$.

2. Generate $\Delta t$ as a random draw from the exponential distribution with parameter $\lambda_+^+(y)$.

3. Choose network $k$ with probability

$$ \frac{\lambda_+^k(y)}{\lambda_+^k(y)}. \qquad (2) $$

4. Choose actor $i$ with probability

$$ \frac{\lambda_i^k(y)}{\lambda_+^k(y)}. \qquad (3) $$

5. Choose actor $j \in N(k, i)$ with probability

$$ p_i^{(k)}(j|y) = \frac{\exp\{f_i^k(y^{(k \pm ij)})\}}{\sum_{h \in N(k,i)} \exp\{f_i^k(y^{(k \pm ih)})\}}. \qquad (4) $$
6. Replace $t$ by $\min\{t + \Delta t, 1\}$. If $j \neq i$ and $t + \Delta t < 1$ replace $y$ by $y^{(k \pm ij)}$.

7. If $t < 1$, go to Step 2.

For interpreting the probabilities (4), it is instructive to see that they can be rewritten as functions of the change in the evaluation function,

$$p_i^{(k)}(j|y) = \frac{\exp\{f_i^k(y^{(k \pm ij)}) - f_i^k(y)\}}{\sum_{h \in N(k,i)} \exp\{f_i^k(y^{(k \pm ih)}) - f_i^k(y)\}}.$$

This simulation model corresponds to a transition matrix, or Q-matrix, for the Markov process defined as follows.

$$q(y, y') = \begin{cases} \lambda_i^{(k)}(y) p_i^{(k)}(j|y) & \text{if } y' = y^{(k \pm ij)}, j \in N(k, i), j \neq i \\ 0 & \text{if there are no such } k, i, j. \end{cases} \quad (5)$$

In this article, the rate functions are constant, $\lambda_i^k(y; \rho) = \rho_k$. In many applications this is reasonable because individual tie changes are not observed. The evaluation functions are specified as linear combinations

$$f_i^k(y; \beta) = \sum_{\ell} \beta_{\ell}^{(k)} s_{i\ell}^{(k)}(y), \quad (6)$$

where the $s_{i\ell}^{(k)}(y)$ are statistics depending on the neighborhood of actor $i$ in the multivariate network $y$, and on covariates, if these are included in the model. These statistics are called effects. This makes $f_i^k(y; \beta)$ the linear predictor in generalized linear model (4). If an effect $s_{i\ell}^{(k)}(y)$ depends only on $y^{(k)}$, it expresses internal dependence of network $k$; if it also depends on one or more of the other networks, it expresses cross-network dependence. Examples follow below.

## 4.1 | Estimation

Estimation in this model is conditional on $y(t_1)$. For this article, estimation was done by the method of moments ("MoM"); this is explained in Snijders (2001, 2017), and sketched below. Maximum likelihood estimation is also possible (Snijders, Koskinen, & Schweinberger, 2010), but would be too time consuming for this large dataset.

Denote the parameter by $\theta = (\rho, \beta)$. We treat the MoM only for the case of two waves, two dependent networks, and a constant rate function $\lambda_i^{(k)}(y) = \rho^{(k)}$. The dependent variable is the pair of networks $Y(t) = (Y^{(1)}(t), Y^{(2)}(t))$, observed for $t = t_1, t_2$. The MoM estimate is defined, for a suitable statistic $z(y(t_1), y(t_2))$, as the solution $\hat{\theta}$ of

$$E_{\hat{\theta}}\{z(Y(t_1), Y(t_2)) | Y(t_1) = y(t_1)\} = z(y(t_1), y(t_2)). \quad (7)$$

The vector $z(y(t_1), y(t_2))$ has the same dimensionality as $\theta$; to each one-dimensional parameter in $\theta$ corresponds one one-dimensional statistic. Suitable statistics $z$ can be chosen as follows (Snijders, 2001; Snijders et al., 2013). Corresponding to $\rho^{(k)}$ is the observed number of changes

$$\sum_{i,j} |y_{ij}^{(k)}(t_2) - y_{ij}^{(k)}(t_1)|. \quad (8a)$$
For each effect $s_{i\ell}^{(k)}(y)$ that depends only on the dependent network in question, $y^{(k)}$, the statistic is the aggregate value at $t_2$,

$$ \sum_i s_{i\ell}^{(k)}(y(t_2)). \qquad (8b) $$

For each effect $s_{i\ell}^{(k)}(y)$ that depends on both networks, and which therefore can be written as $s_{i\ell}^{(k)}(y^{(k)}, y^{(h)})$ for $h \neq k$, the statistic is the cross-lagged aggregate where the dependent network is taken at $t_2$ and the explanatory network at $t_1$,

$$ \sum_i s_{i\ell}^{(k)}(y^{(k)}(t_2), y^{(h)}(t_1)). \qquad (8c) $$

A generalized MoM estimator that also uses the contemporaneous statistics $(y^{(k)}(t_2), y^{(h)}(t_2))$ is proposed in Amati, Schönenberger, and Snijders (2019).

The solution of the MoM equation can be approximated by stochastic approximation (multivariate Robbins-Monro algorithm); further references are in Snijders (2017). The covariance matrix of $\hat{\theta}$ can be approximated according to the method of Schweinberger and Snijders (2007). These procedures are implemented in the R package RSiena (R Core Team, 2020; Ripley, Snijders, Bóda, Vörös, & Preciado, 2020). This includes a convergence check based on the so-called maximum convergence ratio, defined as a multivariate deviation of the Monte Carlo approximation for the left-hand side of (7) from the right-hand side. The rule of thumb is that for good convergence, this ratio should be less than 0.25.

It may be assumed that the estimator $\hat{\theta}$ has an approximate multivariate normal distribution with expected value very close to $\theta$, and that the estimator of the covariance matrix is consistent. No proof is available, but this is supported by intuition and by many simulation results. Accordingly, hypotheses of the type $A\theta = 0$ for an $r \times p$ matrix A can be tested by referring $(A\hat{\theta})'(A\hat{\Sigma}A')^{-1}A\hat{\theta}$ to a chi-squared distribution with $r$ degrees of freedom, where $\hat{\Sigma}$ is the estimated covariance matrix of $\hat{\theta}$.

## 4.2 | Specification of the nested data structure

In our case we have $K = 2$ networks, the within-village network W and the between-village network B. These will be indicated by $k = W$ and $k = B$; these letters will also be used in various places in the text to distinguish the networks. The use of structural zeros, mentioned above, is implemented by the definitions of the sets $N(k, i)$:

$$ N(W, i) = \{jlj \text{ lives in the same village as } i\} \qquad (9) $$

$$ N(B, i) = \{j|j \text{ lives in a different village than } i\} \cup \{i\} \qquad (10) $$

together with the rule that $Y_{ij}^{(k)}(t) = 0$ for all $j \notin N(k, i)$ and all $t$.
## 4.3 | Model specification

For the specification of the evaluation function, we follow what currently is considered good practice in applications of the SAOM (see Ripley et al., 2020). This requires effects depending on degrees, reciprocation, transitivity, and covariates. In first instance, the following effects were included.

### 4.3.1 | Single structural network effects

First we give the effects $s_{i\ell}^{(k)}(y)$ depending only on network $k$, representing internal dependence of this network. For a simpler typography, we drop the superscript ($k$). The effects aim to represent local patterns in the network neighborhood of the actors: number of ties, number of reciprocated ties, triadic patterns, and in- and out-degrees.

* The outdegree effect

$$ \sum_j y_{ij} \qquad (11) $$

is like an intercept, balancing between the creation and termination of ties. For sparse networks, it usually is negative because many more ties could be created than could be terminated.

* The reciprocity effect

$$ \sum_j y_{ij} y_{ji} $$

reflects the tendency to reciprocate ties.

* Transitivity is represented by the gwesp statistic, “geometrically weighted edgewise shared partners,” introduced for Exponential Random Graph Models by Snijders, Pattison, Robins, and Handcock (2006) and Handcock and Hunter (2006). It is defined by

$$ \sum_{j=1}^{n} y_{ij} e^{\alpha} \{1 - (1 - e^{-\alpha})^{\text{TP}_{ij}(y)}\}, $$

where

$$ \text{TP}_{ij}(y) = \sum_{h} y_{ih} y_{hj}, $$

the number of twopaths from $i$ to $j$. With a positive coefficient $\beta_{\ell}$, this effect implies that the existence of twopaths, that is, indirect connections $i \to h \to j$, increases the probability of creating the tie $i \to j$. This function is a concave increasing function of $\text{TP}_{ij}(y)$, representing that the effect of the number of connecting twopaths on the log-probability of a tie between two nodes is sublinear. The degree of concavity is determined by the parameter $\alpha$, which may be fixed or estimated. Here we use $\alpha = \ln(2)$.
* The outdegree-activity effect

$$ \sum_j y_{ij} y_{i+} \quad \text{or} \quad \sum_j y_{ij} \sqrt{y_{i+}} $$

represents the extent to which a currently high outdegree $y_{i+}$ of actor i promotes the further creation and maintenance of outgoing ties of i. The two forms, with and without the square root, may be used dependent on what provides the better fit.

* The indegree-popularity effect, also in two forms,

$$ \sum_j y_{ij} y_{+j} \quad \text{or} \quad \sum_j y_{ij} \sqrt{y_{+j}} $$

represents the extent to which a currently high indegree $y_{+j}$ of actor j promotes the probability for other actors i to send ties to j.

* The indegree-activity effect, in two forms again,

$$ \sum_j y_{ij} y_{+i} \quad \text{or} \quad \sum_j y_{ij} \sqrt{y_{+i}} $$

represents the extent to which a currently high indegree of actor i promotes the further creation and maintenance of outgoing ties of i.

* According to Block (2015), it is important to consider the interaction between reciprocity and transitivity. Given that transitivity is represented by the gwesp effect, this interaction is given by

$$ \sum_{j=1}^{n} y_{ij} y_{ji} e^{\alpha} \{1 - (1 - e^{-\alpha})^{TP_{ij}(y)}\}. $$

The outdegree-activity and indegree-popularity effects are feedback effects, with consequences for the outdegree variance and the indegree variance, respectively.

### 4.3.2 | Covariates

* For a dyadic covariate with values $v_{ij}$, the effect is

$$ \sum_j y_{ij} v_{ij}. $$

Actor covariates X with values $x_i$ have to be transformed to a dyadic covariate. Calling the sender of the tie “ego” and the receiver “alter,” basic transformations are $v_{ij} = x_i$, corresponding to the “ego effect,” and $v_{ij} = x_j$, for the “alter effect.” A well-known fundamental network mechanism is homophily, the tendency of ties to be created with a higher probability between similar
actors (McPherson, Smith-Lovin, & Cook, 2001). For a categorical actor variable, this is obtained from the transformation $v_{ij} = I\{x_i = x_j\}$, where I is the indicator function.

For a numerical actor variable X a possible transformation representing homophily is $v_{ij} = (x_i - x_j)^2$ (expecting a negative parameter $\beta_\ell$). Snijders and Lomi (2019) proposed to consider general quadratic functions of $x_i$ and $x_j$, which leads to five choices for $v_{ij}$, defined by the five transformed variables

$$x_i, x_j, (x_i - x_j)^2, x_i^2, x_j^2. \qquad (12)$$

These are called, respectively, the ego, alter, difference squared, ego squared, and alter squared effects of X. Their linear combinations may represent, for ego i and alter j, homophily (attraction to j with ego's own value), attractiveness of alters j depending on their value $x_j$, differential propensity of egos to create ties depending on their value $x_i$, attraction to j with some given value, and combinations of these. This five-parameter family can be extended or reduced depending on empirical fit.

All covariates were centered in the analysis by subtracting the overall mean.

### 4.3.3 | Multivariate network effects

Multivariate network dependencies were discussed in Snijders et al. (2013). In our case, a pair $(i, j)$ cannot simultaneously have a tie in network W as well as B; this excludes the need for effects expressing direct tie-level dependencies. The multivariate network effects $s_{i\ell}^{(k)}(y)$ considered in this article are the following. These are effects in the evaluation function $f_i^k(y; \beta)$ for network k, so that k is the “dependent network.” It is always assumed here that $h \neq k$, so that h is the “explanatory network.” The first four effects are mixed degree effects.

* The mixed outdegree effect, or mixed outdegree activity,

$$\sum_j y_{ij}^{(k)} y_{i+}^{(h)} \quad \text{or} \quad \sum_j y_{ij}^{(k)} \sqrt{y_{i+}^{(h)}}$$

represents, if its parameter $\beta_\ell$ is positive, that higher outdegrees in network h will lead to higher outdegrees also in network k. Whether the square root is used will depend on what gives the better fit.

* The mixed indegree effect, or mixed indegree popularity,

$$\sum_j y_{ij}^{(k)} y_{+j}^{(h)} \quad \text{or} \quad \sum_j y_{ij}^{(k)} \sqrt{y_{+j}^{(h)}}$$

represents, if parameter $\beta_\ell$ is positive, that higher indegrees in network h will lead to higher indegrees also in network k.

* Analogous are the mixed indegree activity effect

$$\sum_j y_{ij}^{(k)} y_{+i}^{(h)} \quad \text{or} \quad \sum_j y_{ij}^{(k)} \sqrt{y_{+i}^{(h)}}$$

representing the effect of h-indegrees on k-outdegrees;
* and the mixed outdegree popularity effect

$$ \sum_j y_{ij}^{(k)} y_{j+}^{(h)} \quad \text{or} \quad \sum_j y_{ij}^{(k)} \sqrt{y_{j+}^{(h)}} $$

representing the effect of *h*-outdegrees on *k*-indegrees.

The next four effects are different versions of mixed triadic closure, or transitivity. We give only the specification which is linear in the number of twopaths in network *h*; concave functions, as in the gwesp effect, might also be possible but are not applied here.

* The same *h*-choices effect

$$ \sum_{jr} y_{ij}^{(k)} y_{ir}^{(h)} y_{jr}^{(h)} $$

represents the effect of the overlap between *i* and *j* in their choices in network *h* to a connection $i \xrightarrow{k} j$ in network *k*.

* The mixed $h \Rightarrow k$ closure effect

$$ \sum_{jr} y_{ij}^{(k)} y_{ir}^{(h)} y_{rj}^{(h)} $$

represents a mixed version of transitivity: indirect connections (two-paths) $i \xrightarrow{h} r \xrightarrow{h} j$ in network *h* may lead to connections $i \xrightarrow{k} j$ in network *k*.

* Another mixed triadic effect, the mixed $h-k \Rightarrow k$ closure effect

$$ \sum_{jr} y_{ij}^{(k)} y_{ir}^{(h)} y_{rj}^{(k)} $$

represents that mixed two-paths $i \xrightarrow{h} r \xrightarrow{k} j$ may lead to connections $i \xrightarrow{k} j$.

* In the other order, the mixed $k-h \Rightarrow k$ closure effect

$$ \sum_{jr} y_{ij}^{(k)} y_{ir}^{(k)} y_{rj}^{(h)} $$

represents that mixed two-paths $i \xrightarrow{k} r \xrightarrow{h} j$ may lead to connections $i \xrightarrow{k} j$.

In our case, not all combinations are relevant. For example, $W \Rightarrow B$ closure is logically impossible.

## 4.4 | Model selection procedure

For the SAOM, there is a limit to the complexity of models for which estimation is feasible. Therefore, backward model selection is impossible. Furthermore, information-based model selection
criteria are not available for estimation by the MoM. We employ a model choice procedure consisting of the following steps. The procedure has a forward orientation from step to step. Within each step the model starts with a baseline specification for this step, extending it if this is necessary for the goodness of fit, and reducing it by dropping nonsignificant effects. The extension to achieve a good fit is done in an explorative fashion.

Goodness of fit is investigated according to the method of Lospinoso and Snijders (2019), implemented in the RSiena package. This method checks whether the estimated distribution corresponds to the observed data also for other statistics than those used for estimating the parameters. Consider a vector-valued statistic $u(y)$, not directly used in the statistics (8) employed for the MoM estimation. A large number of Monte Carlo simulations $y[h]$, $h = 1, ..., H$, is obtained from the model with the estimated parameter vector. Denoting the mean and covariance matrix of the $u(y[h])$ by

$$m_u = \frac{1}{H} \sum_h u(y[h]), \quad \Sigma_u = \frac{1}{H} \sum_h (u(y[h]) - m_u)(u(y[h]) - m_u)'$$

and the Mahalanobis distance by

$$d(u, m_u) = (u - m_u)' \Sigma_u^{-1} (u - m_u),$$

the fit for the observed value $u(y)$ is expressed by the “Mahalanobis p-value”

$$p_u = \frac{1}{H} \sum_h I \{ d(u(y), m_u) \ge d(u(y[h]), m_u) \}. \quad (13)$$

The fit is considered satisfactory if this p-value is larger than 0.05; if several statistics are considered, it will be acceptable, because of multiple testing, that some of them have smaller p-values, provided these are not too small.

This is applied with $H = 1,000$ and seven choices for the vectors $u$ depending only on the networks: the empirical distribution function of the indegrees at several values, for both networks; the same for the outdegrees; the triad census (Holland & Leinhardt, 1976; Wasserman & Faust, 1994), defined as the frequencies of subgraphs on three nodes, for both networks; and the mixed (multivariate) triad census of Hollway, Lomi, Pallotti, and Stadtfeld (2017). For effects of covariates, these were divided into several ordered categories, and the statistics in $u$ are the frequencies of ties from sender (“ego”) categories to receiver (“alter”) categories.

The model selection steps are the following.

1. Estimate a model for the simultaneous network dynamics with structural effects and effects of sex. Include the effects mentioned above. Check the goodness of fit for degree distributions and triad counts, and modify the model so as to achieve a satisfactory fit.

2. Extend this model with effects of distance, ethnicity, and age as covariates for $W$ and $B$ with distinct parameters. For age, use the five transformations in (12). Check the goodness of fit for age divided in six categories as mentioned above. Depending on the results, extend the model if necessary and reduce it if possible while respecting the hierarchy principle mentioned above.

3. Extend the model of the preceding step with effects of wealth at the three levels of individual, household, and compound. These effects are considered for $W$ and $B$ with distinct parameters.
Using the transformations in (12) leads to a total of 30 parameters for wealth alone, a large number indeed. This model is estimated and then reduced by retaining only the significant wealth variables, again respecting the hierarchy principle.

4. The resulting model is the final one and estimated.

## 5 | RESULTS

Parameters were estimated using RSiena version 1.2-23 (Ripley et al., 2020). The results are presented following the four steps outlined above. In view of space, for the extension-and-reduction Steps 2 and 3, we do not present the full tables of estimates. When interpreting results in view of significance, we use a significance level of .05 and the tests based on normal approximations mentioned above; for single parameters, this corresponds to significance meaning that the parameter estimate is larger (in absolute value) than twice the standard error. For the goodness of fit, we tried to achieve that the Mahalanobis p-value was not less than .05; in view of multiple testing, one or very few p-values being between .02 and .05 was deemed acceptable.

### 5.1 | Structural model

The first step was to estimate models with effects of univariate and multivariate network structure and sex. As a preliminary, the outdegree distributions for the second wave were investigated (see Figure 1).

Especially the B network has a very large number of actors with outdegree equal to 0. A further exploration showed that there were gender differentials in the proportions of actors with outdegree 0. To achieve a model with a good fit, we added the following effects.

* The positive outdegree effect, defined as

$$I\{y_{i+} \geq 1\},$$

where $I\{A\}$ is the indicator function of the event A; this effect was also interacted with gender of ego;

* the inverse outdegree effect, defined by

$$\frac{1}{y_{i+} + 1};$$

<figure><img src="image_2.png" /><figcaption>**FIGURE 1** Bar plots of outdegree distributions for the second wave for networks W (left) and B (right). Note the interrupted vertical axis to accommodate the high number of zero outdegrees for the B network</figcaption></figure>
* and the cyclic closure effect

$$ \sum_j y_{ij} y_{jh} y_{hi}, $$

reflecting the tendency to have cyclical patterns $i \to j \to h \to i$.

The interaction gwesp $\times$ reciprocity could not be estimated for the B network, but the score-type test of Schweinberger (2012) showed that it was not significant. The impossibility to obtain convergence of the estimation algorithm for models including this interaction apparently was related to a lack of information in the data about its parameter value.

The estimates for the structural model are given in Table 4. This model has a satisfactory goodness of fit with respect to the seven mentioned statistics. In the interpretation, we focus on the significant parameters (estimate in absolute value larger than twice the standard error).

The first effect, outdegree defined in (11), balances the creation and deletion of ties, conditional on all other effects included in the model. Since the network is sparse, there are many more options to create than to delete ties, usually resulting in a negative parameter.

We see that there are strong tendencies to reciprocity, for both W and B. Transitivity as represented by the gwesp effect is significant only for W; the negative gwesp $\times$ reciprocity parameter indicates that reciprocity and transitivity compensate for each other, a phenomenon which is often seen, and discussed by Block (2015). Transitivity is estimated positively for B, but with a large standard error; there are not so many transitive triangles where all three actors are in different villages, a requirement for between-village transitivity. For the W network, there is evidence for cyclic closure in addition to transitive closure.

Of the degree effects, those related to indegrees all are nonsignificant and remain in the model only as control effects, to make sure that a good fit is obtained for variances of indegrees and their covariances with outdegrees. The effects related to outdegrees, however, present a complicated picture. For W, the only significant effect among these is the negative outdegree-activity effect. It implies that, in the W network, the tendency to create new ties, as opposed to deleting existing ties, is weaker for actors having higher outdegrees. This keeps the outdegree variance relatively low. For B, there are three significant outdegree-related effects: outdegree activity (the $\sqrt{}$ version), inverse outdegree, and positive outdegree. Of the joint contribution of these three effects,

$$ \sum_j y_{ij} \left\{ 0.648 \sqrt{y_{i+}} - \frac{12.651}{y_{i+} + 1} - 8.089 I\{y_{i+} \ge 1\} \right\}, $$

the coefficient of $y_{ij}$ between curly braces is decreasing in $y_{i+}$ going from 0 to 1, but increasing for $y_{i+} \ge 1$. This implies the tendency, for between-village ties, that those who currently have no outgoing ties will tend not to create new ties, but for those who do have some ties there is a positive feedback effect of their number of outgoing ties. (The positive feedback does not lead to an avalanche of ties for those having high outdegrees already because time is limited.)

The cross-network degree effects are not significant for the W network. For B, the main of these effects is mixed indegree popularity: those who currently have high indegrees in the W network, will also attract more ties (i.e., get higher indegrees) in the B network.

The last four lines in Table 4 are triadic between-network effects. To make them well interpretable, it is necessary to have the mixed degree effects in the model because these represent
<table><caption>TABLE 4 Estimation results for model with structural and sex effects</caption><thead><tr><th rowspan="2">Effect</th><th colspan="2">Within</th><th colspan="2">Between</th></tr><tr><th>par.</th><th>(s.e.)</th><th>par.</th><th>(s.e.)</th></tr></thead><tbody><tr><td>Rate</td><td>12.067</td><td>(0.428)</td><td>11.685</td><td>(1.521)</td></tr><tr><td>Outdegree</td><td>-1.657</td><td>(0.139)</td><td>-6.597</td><td>(0.768)</td></tr><tr><td>Reciprocity</td><td>1.574</td><td>(0.115)</td><td>1.923</td><td>(0.300)</td></tr><tr><td>gwesp</td><td>1.295</td><td>(0.075)</td><td>0.380</td><td>(0.403)</td></tr><tr><td>gwesp × reciprocity</td><td>-0.821</td><td>(0.175)</td><td>—</td><td></td></tr><tr><td>Cyclic closure</td><td>0.123</td><td>(0.048)</td><td>—</td><td></td></tr><tr><td>Outdegree activity</td><td>-0.098</td><td>(0.018)</td><td>—</td><td></td></tr><tr><td>Outdegree activity (√)</td><td>—</td><td></td><td>0.648</td><td>(0.176)</td></tr><tr><td>Inverse outdegree</td><td>—</td><td></td><td>-12.651</td><td>(3.471)</td></tr><tr><td>Positive outdegree</td><td>-0.837</td><td>(0.522)</td><td>-8.089</td><td>(1.323)</td></tr><tr><td>Indegree popularity</td><td>-0.016</td><td>(0.014)</td><td>-0.080</td><td>(0.072)</td></tr><tr><td>Indegree activity</td><td>-0.012</td><td>(0.030)</td><td>-0.053</td><td>(0.085)</td></tr><tr><td>Gender alter (M)</td><td>0.203</td><td>(0.069)</td><td>0.552</td><td>(0.224)</td></tr><tr><td>Gender ego (M)</td><td>-0.190</td><td>(0.078)</td><td>-0.701</td><td>(0.208)</td></tr><tr><td>Same gender</td><td>0.412</td><td>(0.055)</td><td>1.203</td><td>(0.191)</td></tr><tr><td>Gender (M) ego × positive outdegree</td><td>-1.719</td><td>(0.729)</td><td>0.797</td><td>(0.401)</td></tr><tr><td>Mixed outdegree activity (√)</td><td>0.073</td><td>(0.092)</td><td>-0.215</td><td>(0.200)</td></tr><tr><td>Mixed indegree popularity (√)</td><td>0.184</td><td>(0.100)</td><td>0.898</td><td>(0.309)</td></tr><tr><td>Mixed indegree activity (√)</td><td>-0.208</td><td>(0.198)</td><td>0.011</td><td>(0.171)</td></tr><tr><td>Mixed outdegree popularity (√)</td><td>0.094</td><td>(0.063)</td><td>-0.780</td><td>(0.394)</td></tr><tr><td>Same between choices</td><td>-0.192</td><td>(0.424)</td><td>—</td><td></td></tr><tr><td>B-B ⇒ W closure</td><td>0.627</td><td>(0.621)</td><td>—</td><td></td></tr><tr><td>W-B ⇒ B closure</td><td>—</td><td></td><td>0.727</td><td>(0.196)</td></tr><tr><td>B-W ⇒ B closure</td><td>—</td><td></td><td>0.268</td><td>(0.084)</td></tr></tbody></table>

Note: The symbol √ indicates the square root version of the effect. Overall maximum convergence ratio 0.20.

smaller substructures, even though this leads to a large number of parameters. Both between-village mixed triadic effects are positive and significant. This suggests that for a between-village tie $i \to j$ to exist, it is conducive that there is an intermediate $h$ for which $i \to h \to j$, who either could live in $i$'s village ("$W-B \Rightarrow B$") or in $j$'s village ("$B-W \Rightarrow B$"); the former effect ("$W-B \Rightarrow B$") is much stronger than the latter.

## 5.2 | Effects of distance, age, and ethnicity

In the next step, the model was extended with effects of age, log distance, and ethnicity. All parameters are allowed to differ between the networks *W* and *B*. For age, all five effects in (12)
were included for both networks. Fit was checked by applying the method of Lospinoso and Snijders (2019), mentioned above, to distance divided into nine categories, and to the number of ties between egos and alters each in six different age categories.

The fit for distance was good.

For the *B* network, only the effect of age difference squared was significant. The joint test for the other age effects yielded $\chi_4^2 = 2.8, p = .60$; these effects were dropped. For this network, the fit of the model was good. For the *W* network, however, the fit of the five-parameter model for age was not good. A plot showed that mainly the fit for the lower age categories was insufficient, and the model was improved by constructing a piecewise linear function of age with the knot at 40 years,

$$ \min\{0, \text{age}_i - 40\}. $$

To obtain a more flexible dependence on age, a B-spline approximation was used, including this variable for the ego effect and its square for the alter effect, with several interactions. This led to a family of 10 functions, each a smooth and piecewise quadratic function of alter's age, and depending continuously on ego's age. With this addition, the fit for the 36 combinations of age categories of senders and receivers of the ties was good (Mahalanobis *p*-values .26 and .09 for the final model for the *W* and *B* networks). Parameters for age and ethnicity are interpreted in the discussion of the final model.

## 5.3 | Effects of wealth

Next, extending the model resulting from the previous step, the effects of wealth were included: for the three levels of individual, household, and compound (see (1)); for the two networks *W* and *B*; and with the five parameters (12). This gives a total of 30 parameters; the purpose of this step is to see if this number can be reduced.

A goodness of fit check for the estimated model with categorized wealth variables at three levels for ego and alter showed that the fit was acceptable, so the quadratic model did not need to be extended. In view of the large number of variables, we wished to retain only the strongest effects. For the *W* network, the highest *t*-statistics (ratio of parameter estimate to standard error) were for the ego and ego squared effects at the household and the compound level; the other 11 effects jointly had a chi-squared test value of $\chi_{11}^2 = 3.3, p > .9$, and were left out of the further model. For the *B* network, all effects with *t*-statistics less than 1 were dropped from the model, and in a subsequent backward selection step, further nonsignificant effects were dropped. The remaining effects were the difference squared effect at the personal level, and at the compound level, were the ego and ego squared effect. In the model with all 30 wealth effects included, the 12 between-village effects that were left out had a combined chi-square test value of $\chi_{12}^2 = 9.4, p = .67$. This leaves seven wealth-related effects for the final model.

## 5.4 | Final model

Table 5 gives the results of the final estimated model. There are too many parameters to discuss the interpretations of all of them; therefore, we focus only on some. The structural parameters were discussed already for the model of Table 4; the results for these parameters are roughly similar
<table><caption>TABLE 5 Parameter estimates for final model</caption><thead><tr><th rowspan="2">Effect</th><th colspan="2">Within</th><th colspan="2">Between</th></tr><tr><th>par.</th><th>(s.e.)</th><th>par.</th><th>(s.e.)</th></tr></thead><tbody><tr><td>Basic rate parameter within</td><td>13.965</td><td>(0.544)</td><td>11.342</td><td>(1.573)</td></tr><tr><td>Outdegree</td><td>-2.334</td><td>(0.288)</td><td>-6.635</td><td>(0.815)</td></tr><tr><td>Reciprocity</td><td>1.259</td><td>(0.109)</td><td>1.471</td><td>(0.297)</td></tr><tr><td>Cyclic closure</td><td>0.092</td><td>(0.043)</td><td>—</td><td></td></tr><tr><td>Transitivity (gwesp)</td><td>1.028</td><td>(0.071)</td><td>0.371</td><td>(0.401)</td></tr><tr><td>Transitivity (gwesp) × reciprocity</td><td>-0.684</td><td>(0.155)</td><td>—</td><td></td></tr><tr><td>Outdegree-activity</td><td>-0.078</td><td>(0.013)</td><td>—</td><td></td></tr><tr><td>Outdegree-activity (√)</td><td>—</td><td></td><td>0.797</td><td>(0.188)</td></tr><tr><td>Inverse outdegree</td><td>—</td><td></td><td>-13.520</td><td>(3.477)</td></tr><tr><td>Positive outdegree</td><td>-0.444</td><td>(0.582)</td><td>-8.190</td><td>(1.333)</td></tr><tr><td>Indegree-activity</td><td>-0.028</td><td>(0.028)</td><td>-0.029</td><td>(0.074)</td></tr><tr><td>Indegree-popularity</td><td>-0.009</td><td>(0.016)</td><td>-0.094</td><td>(0.090)</td></tr><tr><td>Log distance</td><td>-0.240</td><td>(0.016)</td><td>-0.452</td><td>(0.126)</td></tr><tr><td>Ethnicity alter (W)</td><td>0.439</td><td>(0.256)</td><td>0.255</td><td>(0.151)</td></tr><tr><td>Ethnicity ego (W)</td><td>-0.618</td><td>(0.259)</td><td>-0.273</td><td>(0.124)</td></tr><tr><td>Same ethnicity</td><td>0.344</td><td>(0.251)</td><td>0.649</td><td>(0.137)</td></tr><tr><td>Gender alter (M)</td><td>0.167</td><td>(0.073)</td><td>0.627</td><td>(0.215)</td></tr><tr><td>Gender ego (M)</td><td>-0.179</td><td>(0.083)</td><td>-0.846</td><td>(0.232)</td></tr><tr><td>Same gender</td><td>0.583</td><td>(0.059)</td><td>0.961</td><td>(0.183)</td></tr><tr><td>Gender ego (M) × positive outdegree</td><td>-2.751</td><td>(0.885)</td><td>1.051</td><td>(0.443)</td></tr><tr><td>Age</td><td colspan="4">See figure</td></tr><tr><td>Age difference squared</td><td colspan="4">-0.048 (0.011)</td></tr><tr><td>Wealth individual difference squared</td><td colspan="4">-0.432 (0.170)</td></tr><tr><td>Wealth house ego</td><td>-0.132</td><td>(0.059)</td><td>—</td><td></td></tr><tr><td>Wealth house squared ego</td><td>-0.153</td><td>(0.070)</td><td>—</td><td></td></tr><tr><td>Wealth compound ego</td><td>0.124</td><td>(0.042)</td><td>-0.308</td><td>(0.092)</td></tr><tr><td>Wealth compound squared ego</td><td>0.044</td><td>(0.035)</td><td>-0.237</td><td>(0.089)</td></tr><tr><td>Mixed outdegree (√) activity</td><td>0.004</td><td>(0.097)</td><td>-0.228</td><td>(0.217)</td></tr><tr><td>Mixed indegree (√) popularity</td><td>0.186</td><td>(0.114)</td><td>1.070</td><td>(0.373)</td></tr><tr><td>Mixed indegree (√) activity</td><td>-0.017</td><td>(0.190)</td><td>0.005</td><td>(0.154)</td></tr><tr><td>Mixed outdegree (√) popularity</td><td>0.100</td><td>(0.066)</td><td>-0.785</td><td>(0.425)</td></tr><tr><td>Same between choices</td><td>-0.321</td><td>(0.430)</td><td>—</td><td></td></tr><tr><td>B-B ⇒ W closure</td><td>1.161</td><td>(0.796)</td><td>—</td><td></td></tr><tr><td>W-B ⇒ B closure</td><td>—</td><td></td><td>0.593</td><td>(0.188)</td></tr><tr><td>B-W ⇒ B closure</td><td>—</td><td></td><td>0.149</td><td>(0.086)</td></tr></tbody></table>

Note: Age measured in decades. Overall maximum convergence ratio 0.244.
here, and we do not repeat the discussion. The Mahalanobis *p*-values for the fit of the seven vectors of statistics mentioned in Section 4.4 ranged from .044 to .89, indicating a good fit.

The parameters in Table 5 are the coefficients of the effects in the evaluation function (6), and the variability of the effects can be widely different; therefore, the numerical values of parameters do not say anything about effect sizes.

For the covariates, in most cases we cannot interpret single parameters, but must interpret the totality of all parameters associated with a given covariate. This will be done, for each network separately, by adding the contributions to the evaluation function for this network of all effects depending on the covariate; this is called the selection function for the covariate. For binary covariates, the selection function can be shown in a 2 × 2 table (ego by alter); for numerical covariates the selection function can be plotted, for various values of ego's covariate, as a function of alter's covariate on the horizontal axis. This is in line with the idea of actor-oriented modeling, and with the data collection mode where respondents report their outgoing ties: the ties are regarded as choices by the respondents (“egos”), dependent on their own covariate value and of those of their potential network members.

*   *Distance.* Log-distance has a strong effect, as expected.

*   *Ethnicity.* The ego by alter table is presented in Table 6. The contrast between mentioning the own group compared with the other group (homophily) is larger for Wolof individuals (as senders) than for Fulani, for both networks.

*   *Sex.* Table 7 shows a similar pattern for the effects of the sex of sender and receiver.

Here we see a strong gender homophily, the contrast for males being stronger than for females, and especially strong for the *B* network. This table does not include the consequences of the interaction of gender with positive outdegree. From Table 5 we see that males have a larger tendency than females to have outdegrees equal to 0 in the *W* network, while the converse is true in the *B* network—controlling for all other effects in the model. This reflects the locality of female behavior, who are confined by social behavioral norms to the sphere of their family in law, mainly living in the same village.

*   *Age.* For the *B* network there is homophily with respect to age, as indicated by the negative parameter for the squared age difference. For the *W* network 10 age-dependent effects are used, as discussed above. The parameter estimates are not interpretable in themselves and therefore are not given in the table. The total contribution of all age-related effects to the evaluation

<table><caption>**TABLE 6** Effects of ethnicity: Senders in rows and receivers in columns</caption><thead><tr><th rowspan="2"></th><th colspan="2">Within</th><th colspan="2">Between</th></tr><tr><th>Fulani</th><th>Wolof</th><th>Fulani</th><th>Wolof</th></tr></thead><tbody><tr><th>Fulani</th><td>0.48</td><td>0.57</td><td>0.66</td><td>0.27</td></tr><tr><th>Wolof</th><td>-0.49</td><td>0.30</td><td>-0.26</td><td>0.64</td></tr></tbody></table>

<table><caption>**TABLE 7** Effects of sex: Senders in rows and receivers in columns</caption><thead><tr><th rowspan="2"></th><th colspan="2">Within</th><th colspan="2">Between</th></tr><tr><th>Female</th><th>Male</th><th>Female</th><th>Male</th></tr></thead><tbody><tr><th>Female</th><td>0.59</td><td>0.17</td><td>1.03</td><td>0.70</td></tr><tr><th>Male</th><td>-0.18</td><td>0.57</td><td>-0.77</td><td>0.82</td></tr></tbody></table>
<figure><img src="image_3.png" /><figcaption>**FIGURE 2** Plot of selection functions for age for within-village networks. Horizontal axis is age of alter; the curves are for egos of different age</figcaption></figure>

function for the within-village network is plotted in Figure 2, separately for ego's age from 30 to 70 years.

The pattern gives clear evidence of age homophily: The maximum of the selection curve is close to ego's value. This tendency is modified by age, being weak for the younger egos, and very pronounced for the older egos.

* *Wealth*. For this model, measures of effect size have not yet been developed. However, the effects can be compared in an elementary way, by considering the minimum and maximum over all actor pairs of the selection functions added for all wealth variables. For the *W* network the range is 0.4, while for the *B* network it is 2.5. This shows that the effect of wealth on between-villages ties is considerably stronger than on within-village ties.

The ways in which the wealth variables affect the two networks also are quite different. For the *W* network, their effect depends only on ego. Drawing the curves (not shown here for space reasons) shows that the effect of the compound's wealth is mainly increasing, while the house level shows that those living in houses of relatively medium wealth in their compound mention more *W* ties than those of relatively low or high wealth. For the *B* network, there is a rather strong homophily effect for individual wealth, while those living in compounds of medium wealth mention more *B* ties than those living in compounds of low or high wealth.

**6 | DISCUSSION**

Node sets of large networks often have additional structure, which may be associated with het-
erogeneities in the network. This has been the topic of special issues of *Social Networks* (Adams,
Faust, & Lovasi, 2012) and of *Network Science* (De Benedictis, Vitale, & Wasserman, 2015), both
with much attention for spatial structure. Such structure can be manifold, which opens many
directions for further modeling (Snijders, 2016). In this article we have considered a nested struc-
ture of the node set, that is, it a partition into subsets that here are referred to as *groups*. This leads
to a multilevel structure where the node set and the set of groups are distinct levels.

For such nested node sets we have presented two issues. The first issue is the distinction
between within-group and between-group ties. This is addressed in this article by representing
these as two distinct but interdependent networks. The second issue is the differentiation of the
role of covariates according to the levels in the nesting hierarchy; this is related the well-known ecological fallacy (Robinson, 1950; Wakefield, 2009). This is addressed here by using versions of the covariates aggregated to the higher levels of the hierarchy (Davis et al., 1961). These issues were elaborated in this article in the longitudinal analysis of a network between inhabitants of seven villages in rural Senegal (Faye, 2011) by means of a multivariate stochastic actor-oriented model (Snijders et al., 2013).

For this case study, our analysis has shown large differences between the within-village and between-village sociability networks and large differences between the effects of wealth at the personal level, the household level, and the compound level. It is tricky to give interpretations because the “other things equal” clause is very hard to express; this clause is tacitly assumed. Let us mention just a few of the main conclusions. While there is in general homophily with respect to age, this is much stronger for the old (as senders of ties) than for the young. Wealth is a much stronger determinant of between-village ties than of within-village ties; homophily does operate for wealth, but only at the individual level and between villages.

We have shown possibilities for taking into account the nested structure of the node set. These are feasible with existing software and lead to interesting findings, although this comes at the expense of a large number of parameters and complicated analyses.

## ACKNOWLEDGEMENT

The authors are grateful to Emmanuel Lazega for many discussions and to the Guest Editor and two reviewers for helpful comments.

## ORCID

Tom A.B. Snijders https://orcid.org/0000-0003-3157-4157

## REFERENCES

Adams, J., Faust, K., & Lovasi, G. S. (2012). Capturing context: Integrating spatial and social network analyses. *Social Networks, 34*(1), 1–5.

Amati, V., Schönenberger, F., & Snijders, T. A. B. (2019). Contemporaneous statistics for estimation in stochastic actor-oriented co-evolution models. *Psychometrika, 84*, 1068–1096.

Block, P. (2015). Reciprocity, transitivity, and the mysterious three-cycle. *Social Networks, 40*, 163–173.

Block, P., Koskinen, J., Hollway, J., Steglich, C., & Stadtfeld, C. (2018). Change we can believe in: Comparing longitudinal network models on consistency, interpretability and predictive power. *Social Networks, 52*, 180–191.

Boccaletti, S., Bianconi, G., Criado, R., del Genio, C., Gómez-Gardeñes, J., Romance, M., ... Zanin, M. (2014). The structure and dynamics of multilayer networks. *Physics Reports, 544*, 1–122.

Brailly, J., & Faye M. (2015). Élites villageoises et gestion de ressources naturelles. Paper presented at: Proceedings of the 6ème Congrès de l'Association française de sociologie. France: Saint-Quentin-en-Yvelines. Retrieved from https://hal.archives-ouvertes.fr/hal-01388451

Davis, J. A., Spaeth, J. L., & Huson, C. (1961). A technique for analyzing the effects of group composition. *American Sociological Review, 26*, 215–225.

De Benedictis, L., Vitale, M. P., & Wasserman, S. (2015). Examining the literature on "networks in space and in time": An introduction. *Network Science, 3*, 1–17.

Faye, M. (2011). *Géographie des relations sociales et économie du parler*. In A. M. Diagne, S. Kesseler, & C. Meyer (Eds.), *Communication Wolof et Société Sénégalaise; Héritage et Création* (pp. 519–548). Paris, France: L'Harmattan.

Faye, M. (2013a). Biased net model and subgroup relations: Social integration in heterogeneous groups. *Procedia – Social and Behavioral Sciences, 100*, 2–20.
Faye, M. (2013b). Soziale Netzwerke im kollektiven Handeln und Entscheiden: das Allmende-Problem einer Dörfergemeinschaft im Nordwesten Senegals (Ph. D. thesis). Universität Oldenburg.

Fritz, C., Lebacher, M., & Kauermann, G. (2020). Tempus volat, hora fugit – a survey of dynamic network models in discrete and continuous time. *Statistica Neerlandica*.

Goldenberg, A., Zheng, A. X., Fienberg, S. E., & Airoldi, E. M. (2009). A survey of statistical network models. *Foundations and Trends in Machine Learning, 2*, 129–233.

Handcock, M. S., & Hunter, D. R. (2006). Inference in curved exponential family models for networks. *Journal of Computational and Graphical Statistics, 15*, 565–583.

Hanneke, S., Fu, W., & Xing, E. P. (2010). Discrete temporal models of social networks. *Electronic Journal of Statistics, 4*, 585–605.

Holland, P. W., & Leinhardt, S. (1976). Local structure in social networks. *Sociological Methodology, 6*, 1–45.

Holland, P. W., & Leinhardt, S. (1977). A dynamic model for social networks. *Journal of Mathematical Sociology, 5*, 5–20.

Hollway, J., Lomi, A., Pallotti, F., & Stadtfeld, C. (2017). Multilevel social spaces: The network dynamics of organizational fields. *Network Science, 5*, 187–212.

Kim, B., Lee, K. H., Xue, L., & Niu, X. (2018). A review of dynamic network models with latent variables. *Statistics Surveys, 12*, 105–135.

Kivelä, M., Arenas, A., Barthelemy, M., Gleeson, J. P., Moreno, Y., & Porter, M. A. (2014). Multilayer networks. *Journal of Complex Networks, 2*, 203–271.

Kolaczyk, E. D. (2009). *Statistical analysis of network data: Methods and models*. New York, NY: Springer.

Koskinen, J., & Snijders, T. A. B. (2013). *Longitudinal models*. In D. Lusher, J. Koskinen, & G. Robins (Eds.), *Exponential random graph models* (pp. 130–140). New York, NY: Cambridge University Press.

Krivitsky, P. N., & Handcock, M. S. (2014). A separable model for dynamic networks. *Journal of the Royal Statistical Society, Series B, 76*, 29–46.

Lazarsfeld, P. F., & Menzel, H. (1961). *On the relation between individual and collective properties*. In A. Etzioni (Ed.), *Complex organizations: A sociological reader* (pp. 422–440). New York, NY: Holt, Rinehart & Winston.

Lospinoso, J. A., & Snijders, T. (2019). Goodness of fit for stochastic actor-oriented models. *Methodological Innovations, 12*(3), 2059799119884282.

Lusher, D., Koskinen, J., & Robins, G. (2013). *Exponential random graph models*. Cambridge, MA: Cambridge University Press.

Marsden, P. V. (2011). *Chapter 25: Survey methods for network data*. In J. Scott & P. Carrington (Eds.), *The SAGE handbook of social network analysis* (pp. 370–388). Thousand Oaks, CA: SAGE.

Matias, C., Rebafka, T., & Villers, F. (2018). A semiparametric extension of the stochastic block model for longitudinal networks. *Biometrika, 105*, 665–680.

McPherson, J. M., Smith-Lovin, L., & Cook, J. M. (2001). Birds of a feather: Homophily in social networks. *Annual Review of Sociology, 27*, 415–444.

Neuhaus, J. M., & Kalbfleisch, J. D. (1998). Between-and within-cluster covariate effects in the analysis of clustered data. *Biometrics, 54*, 638–645.

Norris, J. R. (1997). *Markov chains*. Cambridge, MA: Cambridge University Press.

R Core Team. (2020). *R: A language and environment for statistical computing*. Vienna, Austria: R Foundation for Statistical Computing.

Ripley, R. M., Snijders, T. A. B., Bóda, Z., Vörös, A., & Preciado, P. (2020). *Manual for Siena version 4.0*. Technical report. Oxford, UK: University of Oxford, Department of Statistics; Nuffield College.

Robins, G. L., & Pattison, P. E. (2001). Random graph models for temporal processes in social networks. *Journal of Mathematical Sociology, 25*, 5–41.

Robinson, W. S. (1950). Ecological correlations and the behavior of individuals. *American Sociological Review, 15*, 351–357.

Schweinberger, M. (2012). Statistical modeling of network panel data: Goodness-of-fit. *British Journal of Statistical and Mathematical Psychology, 65*, 263–281.

Schweinberger, M., & Snijders, T. A. B. (2007). Markov models for digraph panel data: Monte Carlo-based derivative estimation. *Computational Statistics and Data Analysis, 51*(9), 4465–4483.

Snijders, T. A. B. (2001). The statistical evaluation of social network dynamics. *Sociological Methodology, 31*, 361–395.
Snijders, T. A. B. (2016). *The multiple flavours of multilevel issues for networks*. In E. Lazega & T. A. B. Snijders (Eds.), *Multilevel network analysis for the social sciences; theory, methods and applications* (pp. 15–46). Cham: Springer.

Snijders, T. A. B. (2017). Stochastic actor-oriented models for network dynamics. *Annual Review of Statistics and Its Application*, 4, 343–363.

Snijders, T. A. B., & Bosker, R. J. (2012). *Multilevel analysis: An introduction to basic and advanced multilevel modeling* (2nd ed.). London, UK: SAGE.

Snijders, T. A. B., Koskinen, J. H., & Schweinberger, M. (2010). Maximum likelihood estimation for social network dynamics. *Annals of Applied Statistics*, 4, 567–588.

Snijders, T. A. B., & Lomi, A. (2019). Beyond homophily: Incorporating actor variables in statistical network models. *Network Science*, 7, 1–19.

Snijders, T. A. B., Lomi, A., & Torló, V. (2013). A model for the multiplex dynamics of two-mode and one-mode networks, with an application to employment preference, friendship, and advice. *Social Networks*, 35, 265–276.

Snijders, T. A. B., Pattison, P. E., Robins, G. L., & Handcock, M. S. (2006). New specifications for exponential random graph models. *Sociological Methodology*, 36, 99–153.

Wakefield, J. (2009). Multi-level modelling, the ecologic fallacy, and hybrid study designs. *International Journal of Epidemiology*, 38, 330–336.

Wasserman, S. (1980). Analyzing social networks as stochastic processes. *Journal of the American Statistical Association*, 75, 280–294.

Wasserman, S., & Faust, K. (1994). *Social Network Analysis: Methods and Applications*. New York, NY and Cambridge, MA: Cambridge University Press.

**How to cite this article:** Snijders TA, Faye M, Brailly J. Network dynamics with a nested node set: Sociability in seven villages in Senegal. *Statistica Neerlandica*. 2020;1–24.
https://doi.org/10.1111/stan.12208