Latent space models (LSM) are a well known family of latent variable models for network data introduced by Hoff et al. (2002) under the basic assumption that each node has an unknown position in a D-dimensional Euclidean latent space: generally the smaller the distance between two nodes in the latent space, the greater the probability of them being connected. Unfortunately, the posterior distribution of the LSM cannot be computed analytically. For this reason we propose a variational inferential approach which proves to be less computationally intensive than the MCMC procedure proposed in Hoff et al. (2002) (implemented in the latentnet package) and can therefore easily handle large networks. Salter-Townshend and Murphy (2013) applied variational methods to fit the LSM with the Euclidean distance in the VBLPCM package. In this package, a distance model with squared Euclidean distance is used. We follow the notation of Gollini and Murphy (2016).

lsm(Y, D, sigma = 1, xi = 0, psi2 = 2, Niter = 100, Miniter = 10,
  tol = 0.1^2, randomZ = FALSE, nstart = 1)

Arguments

Y

(N x N) binary adjacency matrix

D

integer dimension of the latent space

sigma

(D x D) variance/covariance matrix of the prior distribution for the latent positions. Default sigma = 1

xi

mean of the prior distribution of \(\alpha\). Default xi = 0

psi2

variance of the prior distribution of \(\alpha\). Default psi2 = 2

Niter

maximum number of iterations. Default Niter = 100

Miniter

minimum number of iterations. Default Miniter = 10

tol

desired tolerance. Default tol = 0.1^2

randomZ

logical; If randomZ = TRUE random initialization for the latent positions is used. If randomZ = FALSE and D = 2 or 3 the latent positions are initialized using the Fruchterman-Reingold method and multidimensional scaling is used for D = 1 or D > 3. Default randomZ = FALSE

nstart

number of starts

Value

List containing:

  • lsmEZ (N x D) matrix containing the posterior means of the latent positions

  • lsmVZ (D x D) matrix containing the posterior variance of the latent positions

  • xiT mean of the posterior distribution of \(\alpha\)

  • psi2T variance of the posterior distribution of \(\alpha\)

  • Ell expected log-likelihood

References

Gollini, I., and Murphy, T. B. (2016), 'Joint Modelling of Multiple Network Views', Journal of Computational and Graphical Statistics, 25(1), 246-265 http://arxiv.org/abs/1301.3759.

Hoff, P., Raftery, A., and Handcock, M. (2002), "Latent Space Approaches to Social Network Analysis", Journal of the American Statistical Association, 97, 1090--1098.

See also

Examples

### Simulate Undirected Network N <- 20 Y <- network(N, directed = FALSE)[,] modLSM <- lsm(Y, D = 2) plot(modLSM, Y)