Skip to content

nwsaom 1.7.0

Choose a tag to compare

@thomas-u-grund thomas-u-grund released this 13 Nov 13:44
· 23 commits to main since this release

Added

  • Selection effects of every behavior in a model with several behaviors. behsim, behegox, behaltx, behegoplusalt and the netbeh() effects, written netbeh:effect, can be given in the effect list of any behavior of behavior(a1 a2 a3 : ... | s1 s2 s3 : ... behsim netbeh:higher); that behavior is then the covariate (RSiena's simX, egoX, ... with that behavior as interaction1). The coefficients of behaviors 2, 3, ... end in _name (behsim_s, bv_higher_s, natb_simrecipx_s). Observed statistics equal siena07's targets and the estimates agree with RSiena 1.6.14 on s50 (alcohol and smoking). Native plugin only; not with groups().
  • estat gof, estat simulate, estat importance, estat timetest and estat score after a fit with several behaviors (they stopped with an error). estat gof tests one behavior distribution per behavior, behavior_name (RSiena's sienaGOF() with BehaviorDistribution and varName); estat simulate reports one mean per behavior (behmean_name), generate() saves the behaviors as variables stub_s_pperiod_name, and ratesbeh() takes one rate per behavior and period; estat importance gives one table per behavior (RSiena's sienaRI()). Compared with RSiena 1.6.14 on s50 (alcohol and smoking): the importance sigmas are equal, the gof p-values, the simulated means, the time test and the score test agree within simulation error. Native plugin only; not with groups(). estat mems stays network-only, as after one behavior.
  • Several behaviors together with present(), structural zeros and ones, the network's endow()/creation() effects and a non-directed network (symmetric, every symtype()). These combinations were refused. The observed statistics and rate targets equal siena07's, and the estimates agree with RSiena 1.6.14 within simulation error on s50 with alcohol and smoking (composition change with joiners and leavers; structural zeros between two groups of actors; reciprocity split into endowment and creation; the symmetrised network with the forcing model). estat gof and estat simulate work after these fits. Native plugin only. ratecov() and missnet()/missbeh() are still refused with several behaviors.
  • String covariates in effects that compare categories. samex()/nodematch(), groups() and the other effects that only ask whether two actors share a value (the same*, hom*, jump* and unequalx effects, also as effect:variable in behx(), endow(), creation() and multinet) take a string variable. It is encoded for the fit (levels in alphabetical order) and put back afterwards; the estimates are those of the encoded variable. Uses _nwstrcat of nwcommands 3.20.1; with an older nwcommands the error says to update or to encode first. New test test_nwsaom_strcov.

Fixed

  • Help: the fix() entry said "not with nwsaom multinet", while the multinet section (and the code) take fix(); it now says that fix() works with nwsaom multinet.
  • A string variable in an effect that uses values as numbers stops with r(109). egox(), altx(), nodecov(), simx(), ratecov(), behavior() and the other numeric effects read a string variable as missing and fitted without it, without a message. The error names the variable and the effect.
  • Fixed effects are no longer judged by the convergence criterion. After a fit with fix(), the line on the convergence t-ratios could say "not met for indegpopularity (0.319)" although indegpopularity was fixed, and nwsaom refit, maxruns() counted that t-ratio too. As in RSiena (phase3.r: the largest |t| over the estimated parameters only), a parameter held fixed, by fix() or because its phase-1 derivative was not positive, is no longer reported as "not met"; detail still lists its t-ratio and names the fixed parameters, and e(tconv) keeps it. e(tconv_max) already left the fixed parameters out, as RSiena's tconv.max does. Estimates are unchanged. New test test_nwsaom_fixconv.
  • A model with several behaviors after a fit with several behaviors and behfrom() stopped with a Mata error, r(3301) in SaomBehCovFillDyn(): the behavior covariates of the earlier fit were not cleared completely.
  • behsim given as an option with several behaviors was ignored without a message; it is the behsim of the first behavior, as behsim in the effect list of that behavior (same estimates).
  • ml refuses the options it does not cover (present(), joinat(), leaveat(), missnet(), missbeh(), structural(), endowment/creation effects, non-directed models, rate covariates, two-mode data, several behaviors) before the method-of-moments fit it starts from; before, the whole fit ran and was printed before the refusal.

Changed

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

Tested on macOS with Stata 17 BE, Stata 18 BE and StataNow 19.5 MP (the full test suite), on Windows 11 with StataNow 19.5 MP and on Linux (Ubuntu 22.04) with StataNow 19.5 MP.