nwlsm: Latent space models for networks in Stata. Manual
This is the user manual and reference of nwlsm, series 1.0 (examples produced with version 1.0.0 and the nwcommands core 3.29.0), a Stata package for latent space models of networks: models in which every actor has a position in a latent space of one to ten dimensions and the probability of a tie depends on the distance between the positions (Euclidean model) or on their inner product (bilinear model). nwlsm builds on the nwcommands core package and follows the R package latentnet (Krivitsky and Handcock) in its model, priors, minimum Kullback-Leibler positions, latent clusters and BIC, and the latent space model of Hoff, Raftery and Handcock; it adds the latent space model for social influence of Sweet and Adhikari. The posterior is sampled by MCMC in a compiled plugin, with parallel chains. The manual describes the installation, the model and its priors, the data and the syntax, every option, worked examples (the karate club, Sampson's monks, the Lazega law firm, and simulated data for the influence model) for covariates, random sender, receiver and sociality effects, the bilinear term, latent clusters and the choice of their number by BIC, valued networks (Poisson, binomial, normal) and social influence, post-estimation, diagnostics and goodness of fit, the plot options (name, saving, export), the comparison of models, the validation against latentnet and by simulation, and the limits of the package. nwlsm requires the nwcommands core package (version 3.29.0 or later) and Stata 17 or later and is meant for researchers who work in Stata. It is not a replacement for latentnet, which remains the reference implementation, and it is not affiliated with or endorsed by its authors. The software is free software under the GNU General Public License, version 3. were prepared withthe help of an AI coding assistant working under the author's direction, as statede this manual(all-versions DOI) and report the exact version printed by nwlsm version.
Authors
- Thomas Grund (ORCID: https://orcid.org/0000-0001-6751-5429)
Institutions
- RWTH Aachen University (DE)
Publication Details
- Journal
- Zenodo (CERN European Organization for Nuclear Research)
- Published
- 2026-11-20
- DOI
- https://doi.org/10.5281/zenodo.24398243
- Primary Topic
- Complex Network Analysis Techniques
- Type
- article
- Field-Weighted Citation Impact
- 0.00