Version 2 runs the simulations in C++, which makes estimation typically 20-50 times faster, adds Geyer-Thompson MCMC maximum likelihood estimation, and corrects several effects. Some changes are not backward compatible (see “Breaking changes”), and results of models with corrected effects differ from version 1.
in_weights_exponent: its change and target statistics
did not match (the target statistic excludes loops and divides by the
number of nodes, the change statistic does neither).concentration_basic_squared,
concentration_norm,
concentration_norm_squared,
concentration_prop_orig_cov and
concentration_rankGW: older concentration effects that were
only used for testing.concentration_prop has a new definition: each resource
contributes the proportion of the resources from its origin that go to
the same destination. The statistic of version 1 is no longer
available.reciprocity_min_resource_covar: the change statistic
was +/-1 even when the moving resource did not have the attribute. It
now uses the resource’s value on the attribute, which also makes it
correct for non-binary attributes.multinomialProposal = TRUE: the statistics for the
candidate destinations were calculated with the cache from before the
resource was removed, which gave wrong proposal probabilities for all
non-linear effects.simulateMobilityNetworks: allowLoops was
ignored after the burn-in (loops were never allowed).parallel = TRUE):
allowLoops was ignored in Phase 1. This only affected
starting values and step sizes, not the final estimates.initialParameters nor prevAns
are given, estimateMobilityNetwork starts from maximum
pseudo-likelihood estimates instead of zero (see below), so results for
the same seed differ from version 1 (within Monte Carlo error).simulateMobilityNetworks stops if the number of
parameters differs from the number of effects; before, parameters were
silently recycled.createAlgorithm(..., phase2Method = "GT"), with the new
arguments iterationsGT, maxIterationsGT and
finalIterationsGT. Robbins-Monro remains the default, and
algorithm objects created with earlier versions use it.getMultinomialStatistics provides the data) are used
as starting values if neither initialParameters nor
prevAns are given, for both Robbins-Monro and
Geyer-Thompson estimation. With Robbins-Monro, Phase 1 then only
determines the step sizes; with Geyer-Thompson, Phase 1 is not needed.
If the estimates do not exist, estimation starts from zero as
before.monanDataCreate(..., fixedEffectDummies = TRUE) adds a
dummy variable for each location (except the first) to the process
state, and addDummyEffects() /
addFixedEffects() add them to the model.concentration_max,
concentration_basic_cube and
concentration_prop_AC.options(MoNAn.useCpp = FALSE) switches to the sampler
written in R, which gives identical results for the same seed and is
also used for models with effects written only in R.multinomialProposal = TRUE stopped with an error (“‘x’
must be an array of at least two dimensions”) in models with only one
effect.avoiding_dissimilar_covar_cont and
joining_similar_avoiding_dissimilar_covar_cont only worked
if the dependent variable was called “transfers”.loops_x_loops_additional_origin stopped estimation and
simulation with “missing value where TRUE/FALSE needed” when a resource
whose additional origin is its origin was proposed to move into a
loop.simulateMobilityNetworks used 6
parameters for 7 effects.monanDataCreate: the fixedEffectDummies
argument is documented (the documentation used the misspelled name
fixedEffectsDummies).ADDING_EFFECTS.md in the GitHub
repository explains how to add an effect in R and C++.Added effects that improve on the old GW effects (where AC stands for alternating cliques):
!! Backward breaking change !!
The “cache” is not visible to the user anymore, it is created automatically and there is no more use for the function createWeightedCache.
The following functions are used differently:
New functions (aliases) for easier use
Further changes:
createEffect and addEffects; specification of node.attribute and edge.attribute instead of attribute.index and resource.attribute.index
The results objects are much smaller and contain less redundant information.
The State and Effects objects have print functions for easier inspection.
The algorithm is now stored in the outcome object for later reference.
New functions to specify the model: createEffects and addEffect New function to generate the process state: monanDataCreate
Creation of alias: monanAlgorithmCreate for createAlgorithm Creation of alias: monan07 for estimateMobilityNetwork
Implementation of new effects
Implementation of parallelization in Phase 1 of the estimation.
Various bugfixes and improvements.
Implementation of new effects.
User-friendly checks in creation of MoNAn objects.
Original Submission