Fast network analysis in Stata: import, generate, describe, analyze and plot networks, and fit statistical network models, from the Stata command line or from dialog boxes.
How fast? The model packages compared with R
Start here Tutorials Command reference
nwplot
nwplot, interactive)What’s new
- Videos: short video tutorials, from installation to testing hypotheses, and on the statistical models.
- Workshops: two workshops are planned for Sunbelt 2027 in Montreal. To organize one elsewhere, get in touch: see Teaching and workshops.
- For instructors: slides, course outlines and a workshop.
- For readers of the book: do-files and an exercise bank.
The packages
The core: import, describe, analyze and plot networks
Exponential random graph models (ERGM)
3.5× as fast as ergm*
Stochastic actor-oriented models (SAOM)
3.9× as fast as RSiena*
Dynamic network actor models (DyNAM)
114× as fast as goldfish*
Relational event models (REM)
Autologistic actor attribute models (ALAAM)
Latent space models
4.7× as fast as latentnet*
Stochastic block models
3.3× as fast as sbm*†
* Median over the models of our benchmark: one Linux computer, one thread, default settings, 26 November 2026. For goldfish, its compiled engine, the faster one. † With R’s reference linear algebra library; with Intel’s MKL, tried on one network, R was faster. The programs do not always do the same amount of work: method, all results and limits.
Install
. net install nwcommands, from(https://nwcommands.org/net/) replace
. nwinstall, everything
Needs Stata 17 or later; Stata BE is enough. New here? Start here takes you from installation to your first network, then to your own data.