nwdynam

Dynamic network actor models (DyNAM) for Stata: who acts next, and whom do they choose, in a stream of timestamped events.

Install Start with Tutorial 1 nwdynam on GitHub

What nwdynam is

nwdynam fits dynamic network actor models (Stadtfeld and Block 2017) to relational event data: a list of who did what to whom, and when (phone calls, e-mails, messages, treaties). The model splits each event into two decisions. The rate model says which actor acts next (some people call more often than others, and more so when they are well connected). The choice model says, given the actor who acts, whom the actor picks (people call those they called before, those who called them, …). Each sub-model has its own effects and its own coefficients. nwdynam is a port of the R package goldfish to Stata and is part of the nwcommands family of packages.

Who it is for

nwdynam is for people who work in Stata, or prefer it to R, and who have a stream of timed events between actors. nwdynam follows the R package goldfish and is not a replacement for it: goldfish is the reference implementation and the more complete program, and the page nwdynam and goldfish says what nwdynam has and what it lacks. nwdynam is not affiliated with or endorsed by the authors of goldfish; errors in nwdynam are the author’s. For how a DyNAM differs from the other longitudinal models of the nwcommands family, see Intro to Longitudinal Network Models; the sister package for the simpler relational event model is nwrem.

Key facts

   
Sub-models choice, rate (ordinal partial likelihood, or with an intercept the continuous-time hazard), and choice_coordination for undirected events
Effects inertia, reciprocity, in- and out-degree, transitivity and other closure effects, covariate effects (same, diff, sim, ego, alter and more), windowed and weighted versions, a separate static network
Networks directed one-mode, undirected one-mode (coordination), two-mode (a narrow set of effects)
Agreement with goldfish coefficients and log likelihoods compared with goldfish 1.6.12 on its bundled Social Evolution data and on small hand-built examples
Engine a compiled plugin for the likelihood and gradient (macOS, Linux, Windows); the optimization runs in Mata
Speed Faster than goldfish in our benchmark: 7.7 to 76 times for the original structural effects (compiled plug-in), 1.2 to 2.4 times for an effect set that runs in Mata, with the gain shrinking as the number of actors grows; see Speed compared with R
Version 1.2.0 (26 October 2026)
License GNU General Public License, version 3

In this section


Table of contents


Back to top

nwcommands is free software under the GNU General Public License, version 3, as are the model packages nwsaom, nwergm, nwdynam and nwrem. Citing and licenses · Get help · GitHub. Issues with the core go to the nwcommands repository; issues with a model package go to that package's own repository.

This site uses Just the Docs, a documentation theme for Jekyll.