de programas de posgrado en el 2008.
2. Identificación del problema y la metodología a aplicar.
2.3 Los objetivos de la investigación.
Although the two data sets that we will analyze in Section 3.5 are relatively small data sets, it is likely that researchers will come across network data which is too large for the MCMC algorithm of Section 3.2.2 to be a viable option. Here we extend the case control log likelihood approximation method by Raftery et al. (2012) for models whose dyads can be described by an exponential family of distributions.
For the MCMC algorithm, the MH steps required in updating the latent positions, r, βIN, βOU T
and other likelihood related parameters (e.g., γ2 in the case of non-negative real dyads) all require
O(T n2) terms to be summed. In this discussion we will assume here that a non-relationship between
two actors implies that yijt = 0, otherwise yijt is some positive value; the principles discussed next
ought to hold even if this is not the case. Generalizing the approximation method first proposed by Raftery et al. (2012), we can reduce this computational cost to O(T n).
Suppose that, conditional on the latent positions, the yijt’s are independent with
where ηijtis a vector valued function of (Xt, Ψ) and T(yijt) is a vector of sufficient statistics. Then
we can rewrite the loglikelihood of (Y1, . . . , YT) as
`(X1, . . . ,XT, Ψ) = T X t=1 n X i=1 X j:yijt>0
ηijt0 T(yijt) + A(ηijt)
+ X
j:yijt=0
η0ijtT(yijt) + A(ηijt)
+ constant. (3.18)
It is reasonable to assume that as the network gets larger and larger, the number of edges of each node does not grow at the same rate (the network gets sparser). Hence we make the assumption that either the maximum degree is fixed or is of o(n). If this is the case, then we can, for each i and t, take a subsample{jk}
Ni,t,0
k=1 from the set{j : yijt = 0} and use a simple Monte Carlo estimate of
the final summation of (3.18) to reduce the computational cost to linear with respect to n. Then the approximation we use of the log likelihood is
`(X1, . . . ,XT, Ψ)≈ T X t=1 n X i=1 X j:yijt>0
ηijt0 T(yijt) + A(ηijt)
+ni,t,0 Ni,t,0 Ni,t,0 X k=1 ηij0 ktT(yijkt) + A(ηijkt) + constant, (3.19)
where ni,t,0 = |{j : yijt = 0}|. In most cases, T(yijt) = 0 if yijt = 0 and hence the above
can be simplified such that the second summation is only ni,t,0
Ni,t,0
PNi,t,0
k=1 A(ηijkt). Also, there could
potentially be multiple methods of selecting the subsequences {jk} Ni,t,0
k=1 ; see Raftery et al. (2012)
for more details.
For T = 1 and yijt ∈ {0, 1}, this leads to Raftery et al.’s approximation. For the context
presented in Section 3.1.1, we can approximate the log likelihood as
`(X1, . . . ,XT, Ψ)≈ T X t=1 n X i=1 X j:yijt>0 −12log(γ2)− 1 2γ2(yijt− E(y ∗ ijt|Xt, Ψ))2 +ni,t,0 Ni,t,0 Ni,t,0 X k=1
log1− Φ(E(y∗ijt|Xt, Ψ)/γ)
tion 3.1. Suppose we can augment the data by component indicator variables zijt ∈ {1, 2}, such
that π(yijt|zijt = 1,·) = δ(yijt), π(yijt|zijt = 2,·) can be constructed according to (3.3), π(zijt =
1) = α, and δ is the Dirac delta function. Then we can write the complete log likelihood (i.e., π(Y1, . . . , YT, Z1, . . . , ZT|·)) as `(X1, . . . ,XT, Ψ) = T X t=1 n X i=1 X j:yijt>0 log(1 − α) + η0
ijtT(yijt) + A(ηijt)
+ni,t,0 Ni,t,0 Ni,t,0 X k=1 h 1{z
ijkt=1}log(α) + 1{zijkt=2}
log(1− α) + ηij0 ktT(yijkt) + A(ηijkt) i + constant, (3.21)
where [Zt]ij = zijt. Since the zijt’s are nuisance parameters, we need not sample all of them in the
Gibbs sampler, but rather only the zijt’s corresponding to each of the n subsequences {jk} Ni,t,0
k=1 ,
thus maintaining the computational cost of O(T n).
3.4
Simulations
3.4.1
Simulated Count Data
Ten data sets were simulated, where the number of actors was 100 and the number of time points was 10. For each of the simulations, the parameter values were set at βIN = 2, βOU T = 1, and
σ2= 5
× 10−7. The latent positions at time 1 were drawn from a mixture of 12 normals with equal
mixture component weights, where the cluster means were drawn randomly from a multivariate normal distribution with mean zero and covariance (1× 10−5)Ip, and p = 2 is the dimension of
the latent space. After the initial latent positions X1 were drawn, the radii r were drawn from a
Dirichlet distribution whose ith parameter was equal to nkXi1k/ maxk{kXk1k}. Subsequent latent
positions Xt, t ≥ 2, were drawn according to (3.2). The adjacency matrices Y1 to YT were then
generated according to (3.5) and (3.6).
The priors for σ2and τ2were inverse gamma distributions with parameters formulated according
to the description in Section 3, with δ = 0.05, σ2
0 = 1× 10−4 and τ02 = 1/(np)
Pn
i=1kXi1k
2, using
the initial positions of Xi1. The prior for βIN was N (2, 100), for βOU T was N (2, 100), and for r was
Dirichlet with parameters equal to that given in (3.13). A normal random walk proposal was used for the latent positions Xt and also for both βIN and βOU T. The proposal for r was a Dirichlet
(a) Count edges (b) Non-negative real edges
Figure 3.1: Distributions of ratios of pairwise distances for simulated data with count, non-negative real, and rank edges. Each curve corresponds to a simulation.
distribution with parameters equal to κrcurr, where rcurr represents the current value of r.
To evaluate the simulation results, we compared the estimates of the coefficients βIN and βOU T
with the truth, evaluated the pseudo R2, and evaluated the pairwise ratios of estimated distances to true distances corresponding to the latent positions. The pseudo R2value is the deviance based pseudo R2 for count data found, and recommended, in Cameron and Windmeijer (1996). This is calculated as
R2= PT
t=1
P
i6=jyijtlog(ˆλijt/¯y)− (ˆλijt− ¯y)
PT t0=1 P i06=j0yi0j0t0log(yi0j0t0/¯y) (3.22) where ¯y =PT t=1 P
i6=jyijt and ˆλijt is found by plugging in the posterior mean estimates in (3.6).
To clarify what is meant by the distance ratios, note that for each simulation there are T n(n− 1)/2 distances within the latent space. We calculate all these pairwise distances using the posterior mean latent positions as well as using the true latent positions. So for each simulation we can plot a curve corresponding to the distribution of these ratios. We would hope for this curve to be narrow and centered at 1.
The posterior mean estimate, averaged over the ten simulations, for βIN (βOU T) whose true
value was 2 (1), was 2.013 (0.9859), ranging from 2.003 to 2.026 (0.9500 to 0.9998). We see that the posterior mean estimates are very close to the true value in every simulation. The pseudo R2
3.4.2
Simulated Continuous Data
Ten data sets were simulated, where the number of actors was 100 and the number of time points was 10. For each of the simulations, the parameter values were set at βIN = 10, βOU T = 2, γ2= 0.2, and
σ2= 5
× 10−6. The latent positions at time 1 were drawn from a mixture of 12 normals with equal
mixture component weights, where the cluster means were drawn randomly from a multivariate normal distribution with mean zero and covariance (5× 10−5)Ip, and p = 2 is the dimension of
the latent space. After the initial latent positions X1 were drawn, the radii r were drawn from a
Dirichlet distribution whose ith parameter was equal to n
kXi1k/ maxk{kXk1k}. Subsequent latent
positions Xt, t ≥ 2, were drawn according to (3.2). The adjacency matrices Y1 to YT were then
constructed by generating y∗ijt according to (3.8) and letting yijt= y∗ijt1{y∗ ijt>0}.
The priors for σ2, τ2 and γ2 were inverse gamma distributions with parameters formulated
according to the description in Section 3, with δ = 0.05, σ2
0 = 1× 10−4, τ02= 1/(nD)
Pn
i=1kXi1k 2
using the initial positions of Xi1, and γ02= 3. The priors for βIN and for βOU T were N (2, 100), and
for r was Dirichlet with parameters equal to that given in (3.13). A normal random walk proposal was used for the latent positions Xt and for both βIN and βOU T. The proposal used for γ2 was a
log-normal distribution with parameter log-mean equal to log((γ2)curr), where (γ2)curr represents the current value of γ2. The proposal for r was a Dirichlet distribution with parameters equal to κrcurr, where rcurr represents the current value of r.
To evaluate the simulation results, we compared the estimates of the coefficients βIN and βOU T
with the truth, evaluated the pseudo R2, and evaluated the pairwise ratios of estimated distance
to true distance. In this context of continuous non-negative data, we used the pseudo R2 value
recommended in Veall and Zimmermann (1994), originally derived by McKelvey and Zavoina (1975). This is calculated as
R2=
PT
t=1
P
i6=j(ˆyijt∗ − ˆ¯y∗)2
PT t0=1 P i06=j0(ˆyi∗0j0t0− ˆ¯y∗)2+ T n(n− 1)bγ2 , (3.23) where ˆy∗
ijt = ˆβIN(1− ˆdijt/ˆrj) + ˆβOU T(1− ˆdijt/ˆri) and ˆy¯∗ = 1/(T n(n− 1))P T t=1
P
i6=jyˆ∗ijt. The ˆ
symbol over the model parameters implies the posterior mean estimate.
The posterior mean estimate, averaged over the ten simulations, for βIN (βOU T) whose true
value was 10 (2), was 9.973 (1.970), ranging from 9.633 to 10.07 (1.900 to 2.104). We see that the posterior mean estimates are very close to the true value in every simulation. The pseudo R2values’
average was 0.9993, ranging from 0.9983 to 0.99999, implying that the posterior means fit the data extremely well. The distributions of the ratios of pairwise distances are given in Figure 3.1b, where
each curve corresponds to a simulation. From this figure we see that the distances from the posterior mean latent positions are very close to the true distances.