A major update to nwcommands: network analysis in Stata
2 December 2026
I have released a major update to nwcommands, the collection of network analysis commands for Stata that I have been developing, on and off, for many years. Over the past year I have substantially revised and extended the software, including a new computational backend and a much broader range of methods.
Statistical network models
The most significant addition is a family of seven packages for statistical network modelling:
- nwergm: exponential random graph models (ERGMs)
- nwsaom: stochastic actor-oriented models (SAOMs), including network–behaviour co-evolution
- nwrem: relational event models (REMs)
- nwdynam: dynamic network actor models (DyNAMs)
- nwalaam: autologistic actor attribute models (ALAAMs)
- nwlsm: latent space models
- nwsbm: stochastic block models
The original nwcommands package has also been extensively modernised, covering network data management, visualisation, descriptive analysis, network generators, simulation and much more.
The modelling packages draw on the methodological work and software developed by many colleagues in the network analysis community. An important aim has been to make these methods accessible within Stata, particularly for researchers who already use Stata for other parts of their empirical work. The implementations have been tested against established software, and much of the backend has been rewritten using Mata and compiled code, resulting in substantial performance improvements. In a number of benchmarks, the new implementations also perform favourably compared with corresponding R packages. The website includes benchmark results and further technical details.
Documentation and teaching resources
The website includes step-by-step tutorials, instructional videos, example datasets, interactive demonstrations, teaching slides, course materials and exercises. Each statistical modelling package also has a detailed technical manual covering its mathematical formulation, estimation algorithms, implementation choices and diagnostics. I hope these resources will be useful both for researchers applying the methods and for colleagues teaching network analysis.
Installation
The software is open source and freely available under the GPL. It requires Stata 17 or later:
net install nwcommands, from(https://nwcommands.org/net/) replace
nwinstall, everything
Source code and issue trackers are available on GitHub.
Book and workshops
Alongside the software, I have been working on a companion textbook, Network Analysis with Stata: Concepts, Methods, and Applications, which is under contract with Stata Press. It covers network concepts, descriptive analysis, simulation and statistical network models, with worked examples and exercises.
I am also planning workshops on network analysis with Stata, including one in connection with Sunbelt 2027 in Montréal (21–26 June 2027). If you are interested in organising a workshop at your institution, whether on introductory network analysis or more advanced statistical modelling, I would be happy to discuss possibilities.
I would particularly welcome feedback from colleagues working on these models, including suggestions, comparisons with other implementations and reports of problems.