Skip to content

nwdynam 1.3.0

Choose a tag to compare

@thomas-u-grund thomas-u-grund released this 13 Nov 05:49
· 65 commits to main since this release

Results that change (read before you re-run old analyses)

  • Covariate effects on a dataset whose rows are not in actor order but carry _nwnode: the covariate is now matched to the right actors.
  • Fits that silently used events with a missing time or a missing actor now stop with r(416).
  • Valued event networks (a third variable in nwset ..., eventtime()): weightedinertia, weightedrecip, weightedindeg and weightedoutdeg sum the event values instead of counting events, as goldfish does. Values of 0 or below also change the unweighted effects: an event with the value 0 creates no tie, a negative value can remove one (every effect then sees the tie as absent), and the unweighted indeg/outdeg add the sign of each tie value (a tie below 0 counts -1), all as in goldfish. With only positive values the unweighted effects do not change; networks without a value variable do not change at all.
  • Windows on a network with values of 0 or below use the summed value of the events within the window (a tie is present while it is above 0); with positive values nothing changes.

Fixed

  • Covariates (same(), diff(), sim(), ego(), alter(), tertius(), egoalterint()) are matched to the actors by their node labels (variable _nwnode, as after nwload, xvars) instead of by row position; a re-sorted dataset no longer misaligns them. Without _nwnode the data must still have one row per actor in actor order. An actor without a row, or with more than one, is refused (r(198)).
  • A missing covariate value is refused (r(416)); before, alter()/ego() failed with r(111) after many optimizer lines and same() silently treated missing as a category of its own.
  • Events with a missing time, or with a sender or receiver that is not an actor of the network (for example a missing id), are refused (r(416)); before, the native engines silently fitted them (an event without a time as the last event, a missing id as actor 0) and the other engines gave raw Mata errors.
  • opportunities(): as in goldfish, the realised receiver of every event must be among the available actors (r(198)); before, the fit ran with a log likelihood of -1e300. Rows with a missing value are refused (r(416)) instead of a raw Mata error.
  • A failed fit no longer leaves the user in the helper frame __nwdynam_native (which made every later nwdynam call fail with r(3598)); the helper scalar __nwdynam_sequential is removed after errors as well.
  • A self-loop event gives its message and r(3498); the message was lost (Mata r(3300)) because it was too long for Mata's _error().
  • An effect with zero variance (for example a window that no earlier event falls into) is listed in e(unidentified) and in the note.
  • The window options and seed() no longer treat -1 as "not given": windows must be positive numbers, seed() an integer from 0 to 2147483647 (r(198) otherwise).
  • nwdynam without arguments (or with level() only) after an nwdynam fit redisplays the results, and estimates replay works (it used to refit the current network); new option level(), new stored result e(header).
  • Help: seed() describes which effect sets start from random values (the default effect sets use fixed starts).
  • Event values are used as in goldfish (needs the core with event values, nwset sender receiver value, eventtime(time)): the value of an event is added to the tie (goldfish's increment); a tie exists while its value is above 0. Before, every event counted 1 and the values were ignored. Events with a missing value are refused (r(416)).
  • A weighted effect can be combined with its own window (weightedinertia inertiawindow(), weightedrecip recipwindow(), weightedindeg indegwindow(), weightedoutdeg outdegwindow()): the summed value of the events within the window, as goldfish's weighted = TRUE, window =. Before, the combination was refused (r(198)).

Changed

  • Rebuilt for nwcommands 3.22.0; requires core 3.22.0 or later.

Mata library lnwdynam.mlib rebuilt with Stata 17 against the new core library (new functions dynam_node_rows() and dynam_window_expire(), self-loop message, event values). The native plugin dynam_sim takes the event values (used only when some value is 0 or below); rebuilt for macOS, Linux and Windows.

Tested on macOS with Stata 17 BE, Stata 18 BE and StataNow 19.5 MP (the full test suite). Windows and Linux: plugins built by CI; the Windows plugin was not yet tested in Stata for this release.