A Bayesian Comparison of Models of Network

A Bayesian Comparison of Models of Network
Formation
Ida Johnsson
November 26, 2014
Abstract
A prominent feature of real-world social networks is a high level of clustering. I review different approaches to modeling network formation and clustering and I apply Bayesian model selection to evaluate the models. Preliminary
results confirm that models that treat links as pairwise independent do not
generate the levels of clustering observed in the data. Models that include
unobserved heterogeneity perform slightly better than models with only observable characteristics.
1
Introduction
Social networks often exhibit transitivity and homophily. Transitivity refers to the
fact that two nodes that are linked to a third node are more likely to share a tie
themselves than nodes that are not. Homophily is the tendency to form links with
individuals who are similar. Moreover, social networks often exhibit a higher level
of clustering1 than what could be explained solely by transitivity and homophily on
observed characteristics (Wasserman and Faust, 1994). Different ways of modeling
clustering have been proposed in the literature. Some models try to capture clustering by including network statistics, such as degree distribution, as determinants of
the network formation process, whereas other models seek to explain clustering by
homophily on unobserved characteristics.
1
The clustering coefficient C measures the degree to which nodes in a graph group together and
of closed triplets
is formally defined as C = numbernumber
of connected triplets of vertices
1
One class of models are games of complete information in which links are formed
sequentially. Under relatively mild assumptions on the meeting process these games
have a unique equilibrium. However, if individual utility from forming a link depends
on the current state of the network, the equilibrium distribution involves a normalizing constant that cannot be evaluated even for relatively small networks.
A different approach is to let links be pairwise independent given node characteristics
and to include latent variables as determinants of the network formation game. This
yields a tractable likelihood and if observed and unobserved characteristics are correlated, the pairwise independent link model might still capture the fact that linking
decisions are likely to be correlated.
Since a common problem of complete information games is the multiplicity of equilibria, another approach that has been suggested is to model network formation as
a game of incomplete information.
The goal of this paper is to develop a unified framework for analyzing how well
the data support different approaches to estimating network formation games. I classify the models that have been proposed in the literature based on assumptions on
the network formation process and individual utilities. I compare the models using
Baysian model selection. I also estimate the models, simulate networks based on
the estimated parameters and compare the characteristics of the simulated networks
with the data.
The rest of the paper is organized as follows. In Section 2 I review the existing
literature on network formation and in Section 3 I describe the models that I compare.
The methodological approach is discussed in Section 4 and Section 5 contains a brief
description of the data. The results are presented in Section 6. Section 7 contains a
discussion of the results and outlines directions for future work.
2
Literature Review
A big class of network formation models are related to the exponential random graph
literature. The network is created through a full information game of sequential link
formation. In each period a pair of agents is randomly drawn and can revise the
status of their link. Under relatively mild assumptions on the meeting technology
the meeting and decision process induce an aperiodic and irreducible Markov chain
on the space of all networks. The ergodic theorem implies that the chain has a
unique stationary distribution. Utility is assumed to be a linear function of a vector
of network statistics, such as links and triangles, and the equilibrium probability of
2
observing a network g given a vector of parameters θ is
Pr(g|θ) =
exp(θT s(g))
c(θ)
(1)
where s(g) denotes the vector of network statistics and c(θ) is a normalizing constant.
This framework has been studied by Mele (2010) Badev (2013) and Chandrasekhar
and Jackson (2012). The foremost challenge in estimating these kind of models is
the intractability of the normalizing constant c(θ) that spans over the space of all
possible networks. The cardinality of this space for an undirected network with n
nodes is 2n(n−1)/2 . Various Markov Chain Monte Carlo (MCMC) sampling techniques
have been proposed to overcome this computational hurdle, however, as pointed out
by Chandrasekhar and Jackson (2012), many models still suffer from convergence
problems. Bhamidi et al. (2008) show that for a broad class of models the mixing
time is exponential in the number of nodes unless the edges are asymptotically independent. But if that is the case the model is essentially equivalent to an Erdős Rényi
random graph and does not have the desired level of clustering. Another criticism
of exponential random graph models is that the equilibrium selection mechanism is
inappropriate since its support is the space of all possible networks. Hence, the stationary distribution assigns non-zero probability to non-equilibrium networks (Sheng,
2012).
This critique makes it compelling to consider alternative models of network formation.
A computationally tractable way of modelling clustering was proposed by Hoff
et al. (2002) and later applied by Hsieh and Lee (2011). The idea is to let the
probability of a tie between two nodes depend on observable characteristics as well
as on their position in a latent social space. Thus, links are pairwise independent
given observed and unobserved characteristics. If the unobserved characteristics are
correlated the model can reproduce transitivity and clustering. This approach is extended in Handcock et al. (2007), where the latent social space arises from a mixture
of distributions, each of which corresponds to a cluster. The model can by estimated
by maximum likelihood or Bayesian methods.
Papers that model network formation as a static game include Leung (2013) and
Boucher and Mourifi (2013). Leung’s approach generalizes the dyadic regression
model in the sense that linking decisions are allowed to depend on the structure of
the network. Agents form beliefs about the future state of the network and simultaneously announce their linking decisions. Links are pairwise independent given
3
the beliefs of the players and their observable characteristics. The model can be
estimated with one network observation and the estimator is consistent when the
number of agents goes to infinity.
Sheng (2012) takes a different approach in which the equilibrium selection mechanism is left unspecified and derives results on partial identification of the parameters.
She models network formation as a complete information game. Agents observe all
other agents’ characteristics and preferences and simultaneously announce which
links they intend to form. The equilibrium concept she uses is parwise stability proposed by Jackson and Wolinsky (1996). A network is pairwise stable if no agent or
pair of agents has incentives to change the current status of his links. The model
is not identified since there are multiple equilibria. Sheng uses the fact that if a
network is pairwise stable any subnetwork must also be pairwise stable and derives
bounds on the probability of observing a subnetwork. A limitation of this approach
is that a large number of networks is needed for estimation and that the estimated
bounds on the parameters may be large.
3
Models for Comparison
Section 3.1 introduces the notation that I use in the remainder of this paper. In Section 3.2 I describe the sequential network formation process that leads to a unique
equilibrium distribution on the space of networks. In Section 3.2.1 I show that the
latent space model and the dyadic regression model are nested in the exponential
random graph model and specify the models that I compare. In Section 3.3 I describe the simultaneous game network formation model of Leung (2013). Finally, in
Section 3.4 I briefly discuss the differences between the sequential and simultaneous
approaches.
3.1
Notation
Let N = {1, . . . , n} be the set of nodes in a network. Denote the adjacency matrix
of the network g with gij = 1 if agent i is linked to agent j and gij = 0 otherwise
and gii = 0 ∀ i ∈ N . The network is directed, hence, gij = k k ∈ {0, 1} does not
imply gji = k. Let g−ij be the adjacency matrix of the network that is obtained
by deleting the link ij from network g and g+ij denote the adjacency matrix of the
network obtained by adding the link ij to g. Finally, let gi denote the i’th row of g
and g−j the (n − 1) × n matrix that we get if we delete the i’th row of g.
4
Each individual i is characterized by a vector of characteristics (Xi Zi ) where
Xi ∈ Rk1 and Zi ∈ Rk2 . Let X = (Xi , . . . , Xn ) and Z = (Z1 , . . . , Zn ). (X Z) are
observed by all players but the econometrician only observes X.When the state of
the network is given by g individual i gets utility Ui (g, X, Z; θ) where θ = (θ1 θ2 ).
Assumption 3.1 (Separable Utility). Utility is additively separable in the observable
and unobservable components and can be expressed as
(1)
(2)
Ui (g, X, Z; θ) = Ui (g, X; θ1 ) + Ui (g, Z; θ2 )
3.2
(2)
Sequential Network Formation Models
In this section I briefly outline the main assumptions and results of the sequential
network formation model2 .
3.2.1
Meeting Process
Agents form a network through a sequential meeting process. In each period t ∈
{1, . . .} a pair {ij i 6= j i, j ∈ N } can revise their link. Denote the adjacency matrix
of the network connecting the agents at time t by g t . Let mt be that pair that revises
their link in period t. The sequence of meetings if governed by a stochastic process
that satisfies
Pr(mt = ij|g t−1 , . . . , g 1 , X) = Pr(mt = ij|g t−1 , Xi , Xj )
(3)
Let G be the outcome space of all possible networks, M = N × N be the space of
all possible meetings and ρ(·) be a probability measure on M that satisfies equation
(3). Then the probability measure ρ(·) induces a Markov process on the outcome
space G. It is also assumed to satisfy the following
Assumption 3.2. For any ij ∈ M
ρ(ij|g t−1 , Xi , Xj ) > 0 ∀ t
(4)
i.e. any meeting is possible at any point in time.
Assumption 3.3. For any ij ∈ M
t−1
ρ(ij|g t−1 , Xi , Xj ) = ρ(ij|g−ij
, Xi , Xj ) ∀ t
hence, the probability that mt = ij is independent of gij .
2
The results in this section follow Mele (2010)
5
(5)
Figure 1: Network statistics t(g)
(b) Reciprocated Links
(a) Direct Links
i
j
(c) Friends of Friends
j
j
i
i
3.2.2
k
Utility and Linking Strategy
Assumption 3.4 (Linear Utility). Let t(g) be a vector of statistics of the network
g. Then the utility in (2) is linear in t(g) and can be expressed as
Ui (g, X, Z; θ) = θ1 t(g, X) + θ2 t(g, Z)
(6)
The vector of network statistics can include such components as direct links,
reciprocated links and friends of friends (see Figure 1).
Assumption 3.5. Players are myopic and consider only the immediate change in
utility when revising their links. For mt = ij, player i receives additive shocks εti0 ,
εti1 ∼ F (ε) to his preferences that affect i’s utility of severing and forming the link
ij, respectively. These shocks are observed by the agent but not observed by the
econometrician.
Hence, if mt = ij and gijt−1 = 1, the link ij is severed if and only if
t
Ui (g t−1 , X; θ) + εti1 − Ui (g−t−1
ij , X, θ) − εi0 < 0
(7)
and if gijt−1 = 0 the link ij is created if and only if
t
Ui (g t−1 , X; θ) + εti1 − Ui (g−t−1
ij , X, θ) − εi0 ≥ 0
(8)
Otherwise, g t = g t−1 .
Definition 1 (Linking Strategy). A pure linking strategy for player i is a mapping
σi : G × M → {0, 1}
6
(9)
A pure-strategy Nash Equilibrium Network is a network such that no player finds
it optimal to revise his current pure linking strategy.
Assumption 3.6. The shocks εtik k ∈ {0, 1} are i.i.d. draws from the Type I extreme
value distribution.
Under Assumption 3.6 the probability of gij = 1 given that mt = ij is given by
t−1
t−1
Pr(gij = 1|mt = ij) = Pr[εti0 − εti1 ≤ Ui (1, g−ij
, X; θ) − Ui (0, g−ij
, X; θ)]
exp[∆Ui (ij)]
=
1 + exp[∆Ui (ij)]
3.2.3
(10)
Equilibrium
The sequential network formation game has a unique equilibrium. Mele assumes
a form of utility function that renders the game a potential game. This greatly
simplifies the computations. There exists a function Q such that for any link ij
Q(gij , g−ij , X; θ) − Q(1 − gij , g−ij , X; θ) = Ui (gij , g−ij , X; θ) − Ui (1 − gij , g−ij , X; θ)
(11)
Hence, the change in utility of any agent i ∈ N if the network changes from g to g 0 ,
where g, g 0 ∈ G, is exactly equal to the change in the potential function evaluated at
the two networks. In order to compute the deterministic equilibria of the model it
is sufficient to find the local maxima of the potential function and there is no need
to check for profitable deviations of every player.
Theorem 3.7 (Stationary Distribution). Under Assumptions 3.2,3.3 and 3.6
1. The sequence of networks {g t }∞
t=0 is an irreducible and aperiodic Markov chain
2. There exists a unique stationary distribution π(g, X, Z; θ).
3. This distribution is given by
exp[Q(g, X; θ)]
ω∈G exp exp[Q(ω, X; θ)]
Pr(g, X; θ) = P
irreducible and aperiodic, therefore ergodic,
For a proof see Mele (2010).
7
(12)
3.2.4
Classification of models
Let us consider the utility individual i recieves from a link ij. Let
(1)
(2)
Ui (gij , X, Z; θ) = θ11 gij υi (Xi , Xj ) + θ12 t(g, X) + θ12 gij υi + θ22 t(g, Z)
(13)
Now note the following. If θ12 = θ22 = 0 the links in the network are independent
conditionally on X, Z. Then (12) reduces to
Pr(g, X, Z; θ) =
Y gij exp[Ui (gij , Xi , Xj , Zi , Zj )]
1 + exp[Ui (gij , Xi , Xj , Zi , Zj )]
ij
(14)
i6=j
Hence, in a setting where network effects such as friends of friends don’t enter the
utility function, the equilibrium of the sequential network formation game can be estimated using a standard binary choice model. This is the simplest, very restrictive,
way of modeling link formation decisions. I estimate the independent link model as
a benchmark against which I compare more complex models.
An approach that maintains the computational simplicity of the dyadic regression
model while allowing for clustering of links through correlation on unobservables is
the latent space model developed by Hoff et al. (2002). Hsieh and Lee (2011) estimate
a similar model. Formally, let
(1)
Ui (gij , X, Z; θ) = θ11 gij υi (Xi , Xj ) + θ22 gij d(Zi , Zj )
(15)
where d(·) is a distance metric and the unobserved characteristics Z are interpreted as
positions of actors in an Euclidean space. If unobserved characteristics are correlated,
two actors who share a link with a third actor have a higher probability of sharing a
link themselves (Hoff et al., 2002). Formally,
E[d(Zi , Zk )| gij = gjk = 1] > E[d(Zi , Zk )| gij = 0 ∨ gjk = 0]
(16)
If θ12 6= 0 or θ22 6= 0, i.e. the utility function includes network effects, links are
not pairwise independent and the equilibrium probability of observing a network g
is given by equation (12).
3.3
Generalized Dyadic Regression Model (Leung, 2013)
Leung (2013) proposes an approach that allows for network effects while maintaining
computational simplicity. The key idea is to model network formation as a simultaneous move game. Individuals simultaneously announce their linking decisions so
8
as to maximize their expected utility given their beliefs about the future state of
the network. Hence, the variable that enters the utility function is not the realized
network g but the expected network. Conditional on the beliefs, links are pairwise
independent. Formally, let
σkj (X) , Pr(gkj = 1|X1 , . . . , Xn )
(17)
be the belief about the linking probability of agent k to j and denote the beliefs
about the linking probabilities gkl , k 6= i, k 6= l by ((σkl (X))k6=i 3 . Deterministic
preferences are as specified in (13) with θ12 = θ22 = 0. Thus, Leung (2013) does not
include any unobservable characteristics in his model4 . The econometrician observes
the network g and individual characteristics X. Linking decisions are also influenced
by unobserved link-specific random shocks εij . The shocks are assumed to be independent of X and distributed i.i.d. with full support on R, density f and CDF
F . The realization of εi = (εi1 , . . . , εin ) is private information of agent i, all other
features of the model are common knowledge.
Assumption 3.8 (Deterministic Preferences). Determinsitic preferences are given
by
X
gij Ui (g−i , X; θ)
(18)
Ui (g, X; θ) =
j6=i
and satisfy the following
1. (Additive Separability) Uij (g, X; θ) is additively separable in each gij and the
link-specific payoff is independent of gi .
2. (Linearity) Uij (·, X; θ) is linear in each gjk for j 6= i.
3. (Anonymity) For any i 6= j, Uij is an anonymous function at the realized values
of (g−i , X).
Separability of preferences restricts the type of subnetworks that can enter the
utility function. For example, utility can depend on triangles of type 1 but not on
triangles of type 2 (see Figure (2)). Type 1 triangles enter Uij as gki gji whereas
type 2 triangles enter the utility function as gik gij violating the additive separability
assumption.
3
4
Note that this is an (n − 1) × n matrix with the ith row removed
Below I discuss possible extensions to unobserved characteristics
9
Figure 2: Types of triangles
k
(a) Type 1
(b) Type 2
i
i
j
k
j
The equilibrium concept used by Leung is the Bayes Nash equilibrium. Each
agent i ∈ N simultaneously chooses a vector of directed links gi1 , . . . , gin that maximizes his expected utility conditional on his beliefs (σij (X))i6=j , his private information εi and the publicly observed characteristics X. Denote the ith row of g by gi
and g with the ith row removed by g−i . The expected utility of agent i at a realized
network g is
X
E[Ui (gi , g−i , X|X, εi )] =
gij Uij (g−i , ((σkl ))k6=i,l , X) + εij
(19)
j6=i
Hence, agent i has separate decision rules for each link and he chooses the action
gij = 1 if and only if
Uij (g−i , ((σkl ))k6=i,l , X) + εij ≥ 0
(20)
The probability that gij = 1 is given by
Pr(gij = 1|X) = Pr (εij ≥ Uij (g−i , ((σkl ))k6=i,l , X)|X)
(21)
The network is in equilibrium if the beliefs are consistent with the actual linking
probabilities. Let Γ(·, X) : [0, 1]n(n−1) → [0, 1]n(n−1) be a best-response mapping from
the belief space to the space of all networks that satisfies (21). Then a Bayesian
equilibrium is a vector-valued belief function σn (·) such that for all X σn (X) =
Γ(σn (X), X)). As the best-response mapping Γ might have multiple fixed points,
there may be more than one equilibrium. Leung imposes the following restrictions
in order to identify the equilibirum.
Assumption 3.9 (Anonymous Equilibrium). Agents with identical observable attributes act identically, i.e. there exists a function ρ such that
σij (X) = ρ(Xi , Xj )
10
(22)
He shows that there always exists an anonymous and differentiable equilibrium.
Moreover, he assumes that when multiple Bayesian equilibria exist at a vector of
observable characteristics X, a particular equilibrium is chosen by a degenerate equilibrium selection mechanism.
The likelihood of network g can then be expressed as
Y
Pr(g|X) =
F (Ui (((σkl (X))k6=i , Xi , Xj , θ1 ))gij (1−F (Ui ((σkl (X))k6=i , Xi , Xj , θ1 )))1−gij
ij
i6=j
(23)
Note that if θ12 = 0, the likelihood of the network reduces to the dyadic regression model. Leung estimates the model in two steps. In the first step he uses the
assumption on the anonymity of beliefs to estiamte the beliefs in a non-parametric
way and subsequently he estimates the pseudo-likelihood that results from substituting the estimated beliefs into (23). For the case of purely discrete characteristics
the estimated beliefs are given by
P
τ ((Xk ,Xl ),(Xi ,Xj ))
k6=l gkl λ
P
(24)
σ̂(Xi , Xj ) =
τ ((Xk ,Xl ),(Xi ,Xj ))
k6=l λ
where λ ∈ [0, 1] is a smoothing parameter and τ ((Xk , Xl ), (Xi , Xj )) is a function that
counts the number of disagreeing components between (Xk , Xl ) and (Xi , Xj ).
In order to apply Bayesian model selection I parametrize the beliefs as
σij =
exp[d(Xi , Xj )]
1 + exp[d(Xi , Xj )]
(25)
where d is a distance metric.
3.4
Sequential vs. Simultaneous Models
Sequential network formation models are attractive because they predict a unique
equilibrium. Both observed and unobserved characteristics can be included in a
straightforward way. Nevertheless, the computational challenges of these models
raise questions as to the accuracy of the estimated parameters. Also, the equilibrium results from myopic behavior of the players and in this sense there is no strategic
interaction as the game consists of sequential decisions made by myopic players.
11
It is crucial that the framework for estimating network formation be chosen with
a given setting in mind. As argued by Jackson (2013), “there is a temptation to
write down simple econometric models in the abstract that a researcher could take
off-the-shelf and adapt to a particular setting”. It is therefore important to analyze
which type of model is more suitable for a particular application. The sequential network formation model assumes that players have complete knowledge of the network
structure, an assumption that might be unrealistic in many situations. Incomplete
information models allow agents to make decisions that are ex-post suboptimal. This
might be reasonable in environments where agents are not allowed to change their
linking decisions after the network is formed.
Further, the sequential network formation model assumes that the observed network
is the limiting distribution of a Markov chain. In settings where the observed data
is a snapshot of an evolving network it might be more reasonable to model network
formation as a game of incomplete information where agents experience ex-post regret.
Static games of network formation usually have multiple equilibria and require
that some equilibrium selection mechanism be imposed. Leung (2013) proposes a
game of incomplete information with an anonymous equilibrium. The anonymity
assumption implies that agents preferences only depend on their observable characteristics and that all agents have the same ex-ante information, which is a strong
assumption. Leung (2013) argues that in the case of a school friendship network
violations of informational symmetry may be localized and minimal. In settings
where anonymity is a reasonable assumption his framework provides a computationally attractive way of estimating models in which utility includes network effects. A
disadvantage of his approach are the restrictions imposed on the utility function by
Assumption 3.8. The framework of Leung can for example not be applied to situations where the utility from a link ij depends on other links of node i.
It should also be noted that if we maintain the assumption that agents with the
same observable characteristics have the same ex-ante strategies, Leung’s framework
can be easily extended to include unobserved characteristics. Whether this is a
plausible assumption depends on the application.
4
Approach
This section is organized as follows. In Section 4.1 I describe the approach I use to
estimate the various models. In Section 4.2 I discuss the simulation of the estimated
12
models and in Section 4.3 I describe the method I use to calculate the Bayes Factor.
In what follows I refer to the model with only observable characteristics and no
network effects in the utility function as the Dyadic Regression Model. I call the
model that extends the dyadic model with unobservable variables the Latent Space
Model and the model with no unobservables and network effects the Exponential
Random Graph Model. I refer to the model of Leung (2013) as the Generalized
Dyadic Regression Model.
4.1
Estimation
I estimate the dyadic regression model using MLE and Bayesian estimation with normally distributed priors. I estimate the latent space model as proposed by Hoff et al.
(2002) using a two-step Metropolis Hastings algorithm in which the latent variables
Z and the parameter vector θ are sampled in separate steps. For a more detailed
description see Section 4.3.
I estimate the generalized dyadic regression model as proposed in Leung (2013).
For the estimation of the exponential random graph model I use the approximate
exchange algorithm described in Mele (2010). The idea is to use introduce and extra
step in the Metropolis Hastings algorithm in which an auxiliary variable is sampled
and thus avoid the computation of the intractable normalizing constant in
Pr(g, X; θ) = P
exp[Q(g, X; θ)]
ω∈G exp[Q(ω, X; θ)]
(26)
The algorithm is described in Appendix D. In step 6 a network g 0 is sampled from
a proposal distribution qg (g 0 |g (r−1) ). I choose the proposal distribution as suggested
0
by Snijders (2002). Let p < 0.01. Then with probability (1 − p) propose g−ij
= g−ij
0
and gij = 1 − gij where gij is chosen uniformly at random and with probability p set
we g(r) = In − g.
4.2
Simulation
I simulate networks using the estimated parameters and compare statistics of the
simulated networks with the original data. I simulate N = 1000 networks for each
model and average the estimated statistics. The dyadic and latent regression model
can be simulated in a straightforward way where in each simulation link gij = 1
ˆ is the linking probability given the
with probability p̂ij where p̂ij = Pr(gij = 1|X, θ)
13
estimated parameters.
I simulate the exponential random graph model through a link formation process as
described in Mele (2010) where links are chosen uniformly at random for T periods.
In order to simulate the generalized dyadic regression model it is necessary to
deal with the multiplicity of equilibria. Since equilibrium beliefs must be equal to
the actual linking probabilities, Leung proposes to choose the beliefs that maximize
the likelihood of the observed data and estimated parameters subject to the beliefs
being equilibrium beliefs, which can be solved by a nonlinear optimization program.
4.3
Bayes Factor
I compare the models using a Bayesian approach. The question I seek to answer is
which model predicts the data better. Given two models M1 and M2 , the posterior
odds for model M1 against M2 given data D are
p(D|M1 ) p(M1 )
p(M1 |D)
=
= B12 λ12
(27)
p(M2 |D)
p(D|M1 ) p(M2 )
p(D|M1 )
is called the Bayes factor
λ12 is the prior odds for M1 against M2 and B12 = p(D|M
1)
and equals the ratio of posterior and prior odds. The term
Z
p(D|Mi ) = f (D|θi , Mi )p(θi |Mi )dθi
(28)
is called the marginal likelihood of model i and measures the predictive probability
of the model. Hence, the Bayes factor B12 measures how well model M1 predicts the
data relative to model M2 . The posterior probability of model i is proportional to
the marginal likelihood of the model times the prior probability. In what follows I
assume equal priors on all models and compare just the marginal likelihoods.
The integral in (28) often lacks a tractable expression and cannot be estimated by
direct sampling. Moreover, a central problem in estimating the marginal likelihood
is that the integral is over the prior distribution of θi . Hence, MCMC methods that
deliver values sampled from the posterior distribution of θ would yield an incorrect
estimate since they converge to
Z
f (D|θi , Mi )p(θi |D, Mi )dθi
(29)
14
Different simulation-based methods have been proposed to calculate the marginal
likelihood. In the below application I use the method proposed by Chib and Jeliazkov
(2001). In what follows I denote the marginal likelihood of model i by m(D|Mi ).
The estimation is based on the fact that the marginal likelihood can be expressed as
m(D|Mi ) =
f (D|θi , Mi )p(θi |Mi )
π(θi |D, Mi )
(30)
where π(θi |D, Mi ) is the posterior density of θi (also called the posterior ordinate).
Taking logs and evaluating at θi∗ we get an estimate of the marginal likelihood on a
log scale
log m̂(D|Mi ) = log f (D|θi∗ , Mi ) + log p(θi∗ |Mi ) − log π̂(θi∗ |D, Mi )
(31)
where π̂(θi∗ |D, Mi ) is an estimate of the posterior density at θi∗ . The point θi∗ can be
arbitrarily chosen, however, in order to maximize the computational efficiency it is
optimal to choose a point in the high-density region of the posterior distribution.
For some models it is more convenient to use multi-block sampling to estimate
∗
) where B is the number of sampling
the posterior ordinate. Let θ∗ = (θ1∗ , . . . , θB
blocks. We can then write
π(θ∗ |D) =
B
Y
∗
π(θi∗ |D, θ1∗ , . . . , θi−1
)
(32)
i=1
∗
where the components π(θi∗ |D, θ1∗ , . . . , θi−1
) can be estimated using reduced MCMC
runs. For a detailed explanation see Chib and Jeliazkov (2001).
4.3.1
Dyadic Regression Model
When estimating the dyadic regression model I compute the posterior ordinate using one-block Metropolis Hastings sampling as proposed in Section 2.1 of Chib and
Jeliazkov (2001). I use a tailored proposal density q(θ, θ0 |D) = q(θ0 |m, V, ν) where m
is the mode of the log target density, V is the inverse of the negative Hessian evaluated at m and fT (·|·) denotes the multivariate T -density with mean m, variance
νV /(ν − 2) and ν degrees of freedom.
4.3.2
Latent Space Model
For the latent variable dyadic regression model I use two-block sampling. I sample
the latent position variable Z in the first step and the parameter of interest θ in the
15
second step. I use a random walk proposal density
q(θ, θ0 |D) = ft (θ0 |θ, τ V, ν)
(33)
where V and ν are as defined above and τ is a tuning parameter chosen to achieve
an acceptance rate in the range of 25 − 50%.
4.3.3
Generalized Dyadic Regression
Similarly, for the model of Leung (2013) I also use two-block sampling, in which the
belief parameters and the utility function parameters are sampled in separate blocks
with tailored proposal densities.
4.3.4
Exponential Random Graph Model
In order to calculate the Bayes factorof the exponential random graph model we
must deal with the intractable normalizing constant
" n
#
X
X
exp
Ui (ω, X, Z; θ)
(34)
ω∈G
i=1
Calculating the marginal likelihood for such models has been termed a triply intractable problem (Friel, 2013). Many algorithms for calculating the marginal likelihood, such as power posteriors (Friel and Pettitt, 2008), bridge sampling (Meng and
Wong, 1996) and annealed importance sampling (Neal, 2001) assume that the likelihood function f (D|θ) can be evaluated at θ. Therefore, they cannot be applied to
the likelihood in (12). Friel (2013) proposes an extension of the exchange algorithm,
which he calls the population exchange algorithm, that can be used to calculate the
marginal likelihood of the exponential random graph model.
4.3.5
Convergence
To asses the convergence of the MCMC algorithm I examine the autocorrelation and
mixing of the sampled values and I also calculate the potential scale reduction factor
for a series of MCMC runs (Brooks and Gelman, 1998). Sample output from the
convergence diagnostics is presented in Appendix C.
16
4.4
Utility Specification
Let Xi and Zi be vectors of observed and unobserved characteristics of length k1 and
k2 , respectively. Let the utility of individual i at a realized network g be given by
Ui (g, X; θ) = θ0 +
n
X
i=1
+ θ4
n
X
i=1
gij
gij
k1
X
θ1k |Xik − Xjk | +
k=1
k6=i
gjk + θ5
gij
i=1
k=1
n
X
n
X
n
X
i=1
gij
n
X
k=1
k6=i
gkj + θ6
k2
X
k=1
n
X
i=1
θ2k |Zi − Zj | + θ3
n
X
gij gji
i=1
gij
n
X
gkj gki
k=1
k6=i
(35)
θ1 and θ2 measure homophily on observed and unobserved characteristics, respectively. θ3 measures the impact of reciprocated friendships on link formation and θ4
measure how the number of friends j has affects the probability of i forming a link
to j. The three last terms capture the number of friends j has, the popularity of j
and the effects of friends in common k as shown in Figure 2(a).
In the dyadic regression model θ2 = . . . = θ6 = 0 and in the latent positions model
θ3 = . . . = θ6 = 0. In the generalized dyadic regression model all parameters are
left unrestricted and the actual network g is substituted by the anticipated network
E[g|X]. As in Hoff et al. (2002), I normalize θ2 = 1 in the latent space model and
set k2 = 1.
5
Data
I use data collected in the Teenage Friends and Lifestyle Study (Pearson and West
(2003), Michell and Amos (1997), Michell and West (1996)). The data consists of
a cohort of students who were followed over their second, third and fourth year at
a secondary school in Glasgow between the years 1995 and 1997. The total number
of students in the study is 160, 129 of whom were present at all three measurement
points. The friendship networks were formed by allowing the students to name up to
six friends, indicating the strength of the tie on a scale 0 to 2 scale, were "0"stands
for "not a friend", 1 for "just a friend" and 2 for "best friends". I constructed friendship adjacency matrices where a link is present if the student indicated 1 or 2.
The following characteristics of the students were recorded: sex, age, use of alcohol, tobacco and cannabis, pocket money, involvement in a romantic relation,
17
smoking behavior in the student’s family, music taste, leisure activities and distance
to school and to other students’ homes.
Students’ music preferences were recorded letting them indicate which out of 16 music styles they listened to. In order to record their leisure activities the students had
to indicate the frequency at which they participated in 15 leisure activities, with the
frequency ranging from “most days", “once a week", “once a month" to “less often or
never".
In this paper I use a subsample of 95 students who were present at all three
measurement points and for whom all the covariates were recorded. The network
is depicted in Figure 6 in Appendix E. The friendship networks at all three measurement points show similar statistics and all of the results presented below were
estimated using the friendship network recorded at the first measurement point. The
longitudinal nature of the data will be used in future versions of the paper.
Summary statistics of the data are presented in Table 7 and 6 in Appendix A.
The data display clear homophily on sex. The variable sex is coded as 1 for males
and 2 for females. The average difference in sex for unlinked pairs is 0.52 but only
0.07 with a standard deviation of 0.25 for linked pairs. As shown in Table 3, only
7 per cent of the links are between individuals of different sexes. Also, pairs that
are linked tend to live closer to each other and have more similar habits when it
comes to the use of cannabis, alcohol and tobacco. As all students are of virtually
the same age, with only a few months of difference, I do not include the variable age
as a determinant of link formation.
6
Results (preliminary)
In what follows, I only present the results for the dyadic regression model and the
latent space model. The algorithms for estimating the exponential random graph
model and the Bayes factor of the generalized dyadic regression model are very timeconsuming and the final results are not ready yet.
6.1
Estimated Parameters
The estimated parameters of four different specifications of the dyadic regression
model and the latent regression model are presented in Table 1. Detailed statistics
on the maximum likelihood estimates of the dyadic regression model are presented
in Table 8 and statistics of the posterior distribution from the Bayesian estimates
18
Table 1: Bayesian Estimates of Preference Parameters
const
sex*
leisure
music
smoking*
distance
alcohol*
cannabis*
money*
Dyadic
mean
-2.91
-2.74
0.10
0.12
-0.25
-0.28
-0.24
-0.02
-0.02
Regression Model: Moments
s.d. mean s.d. mean
0.31 -3.28 0.30 -3.58
0.25 -2.75 0.26 -2.74
0.04 0.09 0.04 0.09
0.05 0.11 0.04 0.13
0.12
.
.
-0.38
0.07 -0.29 0.07
.
0.08
.
.
.
0.09
.
.
.
0.01
.
.
.
of Posterior Distribution
s.d. mean
s.d.
0.28 -3.37
0.29
0.25 -2.73
0.25
0.04 0.10
0.04
0.04 0.13
0.04
0.11 -0.31
0.12
.
.
.
.
-0.25
0.08
.
-0.03
0.09
.
.
.
const
sex*
leisure
music
smoking*
distance
alcohol*
cannabis*
money*
Latent
mean
-2.01
-2.78
0.13
0.14
-0.22
-0.31
-0.28
-0.05
-0.02
Variable Model: Moments of
s.d. mean s.d. mean
0.39 -2.39 0.34 -2.56
0.26 -2.78 0.25 -2.75
0.05 0.11 0.04 0.08
0.05 0.13 0.05 0.13
0.12
.
.
-0.44
0.07 -0.31 0.07
.
0.08
.
.
.
0.10
.
.
.
0.01
.
.
.
Posterior Distribution
s.d. mean s.d.
0.31 -2.38
0.30
0.25 -2.75
0.25
0.04 0.11
0.04
0.05 0.12
0.05
0.12 -0.29
0.12
.
.
.
.
-0.28
0.08
.
-0.09
0.09
.
.
.
* - absolute difference
leisure - number of common leisure activities (out of 15 possible)
music - number of common music genres (out of 16 possible)
distance - beeline distance between two students’ homes (measured in km)
money - pocket money per month in British pounds
are presented in Tables 9-16 in Appendix B.
For any pair ij, the variables leisure and music indicate the number of leisure
activities and music interests i and j have in common. The variable distance measures the beeline distance between i and j’s homes. The remaining variables measure
the absolute distance between the values of the characteristics sex, smoking, alcohol,
cannabis and money of i and j. As expected, the greater the distance in observed
characteristics of i and j, the lower the probability of gij = 1. Students who live
further apart are less likely to be linked and students who share leisure and music
19
interests are more likely to be friends. The above holds for both the dyadic regression
model and for the latent space model.
Maximum likelihood estimates of the generalized dyadic regression model are
presented in Table 2 and Table 17 in Appendix B. Linking probability depends on
observable as well as on network effects. I include the following network effects in the
regressions: popularity, reciprocity, outdegree and friends in common. Popularity of
a node j from the perspective of node i is measured by the the anticipated number
of nodes that will link with j (not counting node i). Reciprocity is measured by the
probability i assigns to his link being reciprocated by j. Outdegree is the number
of link j forms with nodes other than i and friends in common is measured by the
number of nodes k 6= i, j that link with both i and j, gki gkj .
In three of four specifications popular nodes are more likely to be named as friends.
Reciprocity also has a strong positive effect on link formation. The outdegree has a
negative effect in three of four specifications and the presence of common friends has
a strong positive effect. Hence, it seems that individuals form links with individuals
whom they expect to reciprocate their friendship and whom they have common
friends with. Also, the are more prone to form links with individuals who are popular„
but not with individuals who make many friends themselves.
6.2
Simulated Networks vs. Real Data
Table 3 contains descriptive statistics of the real network and of networks simulated
using the dyadic regression model and the latent space model. The simulated networks have similar degree distributions as the observed networks. Both models also
predict the percentage of same-sex links well. As discussed in the introduction, models that treat links as pairwise independent are not good at predicting the degree of
clustering observed in real-world data. The global clustering coefficient C measures
the degree to which nodes in a graph group together and is defined as
C=
number of closed triplets
number of connected triplets of vertices
(36)
The local clustering coefficient of node i measures how close the neighbors of node i
are to being a clique5 and is defined as i
Ci =
5
number of closed triplets connected to node i
number of triplets centered around node i
A clique is a subset of vertices such that any pair of vertices is connected by an edge
20
(37)
Table 2: MLE: Generalized Dyadic Regression
const
sex*
leisure
music
smoking*
distance
alcohol*
cannabis*
money*
popularity
mean
-5.42
-2.77
0.06
0.09
-0.21
-0.26
-0.29
-0.16
-0.03
-1.10
s.e. mean s.e.
0.46 -5.38 0.45
0.25 -2.78 0.25
0.04 0.06 0.04
0.05 0.11 0.04
0.12
.
.
0.07 -0.27 0.07
0.08
.
.
0.10
.
.
0.01
.
.
0.15 0.86 0.13
mean
-5.82
-2.77
0.04
0.11
-0.41
.
.
.
.
0.96
s.e. mean s.e.
0.44 -5.82 0.45
0.25 -2.75 0.25
0.04 0.05 0.04
0.04 0.10 0.04
0.11 -0.26 0.12
.
.
.
.
-0.30 0.08
.
-0.16 0.10
.
.
.
0.14 0.96 0.14
const
sex
leisure
music
smoking
distance
alcohol
cannabis
money
popularity
reciprocity
mean
-8.42
-3.28
0.20
0.08
-0.38
-0.24
-0.19
-0.34
-0.02
-1.37
20.65
s.e. mean s.e. mean
0.57 -6.68 0.51 -7.16
0.51 -1.66 0.27 -1.59
0.05 -0.03 0.04 -0.04
0.05 0.01 0.05 0.01
0.15
.
.
-0.42
0.08 -0.28 0.07
.
0.09
.
.
.
0.12
.
.
.
0.01
.
.
.
0.17 0.99 0.15 1.08
2.12 33.37 2.19 34.02
s.e. mean s.e.
0.50 -7.18 0.51
0.27 -1.57 0.27
0.04 -0.04 0.04
0.05 0.01 0.05
0.12 -0.31 0.13
.
.
.
.
-0.18 0.08
.
-0.17 0.10
.
.
.
0.15 1.17 0.15
2.25 33.88 2.28
* - absolute difference
leisure - number of common leisure activities (out of 15 possible)
music - number of common music genres (out of 16 possible)
distance - beeline distance between two students’ homes (measured in km)
money - pocket money per month in British pounds
popularity of j - number of individuals, excluding i, who form links with j
reciprocity - reciprocated friendship link
The simulation results confirm that models where links are pairwise independent are
not attractive models of network formation games in the context of social networks
unless some specific structure that leads to clustering is imposed on unobservable
characteristics. The results highlight the need to explore alternative models of network formation and their properties.
21
Table 3: Simulated vs. Real Networks
average indegree
s.d. indegree
average outdegree
s.d. outdegree
average clustering
average local clustering
female
male
mixed
Dyadic Regression
real data M1 M2
2.76
2.71 2.73
2.06
1.76 1.68
2.76
2.71 2.73
1.42
1.73 1.68
0.13
0.02 0.02
0.09
0.01 0.01
0.47
0.47 0.47
0.47
0.47 0.47
0.07
0.07 0.07
Model
M3
2.75
1.69
2.75
1.68
0.02
0.01
0.47
0.47
0.07
average indegree
s.d. indegree
average outdegree
s.d. outdegree
average clustering
average local clustering
female
male
mixed
Latent Space Model
real data M1 M2 M3
2.76
3.06 3.05 2.88
2.06
2.02 1.92 1.85
2.76
3.06 3.05 2.88
1.42
2.01 1.94 1.85
0.13
0.03 0.02 0.02
0.09
0.02 0.02 0.02
0.47
0.47 0.47 0.47
0.47
0.47 0.47 0.47
0.07
0.07 0.07 0.07
M4
2.71
1.68
2.71
1.68
0.02
0.01
0.47
0.47
0.07
M4
3.16
1.97
3.16
1.94
0.03
0.02
0.47
0.47
0.07
female - percentage of linked pairs that are between females
male - percentage of linked pairs that are between males
mixed - percentage of linked pairs that are between a male and a female
6.3
Bayes Factor
To compare the models I use the criterion proposed by Kass and Raftery (1995).
p(D|M1 )
should be interpreted as
According to this criterion a Bayes Factor B12 = p(D|M
1)
shown in Table 4. In all four specifications of the utility function the latent position
model performs slightly better than the model with only observable characteristics,
however, the evidence is too weak to draw any conclusions. Further results with
different specifications of the latent space model in terms of the dimension of the
latent space and the distribution of the unobservable characteristics is necessary.
22
Table 4: Interpretation of Bayes Factor
Bayes Factor
1-3.2
3.2-10
10-100
>100
Evidence in favor of M1
Not worth more than a bare mention
Substantial
Strong
Decisive
Table 5: Marginal Likelihoods and Bayes Factors
dyadic
latent
latent/dyadic
7
Log Marginal Likelihoods
M2
M3
M4
-1058.043 -1060.898 -1062.566
-975.716 -996.677 -983.440
Bayes Factors
M1
M2
M3
M4
2.496
2.515
2.559
2.523
M1
-1061.769
-971.121
Conclusions and Continued Work
The preliminary results confirm that models that treat links as pairwise independent
do not predict the level of clustering that is observed in real-world data. Before
drawing any deeper conclusions about the goodness of fit of the models discussed
in this paper it is necessary to have more results. Therefore, the next steps are to
calculate the Bayes factor for the exponential random graph model and the generalized dyadic regression. Moreover, different specifications of the structure of the
latent space model might yield different results. Specifically, the model should be
estimated with different priors on the covariance of the positions of nodes in the
latent space. An example of such a model is described in (Handcock et al., 2007),
where the latent space is generated by a mixture of multivariate normal distributions.
Another question that should be taken into account is whether the observable
characteristics of the nodes are determinants of the network formation process or
whether they are a consequence of the network that is formed. For example individuals who smoke might be more prone to form links with other smokers but it could
also be true that once the network is formed peers affect each others’ smoking habits
(generating so-called peer effects). Analyzing models that include network formation
and individual outcomes in the network might help shed light on the above question.
23
Such models can roughly be classified into two types: models where actions and
links are chosen simultaneously and models where the network is formed before any
actions are taken. Both types of models estimate network formation and peer effects
but part from a different assumption about the network formation game.
An example of the first type of model is proposed by Badev (2013). By allowing
actions and friendships to be jointly chosen, his framework extends the literature
on social interactions, which in general either models choices, taking the social network as given, or which models friendship selection without incorporating additional
choices. This type of model is of interest in situations where the network is formed
at the same time that actions are chosen or when the network is formed taking into
account future actions.
A different approach is to let the network form in a myopic way prior to the realization of the outcomes, as in Hsieh and Lee (2011). Their model is justified by a setting
in which the network if formed for other purposes than playing the game that leads
to the outcomes of interest. An example could be a school friendship network and
grades, as it is unlikely that students from links taking into account the effect of their
peers on their academic performance. In some cases it is fairly clear whether links
are formed at the same time as actions are taken, in some situations it is ambiguous.
Therefore, comparing models using Bayesian model selection might yield interesting
insights.
Moreover, when estimating games of network formation and peer effects it is important to take into account that unobserved factors may directly determine link
formation as well as other actions taken by individuals, thus rendering the network
endogenous. This situation is modeled by Hsieh and Lee (2011) and GoldsmithPinkham and Imbens (2013). In addition, the longitudinal nature of the data can
be explored to analyze temporal dependencies as in Goldsmith-Pinkham and Imbens
(2013), where links in any given period are a function of links in previous periods.
References
Badev, A. (2013). Discrete Games in Endogenous Networks : Theory and Policy.
Bhamidi, S., G. Bresler, and A. Sly (2008, October). Mixing Time of Exponential
Random Graphs. 2008 49th Annual IEEE Symposium on Foundations of Computer
Science, 803–812.
Boucher, V. and I. Mourifi (2013). My Friend Far Far Away : Asymptotic Properties
of Pairwise Stable Networks. (November 2012).
24
Brooks, S. P. and A. Gelman (1998, December). General Methods for Monitoring
Convergence of Iterative Simulations. Journal of Computational and Graphical
Statistics 7 (4), 434–455.
Chandrasekhar, A. and M. Jackson (2012). Tractable and consistent random graph
models. arXiv preprint arXiv:1210.7375 .
Chib, S. and I. Jeliazkov (2001, March).
Marginal Likelihood From the
MetropolisâĂŞHastings Output. Journal of the American Statistical Association 96 (453), 270–281.
Friel, N. (2013). Evidence and Bayes factor estimation for Gibbs random fields.
Journal of Computational and Graphical Statistics (Besag 1974), 1–21.
Friel, N. and A. Pettitt (2008). Marginal likelihood estimation via power posteriors.
Journal of the Royal Statistical Society: . . . , 589–607.
Goldsmith-Pinkham, P. and G. W. Imbens (2013). Social Networks and the Identification of Peer Effects. Journal of Business & . . . (December).
Handcock, M. S., A. E. Raftery, and J. M. Tantrum (2007, March). Model-based
clustering for social networks. Journal of the Royal Statistical Society: Series A
(Statistics in Society) 170 (2), 301–354.
Hoff, P. D., A. E. Raftery, and M. S. Handcock (2002, December). Latent Space
Approaches to Social Network Analysis. Journal of the American Statistical Association 97 (460), 1090–1098.
Hsieh, C. and L. Lee (2011). A social interactions model with endogenous friendship
formation and selectivity. pp. 1–70.
Jackson, M. (2013). Unraveling Peers and Peer Effects: Comments on GoldsmithPinkham and Imbens’âĂIJSocial Networks and the Identification of Peer EffectsâĂİ. (March), 1–7.
Jackson, M. and A. Wolinsky (1996). A strategic model of social and economic
networks. Journal of economic theory 74 (0108), 44–74.
Kass, R. and A. Raftery (1995). Bayes factors. Journal of the american statistical
....
Leung, M. (2013). Two-Step Estimation of Network-Formation Models with Incomplete Information. Available at SSRN 2254145 , 1–37.
25
Mele, A. (2010). A structural model of segregation in social networks.
Meng, X. and W. Wong (1996). Simulating ratios of normalizing constants via a
simple identity: a theoretical exploration. Statistica Sinica 6, 831–860.
Michell, L. and a. Amos (1997, June). Girls, pecking order and smoking. Social
science & medicine (1982) 44 (12), 1861–9.
Michell, L. and P. West (1996). Peer pressure to smoke: the meaning depends on
the method. Health education research 11 (l), 39–49.
Neal, R. (2001). Annealed importance sampling. Statistics and Computing, 125–139.
Pearson, M. and P. West (2003). Social Network Analysis and Markov Processes in
a Longitudinal Study of Friendship Groups and Risk-taking. Connections 25 (2),
59–76.
Sheng, S. (2012). Identification and Estimation of Network Formation Games. pp.
1–63.
Snijders, T. (2002). Markov chain Monte Carlo estimation of exponential random
graph models. Journal of Social Structure.
Wasserman, S. and K. Faust (1994). Social network analysis : methods and applications, Volume 24.
26
Appendix A
Data
Table 6: Distribution of Selected Characteristics
sex
cannabis
smoking
alcohol
(value) characteristic
(1) male
(2) female
(0) never
(1) tried once
(2) occasional
(3) regular
(0) never
(1) occasional
(2) regular
(0) never
(1) once or twice a year
(2) once a month
(3) once a week
(4) more than once a week
count
46.00
49.00
65.00
16.00
13.00
1.00
77.00
10.00
8.00
7.00
40.00
23.00
21.00
4.00
percent
48.42
51.58
68.42
16.84
13.68
1.05
81.05
10.53
8.42
7.37
42.11
24.21
22.11
4.21
Table 7: Summary Statistics of Student Pair Characteristics
age*
sex*
money*
leisure
distance
cannabis*
smoking*
alcohol*
all pairs
mean
0.34
0.50
6.92
6.58
1.63
0.71
0.47
1.12
(8930)
s.d.
0.25
0.50
6.73
1.65
1.14
0.82
0.72
0.92
linked pairs (261) unlinked pairs (8669)
mean
s.d.
mean
s.d.
0.32
0.25
0.34
0.25
0.07
0.25
0.52
0.50
6.08
6.08
6.94
6.75
6.91
1.69
6.57
1.65
1.34
1.01
1.64
1.14
0.61
0.75
0.71
0.83
0.31
0.59
0.47
0.73
0.88
0.84
1.12
0.92
* - absolute difference
money - pocket money per month in British pounds
leisure - number of common leisure activities (out of 15 possible)
distance - beeline distance between two students’ homes (measured in km)
Appendix B
B.1
Estimated Parameters
Dyadic Regression Model
27
Table 8: Dyadic Regression: Maximum Likelihood Estimates of Preference Parameters
const
sex
leisure
music
smoking
distance
alcohol
cannabis
money
mean
-2.93
-2.73
0.10
0.12
-0.24
-0.27
-0.23
-0.02
-0.02
s.e. mean s.e.
0.31 -3.32 0.30
0.25 -2.74 0.25
0.04 0.10 0.04
0.05 0.11 0.04
0.12
.
.
0.07 -0.29 0.07
0.08
.
.
0.09
.
.
0.01
.
.
mean
-3.60
-2.73
0.09
0.13
-0.38
.
.
.
.
s.e. mean s.e.
0.29 -3.39 0.30
0.25 -2.72 0.25
0.04 0.10 0.04
0.04 0.13 0.04
0.11 -0.30 0.12
.
.
.
.
-0.25 0.08
.
-0.03 0.09
.
.
.
Table 9: Dyadic Regression Model 1
const
sex
smoking
cannabis
alcohol
leisure
distance
music
money
mean
-2.91
-2.74
-0.25
-0.02
-0.24
0.10
-0.28
0.12
-0.02
s.d. 5th pctile
0.31
-3.43
0.25
-3.16
0.12
-0.45
0.09
-0.17
0.08
-0.37
0.04
0.04
0.07
-0.39
0.05
0.05
0.01
-0.04
median
-2.90
-2.74
-0.25
-0.02
-0.23
0.10
-0.28
0.12
-0.02
95th pctile
-2.39
-2.34
-0.06
0.14
-0.10
0.17
-0.17
0.19
-0.00
MLE
-2.93
-2.73
-0.24
-0.02
-0.23
0.10
-0.27
0.12
-0.02
Table 10: Dyadic Regression Model 2
const
sex
leisure
distance
music
mean
-3.28
-2.75
0.09
-0.29
0.11
s.d. 5th pctile
0.30
-3.79
0.26
-3.19
0.04
0.03
0.07
-0.41
0.04
0.04
median
-3.28
-2.74
0.09
-0.29
0.11
95th pctile
-2.79
-2.35
0.16
-0.18
0.19
MLE
-3.32
-2.74
0.10
-0.29
0.11
Table 11: Dyadic Regression Model 3
const
sex
leisure
smoking
music
mean
-3.58
-2.74
0.09
-0.38
0.13
s.d. 5th pctile
0.28
-4.05
0.25
-3.17
0.04
0.03
0.11
-0.55
0.04
0.05
median
-3.58
-2.73
0.09
-0.38
0.13
95th pctile
-3.11
-2.34
0.16
-0.21
0.20
28
MLE
-3.60
-2.73
0.09
-0.38
0.13
Table 12: Dyadic Regression Model 4
const
sex
smoking
cannabis
alcohol
leisure
music
mean
-3.37
-2.73
-0.31
-0.03
-0.25
0.10
0.13
s.d. 5th pctile
0.29
-3.85
0.25
-3.16
0.12
-0.51
0.09
-0.18
0.08
-0.38
0.04
0.03
0.04
0.05
median
-3.36
-2.72
-0.31
-0.03
-0.25
0.09
0.13
95th pctile
-2.89
-2.32
-0.11
0.12
-0.12
0.16
0.20
29
MLE
-3.39
-2.72
-0.30
-0.03
-0.25
0.10
0.13
B.2
Latent Regression Model
Table 13: Latent Regression Model 1
const
sex
smoking
cannabis
alcohol
leisure
distance
music
money
mean
-2.91
-2.74
-0.25
-0.02
-0.24
0.10
-0.28
0.12
-0.02
s.d. 5th pctile
0.31
-3.43
0.25
-3.16
0.12
-0.45
0.09
-0.17
0.08
-0.37
0.04
0.04
0.07
-0.39
0.05
0.05
0.01
-0.04
median
-2.90
-2.74
-0.25
-0.02
-0.23
0.10
-0.28
0.12
-0.02
95th pctile
-2.39
-2.34
-0.06
0.14
-0.10
0.17
-0.17
0.19
-0.00
MLE
-2.93
-2.73
-0.24
-0.02
-0.23
0.10
-0.27
0.12
-0.02
Table 14: Latent Regression Model 2
const
sex
leisure
distance
music
mean
-3.28
-2.75
0.09
-0.29
0.11
s.d. 5th pctile
0.30
-3.79
0.26
-3.19
0.04
0.03
0.07
-0.41
0.04
0.04
median
-3.28
-2.74
0.09
-0.29
0.11
95th pctile
-2.79
-2.35
0.16
-0.18
0.19
MLE
-3.32
-2.74
0.10
-0.29
0.11
Table 15: Latent Regression Model 3
const
sex
leisure
smoking
music
mean
-3.58
-2.74
0.09
-0.38
0.13
s.d. 5th pctile
0.28
-4.05
0.25
-3.17
0.04
0.03
0.11
-0.55
0.04
0.05
median
-3.58
-2.73
0.09
-0.38
0.13
95th pctile
-3.11
-2.34
0.16
-0.21
0.20
MLE
-3.60
-2.73
0.09
-0.38
0.13
Table 16: Latent Regression Model 4
const
sex
smoking
cannabis
alcohol
leisure
music
B.3
mean
-3.37
-2.73
-0.31
-0.03
-0.25
0.10
0.13
s.d. 5th pctile
0.29
-3.85
0.25
-3.16
0.12
-0.51
0.09
-0.18
0.08
-0.38
0.04
0.03
0.04
0.05
median
-3.36
-2.72
-0.31
-0.03
-0.25
0.09
0.13
95th pctile
-2.89
-2.32
-0.11
0.12
-0.12
0.16
0.20
Generalized Dyadic Regression
30
MLE
-3.39
-2.72
-0.30
-0.03
-0.25
0.10
0.13
Table 17: Generalized Dyadic Regression
const
sex
leisure
music
smoking
distance
alcohol
cannabis
money
outdegree
reciprocity
mean
-4.24
-1.61
0.07
0.02
-0.30
-0.22
-0.10
0.03
-0.02
0.01
30.29
const
sex
leisure
music
smoking
distance
alcohol
cannabis
money
friends in common
reciprocity
s.d. mean s.d. mean s.d. mean
0.76 -3.23 0.68 -2.78 0.73 -2.58
0.26 -1.63 0.27 -1.56 0.27 -1.55
0.04 0.03 0.04 0.03 0.04 0.04
0.05 0.03 0.05 0.06 0.05 0.06
0.14
.
.
-0.50 0.13 -0.46
0.07 -0.30 0.07
.
.
.
0.08
.
.
.
.
-0.15
0.10
.
.
.
.
-0.02
0.01
.
.
.
.
.
0.28 -0.43 0.25 -0.74 0.27 -0.77
2.16 32.97 2.21 33.73 2.28 33.32
s.d.
0.73
0.27
0.04
0.05
0.14
.
0.08
0.10
.
0.27
2.29
mean s.d. mean s.d.
-4.71 0.38 -5.02 0.36
-1.42 0.29 -1.36 0.29
-0.01 0.04 -0.01 0.04
0.02 0.05 0.04 0.05
.
.
-0.36 0.12
-0.28 0.07
.
.
.
.
.
.
.
.
.
.
.
.
.
.
7.24 2.93 7.26 3.00
30.74 2.33 31.35 2.39
* - absolute difference
leisure - number of common leisure activities (out of 15 possible)
music - number of common music genres (out of 16 possible)
distance - beeline distance between two students’ homes (measured in km)
money - pocket money per month in British pounds
reciprocity - reciprocated friendship link
friends in common for a pair i and j - gki gkj
Appendix C
MCMC Convergence Diagnostics
31
Figure 3: Sample Autocorrelation Diagnostics Dyadic Regression Model
(a) β1
(b) β2
(c) β3
(d) β4
(e) β5
32
(f)
Figure 4: Sample Autocorrelation Diagnostics Dyadic Regression Model
(a) β1
(b) β2
(c) β3
(d) β4
(e) β5
33
(f)
Figure 5: Mixing Dyadic Regression Model
(a) β1
(b) β2
(c) β3
(d) β4
(e) β5
34
(f)
Appendix D
Algorithms
Algorithm 1: Approximate Exchange Algorithm
Data: Observed network g and covariates X
Result: Draws from posterior distribution p(θ|g, X)
1
2
Initialize g (0) = g, θ(0)
for t = 1 : T do
3
θ0 ∼ qθ (·|θ(t−1) )
4
5
6
(38)
Using the parameter θ0
for r = 1 : R do
Propose g 0 from a proposal distribution
g 0 ∼ qg (g (r) |g (r−1) )
7
Update the network
g (r)
where
8
9
10
(
g0
with probability αg
=
g (r−1) , with probability 1 − αg
exp[Q(g 0 , X, θ0 )] qg (g (r−1) |g 0 )
αg = min 1,
exp[Q(g (r−1) , X, θ0 )] qg (g 0 |g (r−1) )
(40)
(41)
end
Collect the last simulated network g 0
Update the parameter
(
θ0
with probability αθ
θ(t) =
(t−1)
θ
, with probability 1 − αθ
where
11
(39)
exp[Q(g 0 , X, θ)] p(θ0 ) qθ (θ|θ0 ) exp[Q(g, X, θ0 )]
αθ = min 1,
exp[Q(g, X, θ)] p(θ) qθ (θ0 |θ) exp[Q(g 0 , X, θ0 )]
where p(·) is the prior distribution of θ.
end
Appendix E
Network
35
(42)
(43)
Figure 6: Friendship Network
36