Repository navigation
Releases: thomas-u-grund/nwsaom
Release list
nwsaom 1.4.0
Minor release: joint estimation of several groups with several co-evolving behaviors. Works with nwcommands 3.6.0 and later. The Mata libraries lnwsaom1.mlib and lnwsaom2.mlib are rebuilt (Stata 17); the compiled plugin of this release is needed for this feature (an older plugin gives a clear message). Fits without this feature are unchanged.
Added
groups()now works with several co-evolving behaviors (behavior(a1 a2 a3 : ... | b1 b2 b3 : ...)): the constants RSiena keeps per group (mean, similarity mean) are per group for every behavior, each period of each group has its own network rate and its own rate for every behavior. Needs the compiled plugin of this release (protocol 152). Not withestatafter such a fit. Validated againstsiena07(three groups, alcohol and smoking, 10 seeds): effects and all rates agree; testtest_nwsaom_groups_mb.do.
nwsaom 1.3.4
Patch release (dialogs only). The Mata libraries and the plugin are unchanged.
Added
- Dialog box. New dialog
db nwsaom_simulate, opened by the button "Simulate..." under Related dialogs (new last tab "Related" of the main dialog). Its first choice is "Use the model of the last nwsaom fit" (estat simulate; chosen at opening when the last estimation was nwsaom, otherwise the second choice is). The second choice, "Specify the model" (nwsaom simulate), has fields for waves(), the effects in command syntax, theta(), behtheta(), rates(), ratesbeh() and a free field for other model options; nsim(), seed() and generate() serve both; nsim() is prefilled with 1 and generate() with sim (clear generate() to only print the summary, no networks are created; the simulate part of the postestimation dialog has the same defaults). The fields of the second choice are greyed out while the first is chosen. - Dialog box. The main dialog has a drop-down "Network type" (auto / directed / undirected / two-mode), set from the wave1 network, that greys out (never hides) the options that do not apply to the type, for example reciprocity-type effects on undirected networks, symtype() on directed ones, actormode() on one-mode ones. Which options apply is taken from the effects inventory; "auto" switches everything on again. A helper
_nwsaom_dlgprep.adosupplies the network types when a dialog opens (works with core 3.12.1).
Changed
- Dialog box. The main dialog no longer has a simulate-only mode (it could not take theta()); use the new simulate dialog.
- Dialog box. The buttons that open the related dialogs gave a Stata error message ("Wait until Stata has completed the current command..."). They now queue the command, so the related dialog opens.
- Dialog box. The command built by the dialogs no longer has a blank before a closing bracket, and options that come from different parts of a dialog are always separated by a blank.
- Dialog box. The "append" drop-down fields (waves(), endow(), creation()) carry the option name like all other fields.
nwsaom 1.3.3
Hotfix for the dialog boxes. The Mata libraries and the plugin are unchanged.
Fixed
- The OK button of the main nwsaom dialog did nothing (no command, no message) since the dialogs were introduced: the interact() part of the command program used parentheses in a condition, which the dialog engine cannot evaluate, so it silently stopped building the command. The condition is rewritten without parentheses.
- New test
dlg/cmd_assembly_test.pyruns the command program of every dialog in Stata and compares the command it builds.
nwsaom 1.3.2
Patch release. The Mata libraries and the plugin are unchanged.
Changed
- Dialog box. The main dialog (
db nwsaom) has a group "Related dialogs" on its last tab (Estimate 2) with buttons that open the dialogs for Bayesian estimation, several networks (multinet), multiplex networks, postestimation, describing the data and meta-analysis. The commands the dialogs build are unchanged. - The main dialog has fields for
groups()andgwaves()(several groups estimated together) on the last tab (Estimate 2). The postestimation dialog has agrp()field forestat gof,estat simulateandestat importanceafter a fit with groups. - The dialog for
nwsaom describenow has theactormode()field that the command already had.
nwsaom 1.3.1
Patch release. Works with nwcommands 3.6.0 and later; the Mata libraries and the plugin are unchanged.
Fixed
- With structural zeros and ones (the codes 10 and 11 in the wave networks)
nwsaomprinted one stray line with the number of fixed dyads per wave (for example 1250) before the results header. Nothing is printed now.
nwsaom 1.3.0
Minor release: more of the joint estimation of several groups, and structural zeros and ones. Works with nwcommands 3.6.0 and later. The Mata libraries lnwsaom1.mlib and lnwsaom2.mlib are rebuilt (Stata 17); the compiled plugin of this release (protocol 151) is needed for groups and for the codes (an older plugin gives a clear message). Structural zeros and ones: RSiena's codes 10 and 11 in the wave networks. Needs the compiled plugin of this release (an older plugin gives a clear message; there is no Mata implementation of the new part). Fits that use neither the codes nor structural() are unchanged.
Added
groups()now also works withjoinat()/leaveat()(times on the scale of the waves of the actor's group),behrate()and non-directed networks (symmetric,symtype()).gwaves()withoutgroups()stops with an error (it used to run silently).- Postestimation after a fit with
groups():estat gof(per group, optiongroup(#), the p-values of the groups are combined by the inverse-normal method; RSiena'ssienaGOF(groupName=)),estat simulateandnwsaom simulate(per group,group(#),generate()saves the networks of each group as<stub>_g#,rates()takes one rate per period of all groups),estat importance(per group). Also for fits with one behavior,ratecov()andpresent()(estat importancenot withpresent()). - The values 10 and 11 in a wave network are structural zeros and ones, as in RSiena (1.6.14).
nwsaomdetects them (no option). They are accepted in the networks ofwave1()/wave2()/waves()of a directed one-mode network or a two-mode network, for any number of waves, in the method of moments (conditional and unconditional). The codes may differ from wave to wave. Rules, all checked against RSiena 1.6.14: a dyad that is structural at the start of a period keeps its start value (11 is a tie) and is not among the alternatives of the actors; a dyad that is structural at the end of a period only is free during the period and takes its end value before the statistics; the targets are those of the end network with the dyads that were structural at the start set to their start value; the observed distance (rate target, conditional estimation) leaves out the dyads that are structural or missing at either end while the conditional simulation counts every change of a dyad that is not missing (RSiena's behavior); an actor with no free alternative among the active actors has rate 0; a dyad that is missing at a wave takes the code of the previous wave. They combine with covariates, interactions, missing network data (missnet()), composition change (present(),joinat()/leaveat()), network endowment/creation, covariate rate effects and the structural rate effects. - Validation: the observed statistics and distances agree with
siena07exactly on five coded data sets (constant and changing sets, frozen actors, missing data, composition change, endowment/creation, a two-mode network, one co-evolving behavior), simulation at fixed parameters agrees withsiena07within Monte Carlo error (unconditional and conditional), and 8-seed estimates agree. Testtest_nwsaom_structural_codes.do. nwsaom multinettakes the codes in its one-mode directed networks (cross-network effects included): targets and 8-seed estimates agree withsiena07.- Non-directed relations (
symmetric, all model types): the codes must be given for both directions of a dyad with the same value (otherwise an error). Fixed-parameter simulation (joint, forcing, confirmation), the rates and the targets agree withsiena07(modelType 6, 2, 3). - With co-evolving behaviors (one or several, also with covariate rate effects of the network) the codes work for the network (targets and estimates agree with
siena07, 8 seeds; one behavior, and two behaviors alcohol/smoking); behaviors have no structural values in RSiena. - Not yet with the codes (each refused with a message):
groups(),nwsaom multiplex,nwsaom multinetwith a two-mode or non-directed member or a behavior,ml,nwsaom bayes. - Postestimation after a fit with codes:
nwsaom describe(counts of the codes per wave, RSiena's print01Report numbers; the distance leaves out the structural dyads, the kept/created/dissolved table and the Jaccard index include them as RSiena's),estat gof(observed network with the start-structural dyads at their start value),estat simulate/nwsaom simulateandestat mems(new single-call command of the plugin),estat importance(structural choices excluded),estat score,estat timetest.estat simulateagrees withsiena07simulations (tie counts and mutual dyads after each period).
Changed
- The constants that RSiena keeps per group are now per group for the centred degree effects (
inpopc,outpopc,outactc,inactc,degplus,degplusc: average degree of the group) and for theownx()effects (average degrees, structural-equivalence mean, size of the group ininstructeq), so these effects can be used withgroups(). Needs the compiled plugin of this release (protocol 144). structural(matname)(a 0/1 matrix) is deprecated: it is converted to the per-wave lists of the codes 10 and 11 (a note is printed), so it now works withwaves(), behaviors,ratecov(), endowment/creation and the other options; the value of a marked dyad is its value in the data and must be the same at every wave. The two-mode structure of the program itself still uses its internal mask. Removal planned for 2.0.- The check of the tie values (
_nwsaom_chkbin) accepts 1, 10 and 11 and names the offending value and dyad otherwise. The 1.0.10 text above that the program "does not accept 10 and 11 yet" described its state then; the comment in_nwsaom_chkbin.adothat quoted RSiena's message as if both were accepted is corrected.
Not yet implemented with groups()
- Two-mode networks,
nwsaom multinet/multiplex, several behaviors inbehavior(),ml,nwsaom bayes,structural()and the structural codes 10/11 (refused with a message).
nwsaom 1.2.0
Minor release: joint estimation of several groups. Works with nwcommands 3.6.0 and later. The Mata libraries lnwsaom1.mlib and lnwsaom2.mlib are rebuilt (Stata 17) against the unchanged core library; the compiled plugin of this release is needed for groups (an older plugin gives a clear message), and everything else works with an older plugin, only slower where the new code paths apply.
Added
- Joint estimation of several groups: option
groups(varname)(RSiena'ssienaGroupCreate()+siena07()). The actors of all groups are the rows of the data set,varnamegives the group, the wave networks have no ties between groups. One set of effect parameters for all groups, one rate per period of each group (also of a behavior), named with RSiena's period numbering (period1 period2 period4 ...);e(rates_group),e(rates_period),e(ngroups),e(groupn),e(groupwaves),e(groupvar). Conditional and unconditional method of moments. gwaves(): groups with different numbers of waves.- Works with actor covariates (centred over all groups), dyadic covariates (centred within the group), changing covariates, rate covariates, interactions, composition change (
present()), missing network and behavior data, and a co-evolving behavior (linear, quadratic, average alter, average similarity, egoX/altX/simX of the behavior, behavior rate covariates). - The constants that RSiena keeps per group are per group here: similarity mean of a covariate, balance mean, mean/similarity mean/variance of a behavior, centring of dyadic covariates.
simx()andbalancetherefore work with groups. estat timetestafter a fit with groups: joint, effect-wise, per-group and per-period tests;estat scoreafter such a fit.- The compiled plugin restricts the alternatives of an actor to its own group and takes per-period constants (needs the plugin of this release; there is no Mata fallback for groups).
- Not yet with groups:
estat gof/simulate/importance,nwsaom bayes,ml,structural(),joinat()/leaveat(), two-mode and non-directed networks, several behaviors, the centred degree effects,avdeg,transtriads.
Fixed
present(): an actor who leaves at an observation now acts in the period that starts at its last wave, as RSiena'ssienaCompositionChange()does (RSiena: active at the START of a period; a leave event at the integer time of the wave is dropped). Before, an actor was active in a period only if present at BOTH its waves, so leavers were switched off one period too early. Joiners are unchanged. Checked against RSiena 1.6.14 in one group and in groups (10 runs each, all z-scores below 1.6).- Network effects of the dependent behavior as covariate (
behegox,behaltx,behegoplusalt,behsim) skip, in the statistic, a tie whose covariate value was missing at the start of the period (RSiena'sCovariateDependentNetworkEffect::missing()/tieStatistic()); the ministep contributions use the imputed value, as before. With missing behavior values this changes the estimates of these effects slightly in one group and clearly in groups (plugin protocol 143 for the native part).
Changed
- The checks of
symmetric/symtype()live in_nwsaom_symcheck.ado(nwsaom.ado is at the size limit of one ado program).
Fixed (continued)
nwsaom describeon a two-mode network counted the cells within the modes (it reported an undirected network with all 32 nodes of an 18 x 14 network); it now reports the actors, events, attendances, density over the actors-by-events cells and the average number of events per actor, also inr(). New optionactormode().estat simulateandnwsaom simulatework after / for a two-mode model (the simulation runs on the actors-by-events network;generate()saves two-mode networks). Atheta()matrix of the wrong shape gives a message instead of a conformability error.nwsaom meta, ratestook the standard errors of the rates from a row that does not exist, so every rate had a missing standard error and was silently excluded; it now usese(rates_se).r(theta)andr(se)carry the names of the stored estimates (rows) and of the effects (columns).- The refusal of
reciprocityfor a non-directed network no longer prints a second line "invalid syntax".
nwsaom 1.1.1
Patch release. Works with nwcommands 3.6.0 and later (the Mata library lnwsaom1.mlib is rebuilt with Stata 17 against the unchanged core library). Results are unchanged: with a fixed seed every estimate, standard error and statistic is identical to the last digit to that of 1.1.0.
Changed
- Faster estimation with the compiled plugin, most for two-mode networks and for fits that need many Robbins-Monro steps. The check of the plugin version (a look-up of the plugin file on the search path) was made once per step of phase 2; it is now made only where a rate covariate needs it. For the two-mode benchmark model (40 x 30, six effects) this alone halves the running time.
- Two-mode networks in the plugin: an actor's free alternatives (the other mode) are kept as a list, and the degree effects (indegpopularity, outactivity, outiso, antiiniso, antiiniso2, in3plus) are evaluated directly, so a ministep no longer loops over the whole node set and no longer goes through the general effect dispatch. The random stream is unchanged.
- The argument string of each plugin call is built with one vectorised conversion per block.
- An older plugin binary (for example a Linux or Windows file that has not yet been rebuilt) works with the new library and gives the same numbers, only more slowly.
nwsaom 1.1.0
Minor release. Works with nwcommands 3.6.0 and later. The Mata library lnwsaom1.mlib is rebuilt (Stata 17) against the unchanged core library of 3.6.0.
Added
- A visible warning when a fit runs on the slow Mata fallback instead of the compiled plugin. One line is printed once, before the estimation starts, and says why: the plugin file for the platform was not found, the installed plugin is older than the model needs, the model is outside the capacity of the plugin, or the testing switch
NWSAOM_NONATIVEis set. The results do not change;quietlysuppresses the line;e(engine)ande(engine_why)are set as before. Before, the fit ran without any message until the note after the table. New testcscripts/test_nwsaom_fallbackwarn.do.
Changed
- The manual is relabelled "Manual for version 1.1" (it holds for all versions 1.1.x) and brought up to date: installation (
net install nwcommands, from(https://nwcommands.org/net/) replace, thennwinstall, allandnwinstall, modelpkg(nwsaom), ornwinstall, everything), Stata 17 or later (tested with 17 and 18), the rule for the tie values (0, 1, 10 and 11; real shares are refused), the engine warning, and the changes of the releases 1.0.4 to 1.0.11. The manual is archived at Zenodo under the all-versions DOI 10.5281/zenodo.23623807. - Help text: the pages say that the Mata fallback gives a warning and how to check which engine ran.
nwsaom 1.0.11
Patch release. Works with nwcommands 3.6.0 and later; no change of the Mata library.
Changed
- Help text corrected: the provenance line no longer calls the package an independent reimplementation (it was developed from RSiena and is distributed under the GPL-3); references to development scripts removed from the help; the README install lines start with nwinstall. No change in code or results; the Mata libraries are unchanged.