Changes in version 4.13.0
NEW FEATURES
o
nodemix() and mm() are now more user-friendly in how levels2=
arguments are processed.
o
I() operator constraints can now take character strings and
vectors as well.
o
The built-in valued ERGM proposal now supports arbitrary dyadic
constraints, as well as the ChangeStats() constraint.
BUG FIXES
o
Fixed memory leaks in nodematch() and nodematch().
o
Firth-penalty MPLE now works again.
o
Valued .submodel() auxiliary now works again.
o
Valued Dyads() and ChangeStats() constraints now work again.
o
In ergm_state's extended state API, replacing the ergm_model,
now also adjusts the number of slots in $ext.state. This fixes
a warning for some missing data problems.
o
Some fixes to documentation and term documentation API.
OTHER USER-VISIBLE CHANGES
o
New API functions call.ErgmConstraint() and
call.ErgmReference() added to do the same job as
call.ErgmTerm() but for constraints and reference
distributions, respectively.
o
blockdiag() constraint now has more consistent return values,
which can be used by other constraints.
o
Constraints API via ergm_conlist() has been documented and
exported.
o
rlebdm's n attribute is now always an integer.
o
ergm_proposal_table() can now specify that a proposal supports
all references and/or all hints; this is useful for proposal
operators, which wrap other proposals in turn.
o
Substantial optimizations and speed-ups in proposal and
auxiliary processing code.
o
enformulate.curved() and its methods are now defunct.
o
%ergmlhs%'s attribute is now deleted if it stores no
attributes.
C-LEVEL FACILITIES
o
OnNetworkEdgeChangeUWrap() C function has been exported.
o
Vestigial C functions removed.
Changes in version 4.12.0 (2026-02-17)
NEW FEATURES
o
blockdiag() constraint now handles noncontiguous attributes in
a user-specified manner via a noncontig= argument. At this
time, only treating separate runs as separate blocks ("split")
is supported.
o
MCMC, CD, SAN, and MPLE sampling now produce cli progress bars.
o
I() (AsIs) operator can now handle character strings containing
lists of terms.
o
nodal_attributes help and the Nodal Attribute Specification in
ERGM Terms vignette now contain instructions for how to
converting from base= and keep= arguments deprecated since ergm
3.9.4.
BUG FIXES
o
Some fixes to inadvertent partial matching and more uses of
seq_len(n) instead of 1:n. (Thanks, Chung-hong Chan
GitHub:@chainsawriot!)
o
esteq argument to the simulate.ergm() family of functions has
been fixed.
o
Some typographical problems in the Nodal Attribute
Specification in ERGM Terms vignette have been fixed.
OTHER USER-VISIBLE CHANGES
o
If an %ergmlhs% list is emptied out, it is now removed.
o
convert_ergmlhs() has been deprecated.
o
Verbose printing for variance-based adaptive MCMC no longer
creates a wall of text.
C-LEVEL FACILITIES
o
The C++ shim edge ranges now have a size() method.
Changes in version 4.11.0 (2025-12-22)
NEW FEATURES
o
Nonidentifiability detection now returns details about which
variables are linear combinations of which variables. This
information is also saved as a part of the ergm object and is
accessible via alias() and summary() methods.
o
Auxiliary .submodel() and term submodel.test() now work for
valued networks as well.
o
Sampson's monks data (sampson and samplk) has been augmented:
• Dislike networks sampdlk1, sampdlk2, and sampdlk3 have been
added.
• samplk networks also have the edge weights with the scores
recorded by Sampson.
• sampson (samplike) and samplk (samplk# and samdlk#) now
have more consistent vertex attributes.
o
gof() functions now support valued ERGMs, with a statistic
comparing the observed empirical CDF of edge values with
predicted.
o
Added a I()/I() operators for models and constraints for
conveniently substituting expressions into model formulas.
o
Added a constraint operator ChangeStats() that takes a model
formula and rejects any proposal changes the statistics in that
formula.
BUG FIXES
o
Update to work with testthat 3.3.0. (Thanks to Hadley Wickham.)
o
Fixes to the gof() code; in particular, the triad census was
being plotted with the model statistics but in a separate plot,
and an ergm object on the LHS was being mishandled.
o
In gof() for bipartite networks, replaced ESP with DSP in the
default GoF statistic, since the former is always 0.
o
One of the C macros for pre-order traversal of the edge tree
would cause R to hang in an infinite loop.
OTHER USER-VISIBLE CHANGES
o
MCMLE verbose progress printing is now a bit more concise and
focused.
o
MCMLE verbose printing now prints the estimated gradient of the
log-likelihood, rather than its negation as estimating function
values.
o
Runtime trace plots are now more compact, with less paging.
o
Example of control.simulate.formula() is now provided.
o
References have been ported to Rdpack and cleaned up.
o
Some optimisations to the diff() term.
o
ergm_most_frequent_n() helper function for obtaining the n most
or least frequent levels of a factor has been exported.
o
Some deprecated arguments have been removed, particularly
control= from ergm.godfather() and formula= from ergm_model().
C-LEVEL FACILITIES
o
An experimental C++ shim (translation API) for implementing
ERGM statistics and proposals has been added. The shim wraps
the C data structures to enable them to be queried and
manipulated using idiomatic C++. Generally, most of the header
files have been adjusted to compile cleanly under C++ if
needed. A vignette documenting it has been provided.
o
New macro, DEG(a) to return the undirected degree of a node
(typically outdegree plus indegree).
o
New function, NetworkInitializeLike(nwp) (and its valued
analogue) to construct an empty Network copying attributes
(size, etc.) from the specified network.
o
New helper function, findListElement(list, str), to perform a
linear search of a named list to find an element with a given
name.
o
Deprecated helper macros MH_GET_AUX_STORAGE_NUM() and
GET_AUX_STORAGE_NUM() have been removed.
Changes in version 4.10.1 (2025-08-27)
NEW FEATURES
o
gof's GOF= formula can now contain any ergm() statistics in
addition to the special ones.
o
Passing NaN rather than NA as a fixed (offset) coefficient will
now cause the MCMC sampler to “skip” any iterations for which
the corresponding statistic is not 0, in the sense that the
MCMC step counter is paused until the statistic returns to 0,
so it is never recorded.
This is mathematically equivalent to setting it to -Inf (for a
positive statistic) in the sense that the networks in question
are excluded from the sample, with the difference being that it
can be used to reach a valid configuration that can only be
reached via an invalid one.
BUG FIXES
o
Documentation link and typo fixes.
o
Fixes to MPLE Hessian calculation.
o
Fixed an initialization error in the experimental ~.
o
Printing of user-provided initial parameters is now more clear.
o
requireNamespace() calls are no longer passed warn.conflicts=
arguments.
o
Dynamic HTML term index generation now avoids creating tags
with repeated HTML ids.
OTHER USER-VISIBLE CHANGES
o
Sum() now uses a sparse matrix representation fr its weight
matrix.
o
gof should now run significantly faster by making use of the
s_-only statistics.
C-LEVEL FACILITIES
o
A vestigial element, int status;, has been removed from
*MHProposal structures.
o
ABI version has been increased.
o
All header files (including those with static inline functions
and macros) should now compile under C++.
o
The default ABI mismatch action is now to warn the user once
per session.
o
A statistic may now implement s_ (summary) functions without
implementing c_ and d_ function. Any term using this in the
model may only appear with coefficient 0, that is, it must not
affect the distribution sampled. Under MCMC sampling, it will
only be called at the end of each interval. This can be useful
for simulating complex network statistics (e.g., geodesic
distance) from a simpler model.
Changes in version 4.9.0 (2025-06-10)
NEW FEATURES
o
S(), Symmetrize(), and For() operators now work for valued
networks.
o
An experimental valued operator, (EXPR ~ TERMS), can evaluate
TERMS after transforming them according to EXPR, Currently,
only sqrt is implemented.
o
New function, control.ergm3() can be used as a control=
argument to ergm() to emulate pre-4.0 behavior as much as
possible. At this time, it sets MCMLE.termination = "Hummel"
and MCMLE.effectiveSize = NULL, disabling adaptive MCMC.
o
There is now a ergmAuxiliary documentation type, and
.spcache.net() has been documented.
o
Specifying target statistics and model parameters by name is
now more consistent and flexible. For example, it is now
possible to specify a set of parameter values explicitly, and
set the rest to a default (e.g., 0).
BUG FIXES
o
HTML termalike index links to packages outside of ergm have
been fixed.
o
gwdegree(0, fixed = TRUE) and others in its family no longer
produce NaNs and do not cause errors when the network has no
isolates of the corresponding type. Thanks to Kevin Reuning
(@reuning) for the bug report.
o
Confidence-based convergence testing is now more robust.
o
Printing and summarization of network.lists is now more
accurate, particularly when they are generated by simulate(...,
simplify = FALSE).
o
predict.formula() now takes the basis= argument.
OTHER USER-VISIBLE CHANGES
o
Documentation improvements, particularly in valued terms and
the Terms API vignette.
o
Warning about loops in networks can now be disabled by setting
options(ergm.warn_loops = FALSE).
o
cycle() is now more efficient with respect to memory
management.
o
gof.formula() has been substantially speeded up.
o
triangle(attr, diff, levels) with diff = FALSE and non-null
levels= now behaves consistently with nodematch() with the same
corresponding arguments.
o
Passing nsim= to san() is now an error.
o
In predict.formula(), the theta= argument has been rename to
eta=, since canonical parameters are expected.
C-LEVEL FACILITIES
o
Many parallel implementations for binary and valued ERGMs, both
C and header files, have been merged.
o
_GET_OVERRIDE*() family of macros are now in their own header
file ergm_variadic_macros.h.
o
The *GET_AUX_STORAGE() macro is now variadic and can be called
*GET_AUX_STORAGE(stored_type, store_into) or
*GET_AUX_STORAGE(ind, stored_type, store_into), obviating
*GET_AUX_STORAGE_NUM(stored_type, store_into, ind), which has
been deprecated.
o
Some vestigial elements from the Network data structure have
been removed. This necessitate an ABI version change.
o
*NetworkInitialize() have had their lasttoggle-related
arguments removed; macro alchemy is used to maintain source
compatibility for now; its directed_flag argument is now an
Rboolean.
o
A number of vestigial functions have been removed.
Changes in version 4.8.1 (2025-01-21)
NEW FEATURES
o
A new bipartite term operator Project(), with aliases Proj1()
and Proj2(), evaluating the statistics on an undirected valued
network of counts constructed by projecting the bipartite
network onto one of its modes.
o
A new family of terms, nodecovrange(), nodeocovrange(),
nodeicovrange(), b1covrange(), and b2covrange(), to evaluate
the sum over the nodes of the range of the specified
quantitative attribute value among the node's neighbors.
(Thanks to Marion Hoffman for the idea!)
o
A new family of terms, nodefactordistinct(),
nodeofactordistinct(), nodeifactordistinct(),
b1factordistinct(), and b2factordistinct(), to evaluate the sum
over the nodes of the number of distinct values of a
categorical factor among the node's neighbors. (Thanks to
Marion Hoffman for the idea!)
o
The fixallbut() now supports an rlebdm (in addition to an edge
list matrix and a network) for its argument.
BUG FIXES
o
Fix in stochastic approximation code for compatibility with
most recent coda.
o
In ergm(), a bug in initialization of MH proposals for
constrained sampling requesting auxiliaries has been fixed.
o
A memory error in the ergm.eta() family of functions triggered
when the length of the curved parameter is 0 has been fixed.
o
Fixed calculation of b1degree(), b2degree(), b1degrange() and
b2degrange() when degrees of interest include 0. Their
coefficient names have been changed to be more consistent with
other terms.
o
Calculation of the effective number of observations, i.e.,
nobs.ergm(), is no longer affected by the estimation method.
o
The B() operator with form="nonzero" was miscalculating change
statistics when given multiple toggles in a sequence.
o
Some instances of memory leaks, warnings, and undefined
behavior have been fixed.
o
Some dataset links that were broken have been fixed.
OTHER USER-VISIBLE CHANGES
o
Precision of geometrically weighted statistics (degrees and
shared partners) has been improved, particularly for large
decay parameters.
o
Dynamic term documentation is now more robust to extension
developer error.
o
A new as.rle() method for rlebdm objects to cast it back to an
rle.
o
*degreepopularity and hammingmix() terms and
offset.info.formula() function have been removed from the
package.
o
In the terms API, the auxiliaries specification can now be a
term_list rather than a formula.
o
ergm.pl() no longer takes the defunct dummy argument.
C-LEVEL FACILITIES
o
Degree-conditioned proposals are now exported in inst/include/.
o
The M-H proposal API now makes lengths of input vectors
available to the proposals, paralleling the change statistics
API.
o
The DyadGen API now has a “careful” mode, in which it ignores
updates that do not concern it, at a nontrivial cost in speed.
It also has a callback API that calls a specified function
every time a DyadGen is initialized. This can be used to set up
groups of non-overlapping DyadGens.
o
ergm_khash.h API now provides a kh_put_code enumeration type
for kh_put()'s optional return status value.
o
Packages LinkingTo ergm now have the ergm C application binary
interface (ABI) version stored at compile time. If their terms
or proposals are then used against a version of ergm with a
different C ABI version (which can cause mysterious errors and
R crashes), an error is raised. This behavior can be controlled
by setting options(ergm.ABI.action=); see options?ergm for
details.
Changes in version 4.7.5 (2024-11-06)
NEW FEATURES
o
A new hint triadic and associated proposal SPDyads have been
added implementing a proposal along the lines of Wang and
Atchadé (2013) for more efficient sampling of models with high
triadic closure. For directed networks, one type of triad
(transitive, cyclical, etc.) may be specified, defaulting to
transitive. This hint is enabled by default (along with
sparse).
o
Adaptive MCMC code can now be given a target precision matrix
as opposed to effective sample size. See help for
control.ergm(). This is used to make missing data MCMLE more
adaptive.
o
Constraint fixedas() now has fixed.dyads= as its first
argument, and if present= or absent= is passed explicitly, it
will check that the LHS network conforms before proceeding.
o
In ergm() and related, MPLE existence check can now be disabled
by passing MPLE.check=FALSE to control.ergm(). Auxiliary calls
to MPLE do so by default.
o
A number of improvements to ergm.allstats() and ergm.exact():
• The statistic frequency table is grown dynamically, so the
user no longer has to specify the maximum table size.
• Both functions now accept the constraints= argument with
arbitrary dyad-independent constraints.
• Excessive runtime check now works in terms of free dyad
counts rather than network sizes.
o
ergm.godfather() now takes a basis= argument like ergm(),
simulate.ergm(), and others. Its term options can be passed
directly as well.
BUG FIXES
o
COLLAPSE_SMALLEST was selecting incorrect categories under some
circumstances.
o
blockdiag constraint initialization now detects when blocks are
non-contiguous and stops with an error. (Previously, it would
behave in undefined ways.)
o
Sum operator now handles I() label specifications correctly;
this also fixes an error in the Prod term.
o
Detection of dyadic dependence now ignores dyadic dependence of
hints (since they do not affect the sample space) and
auxiliaries (since they do not, in and of themselves, add
dyad-dependent statistics).
o
In control.ergm(), MCMC.prop= is now passed through to
SAN.prop=.
o
A bug in the auxiliary reuse code has been fixed.
o
A bug in simulate.ergm() triggered by a combination of a
proposal using an auxiliary and monitor= argument being passed
has been fixed.
o
In proposal help, listing of proposal table entries works
again.
o
nodemix() now uses correct parameter names.
o
Godambe information for the MPLE now works if the model has an
offset. (Thanks, Cornelius Fritz for reporting and Michał
Bojanowski for fixing.)
o
When constructing the starting networks for missing data MCMC,
imputation of dyads is skipped if the constraints are
dyad-dependent, since inserting edges may break the constraint.
o
edgecov() and dyadcov() now handle network-format input
correctly.
o
Missing data MLE code can now handle the scenarios in which the
statistics in the constrained sample are constant and/or the
statistics in the unconstrained sample are highly correlated.
o
MCMC diagnostics for non-confidence convergence criteria no
longer rely on $target.stats being part of the ergm object.
o
Likelihood calculation is now robust to dropped parameters and
parameters fixed at infinity.
o
Label() operator now documents its behavior when the model is
curved more clearly.
o
Invalid levels2 specification for mm() no longer causes memory
errors.
o
Valued proposal updater function was not being passed the
current edge state.
o
Undefined behavior warnings flagged by CRAN's clang-asan have
been fixed.
OTHER USER-VISIBLE CHANGES
o
A number of utilities, including sginv and xTAx_seigen have
been moved to statnet.common.
o
LARGEST, SMALLEST, and COLLAPSE_SMALLEST now break ties
lexicographically with a warning.
o
absdiffcat is now more memory-efficient during initialization.
o
MCMLE estimation code for missing data MLE with high
missingness fraction is more robust.
o
Verbose output in Hummel step length calculation code is now
more concise.
o
Hummel step length calculation for missing data MLE will now
use more test points but terminate early if the step length
does not decrease after a number of attempts.
o
is.dyad.independent.ergm_model() now takes an additional
argument whether auxiliaries “count”. wrap.ergm_model() detects
this from its namewrap= argument.
o
spectrum0.mvar()'s multicollinearity detection now attempts to
normalize the rotated components, discarding those that cannot
be normalized (likely due to being redundant or numericanly
unstable). This should be more robust than the previous
approach.
o
Improvements to the ergmProposal documentation.
o
ergm_Init_stop(), ergm_Init_warning(), and ergm_Init_message()
that behave more like their base counterparts have been added
to the API. ergm_Init_abort(), ergm_Init_warn(), and
ergm_Init_info() will eventually change to use their rlang
semantics.
o
edgecov() and dyadcov() now check that their covariate matrix
has the correct dimension.
o
Constraints fixedas() and fixallbut() now warn when given a
network whose size does not match the LHS network's.
o
Nodal attribute specification documentation
(?nodal_attributes?) now includes an example for specifying
levels2= levels by value.
o
Miscellaneous documentation fixes.
o
param_names() API now allows assignment, and its method for
ergm_model objects is more explicit about whether canonical or
curved parameters are being modified and when.
o
ergm_model() constructor is now generic, with methods for
formula, term_list, and ergm_model.
o
is.dyad.independent() can now return dyadic-independence
information for each term.
o
control.ergm.godfather() has been deprecated, since it is no
longer used to pass term options.
o
R documentation macros \ergmTerm, \ergmConstraint,
\ergmReference, \ergmHint, and \ergmProposal.
o
Some improvements to the Terms API (see Vignette), particularly
in handling of dyadic dependence and auxiliaries.
o
Documentation improvements to extended state and network
callback APIs.
o
The main ERGM vignette is now in HTML.
C-LEVEL FACILITIES
o
The khash C API now uses an enum type for insertion status.
o
The dyad hash edgelist API has been improved, in particular
with guarding against double-insertions and using
UnsrtELToHashEL to turn an unsorted edgelist into a hash
edgelist. Dyad generator API “upgrades” it after several show
searches.
o
Dyad hashmap and dyad hashset API s now offer a "strict"
variant in which it is the responsibility of the caller to
handle the directedness, simplifying the code. This approach is
now used by the dyad hash edgelist, dyad generator, and others.
o
HashELInitialize() function no longer takes the directed
argument. Instead, it expects that any dyads passed to it be
appropriately sorted.
o
Calls to Calloc(), Realloc(), and Free() have been replaced
with their R_-prefixed counterparts.
o
khash no longer allows allocators to be specified via macros;
they are now hardcoded to use those from R.
o
Non-API SET_TYPEOF() is no longer used.
o
UnsrtEL and HashEL now have, respectively, UnsrtELSize() and
HashELSize() methods to query their current numbers of edges
stored. This should allow seamless changes to their internal
representations.
o
The kvec macro library (from
) has been
incorporated into the package with some modifications and is
available to use for dynamic arrays (that automatically grow as
needed). It can be found in /inst/include/ergm_kvec.h. (Thanks
to Adrien Le Guillou for taking the lead on this.)
o
RLEBDM1D C API now exports FirstRLEBDM1D() and LastRLEBDM1D()
macros, providing dyad indices of the first and the last dyad
in the RLEBDM, respectively.
o
ChangeStats() function has been split into ChangeStatsDo() and
ChangeStatsUndo(), the latter only called on rejection, which
speeds up MCMC and SAN when the proposal has multiple toggles.
o
setListElement() now protects the value being stored in the
list before assigning it (then unprotects it), preventing
potential accidental garbage collection.
Changes in version 4.6.0 (2023-12-18)
NEW FEATURES
o
edges constraint can now be combined with arbitrary dyadic
constraints.
BUG FIXES
o
Syntactic fixes in documentation.
o
The bounded degree support in the dyad noise proposal (see
dyadnoise-ergmConstraint) has been fixed.
o
Fixed a bug in the DyadGen API implementation that would
sometimes cause a crash when sampling non-edges with RLEBDM
(such as when combining the edges with some dyadic constraint).
(Thanks to Benjamin Rosche (Cornell University) for the bug
report.)
o
A number of potential errors and vulnerabilities in C code
flagged by CRAN have been fixed.
o
In some models, with high degree of multicollinearity among the
sufficient statistics, detection thresholds were too sensitive,
ultimately resulting in some standard errors being severely
underestimated.
OTHER USER-VISIBLE CHANGES
o
The proposal lookup API is now more flexible: instead of
selecting one proposal, it returns a list ordered by priority
and suitability. Each proposal on the list is tried in turn and
can “reject” a sampling scenario at initialization, in which
case the next proposal is tried. This means that “special case”
proposals can offer themselves up and then pass on if it is not
their special case.
o
In simulate.ergm() with observational=TRUE, the basis (initial
network) defaults to object$network, not object$newnetwork,
since the latter often has missing edges and other metadata
missing.
o
Documentation for defunct functions (in ergm-defunct) no longer
includes function prototypes as they triggered CRAN warnings.
o
Some changes to minimize matrix inversions and improve
numerical stability.
C-LEVEL FACILITIES
o
New C macros to simplify initialization of the standard dyad
generator and bounded degree sampler.
Changes in version 4.5.0 (2023-05-28)
NEW FEATURES
o
as.network.numeric() no longer constructs n*n matrices in doing
so, allowing it to scale to large, sparse networks.
o
Additional arguments to mcmc.diagnostic() are now passed to
helper functions, including plotting functions, allowing better
customization. (Thanks to Fabio A. Correa.)
o
Stochastic Approximation MLE method now uses adaptive subphase
lengths from Snijders (2002). (Thanks Arya Karami.)
o
ergm can now use networkLite's networkLite objects in place of
full network objects.
o
MPLE estimation can now provide improved standard errors via
bootstrap or Godambe estimation. (Thanks to Christian Schmid.)
BUG FIXES
o
Geometrically weighted ("gw*degree" and "gw*sp") terms now
detect when they encounter a network whose statistic of
interest exceeds the cutoff and stop with an informative error,
rather than sometimes silently returning incorrect results.
o
Fixes in final likelihood calculation when basis= argument is
passed to the ergm() call.
o
“Confidence” stopping criterion is now more robust to scale of
sufficient statistics.
o
Better handling of invalid inputs in predict.ergm().
o
bd() now checks validity of its arguments and appropriateness
for the network being modeled.
OTHER USER-VISIBLE CHANGES
o
Optimizations to various directed shared partner calculations.
o
gw*sp() and dgw*sp() terms are now just aliases of each other.
o
In dgw*sp() terms, cutoff= argument is not meaningful when
fixed==TRUE and produces a warning.
o
ergm.pl()'s API has changed (though the old calling convention
is still supported for now).
o
Some control parameters for Stochastic Approximation have been
renamed, removed, or better documented.
o
Some improvements in term name formatting.
o
Documentation improvements for some terms.
C-LEVEL FACILITIES
o
Some helper functions for printing vectors and matrices in
ergm_util.c have been improved.
Changes in version 4.4.0 (2023-01-27)
NEW FEATURES
o
A paper on new features in ergm 4 and later has been published
in _Journal of Statistical Software_. Please see
citation("ergm") for citation information.
o
ergm(), san.formula(), ergmMPLE(), gof.ergm(), gof.formula(),
logLik.ergm(), .simulate_formula.network(), and simulate.ergm()
now check if any of the ... arguments are unusued and issues a
warning.
o
A number of changes have been made to make objects returned by
ergm() take up less memory and storage. As a result, fits from
older package version may no longer work.
• ergm objects no longer include $constrained and
$constrained.obs elements by default, making the fit
objects substantially more compact. Information useful for
post-processing and diagnostics that was previously
extracted from them is now stored in the $info element.
• ergm() now takes a newnetwork= argument, specifying if the
networks generated at the end of the estimation should be
saved. The previous behaviour was to save one network per
parallel chain. The new default behaviour is to save only
one.
• control.ergm()'s MCMC.return.stats= now controls the
maximum number of iterations to be stored in $sample and
$sample.obs for diagnostics; actual MCMC samples are
thinned to at most that length. mcmc.diagnostics() code
prints the information from the full and the thinned
samples.
o
is.dyad.independent.ergm() can now answer based on terms,
sample space, or both.
o
is.na(ergm) and anyNA(ergm) methods can now be used to test if
an ERGM was fit a missing data or observational process.
o
mcmc.diagnostics() now has a compact= argument, to optionally
abbreviate statistic and/or parameter names for more compact
display.
BUG FIXES
o
control.ergm()'s handling of consistency check between step
length and termination method hs been fixed.
o
Some improvements to tests; in particular, a formerly
stochastically erring test is now deterministic.
OTHER USER-VISIBLE CHANGES
o
In the simulate(), passing theta0= is now an error.
Changes in version 4.3.2 (2022-11-24)
BUG FIXES
o
ergm_edgecov_args() helper function now formats the network
attribute names without the quotes.
o
MCMC proposal lookup code is now more robust: in particular, it
keeps track of which packages added which rows to the lookup
table and removes those rows on unload.
o
Termalike documentation caching code has been optimized to work
better particularly on systems with many packages installed
(such as CRAN) and Windows systems (such the Win-Builder): it
no longer calls slow functions such as dependsOnPkgs() and is
smarter about minimizing the number of operations per cache
read. (Thanks to Kurt Hornik for identifying the root of the
problem.)
Changes in version 4.3.1 (2022-11-07)
NEW FEATURES
o
New functions search.ergmHints() and search.ergmReferences()
can now be used to search available ergmHints and
ergmReferences, respectively.
o
A new For() term operator to construct a list of terms with
some varying parameter.
o
Term API vignette is now more complete, and includes all API
elements, not just the post-4.0 ones.
o
Termalike documentation templates now also list the
keywords/concepts in the termalike's documentation file. More
generally, termalike documentation has been revamped to be more
consistent.
o
ergm() can now take a formula with an arbitrary LHS, provided
basis= argument is supplied and is a network.
BUG FIXES
o
In C, prototypes of functions with no arguments now use the
(void) placeholder.
o
gof(..., GOF=~... - model) now correctly removes the model from
the set of goodness-of-fit terms.
o
Fixes to plot.gof() for bipartite networks.
o
Fixes to plot.gof() for dense networks.
o
Package manual now passes tidy HTML tests. (Thanks to Elin
Waring for suggesting a workaround.)
o
The default description for the attr= term argument is now more
accurate.
OTHER USER-VISIBLE CHANGES
o
Constraints and model construction code now uses the term_list
API from statnet.common 4.7 and avoid formula manipulation,
making it more robust to formulas with varying environments.
o
%ergmlhs% constraints are now inherited by default, unless the
constraints= formula includes a -. (minus dot) term. The former
behaviour was to inherit only if constraints= argument had a ..
o
Some constraints' implementations are now much more
memory-efficient.
o
Improvements to the API documentation in the Terms API
vignette.
o
The Stepping estimation method has been removed, since all of
its improvements have been incorporated into MCMLE.
o
The Robbins-Monro estimation algorithm has been removed, since
it is currently broken and everything it does Stochastic
Approximation does better.
o
Function is.inCH() has been removed, having been deprecated in
favour of shrink_to_CH().
o
san.ergm() has been removed, having been deprecated for having
no known use case.
o
Improvements to blockdiag() constraint, gw*sp(), and other
documentation.
o
An Init*ErgmTerm.* function can now return an ergm_model, in
which case its terms will be “pasted” into the model.
o
Documentation for san() algorithm is now much more detailed.
o
Some improvements to the BDStratTNT proposals.
C-LEVEL FACILITIES
o
Some useful dynamic node and edge list data structures added
and exported.
INSTALLATION
o
Packages tergm, networkDynamic, and latentnet are no longer
Suggested to simplify testing.
Changes in version 4.2.3 (2022-10-02)
NEW FEATURES
o
In terms edgecov() and dyadcov(), the argument can now be a
network.
BUG FIXES
o
Fixes to estimation for valued ERGMs with missing data.
o
Retrying and other robustification to lpSolve-based step length
calculation has been added back.
o
Typo fixed in a rarely used storage API macro.
o
check.ErgmTerm() no longer fails when a term has argument names
that coincide with certain R base functions.
o
Bridge sampling now disables the density guard (as some briges
may result in much denser networks than observed).
o
Syntactic fixes to documentation.
o
anova.ergm() now correctly labels its tables as analysis of
_deviance_; passing invalid inputs (e.g., non-ergm objects) now
produces an informative error message.
OTHER USER-VISIBLE CHANGES
o
Miscellaneous documentation improvements.
o
ergm_egecov_args() helper function can now handle network class
input.
o
In the state caching, the hashes are now globally unique (with
high probability) IDs regenerated at initialization. This saves
the cost of computing the hash, at the cost of sometimes not
detecting when a model is being reused.
o
.simulate_formula.network() is now exported explicitly. This
means that extension packages overriding the simulate_formula
method for network objects can call it directly.
o
In ergm(), the LHS no longer needs to be a network object, as
long as basis= is provided.
o
anova.ergm() documentation no longer discusses test statistics
(which were never implemented in the first place).
INSTALLATION
o Since ergm only interacts with MPI clusters through the
standard parallel API, a separate test for MPI has been
removed, and packages snow and Rmpi are no longer Suggested.
Changes in version 4.2.2 (2022-06-01)
NEW FEATURES
o
More ergmKeywords have been added for dyadic and triadic
covariates, and terms have been tagged appropriately.
BUG FIXES
o
Robustification of step length calculation, documentation
processing, numerical optimization, and elsewhere.
o
Minor documentation and vignettes fixes and clarifications.
INSTALLATION
o
Package ergm.userterms for implementing custom ERGM terms is no
longer maintained on CRAN and is instead maintained on GitHub
at . It is no longer
listed as a Suggested package.
Changes in version 4.2.1 (2022-05-10)
NEW FEATURES
o
A new framework for documenting and cross-referencing ERGM
terms and term-like constructs (constraints, hints, references,
and proposals) has been implemented. Each term documentation is
now generated in an Roxygen block for its initialization
function, generating a function-like documentation entry, e.g.,
edges-ergmTerm, edges-ergmConstraint, sparse-ergmHint,
Unif-ergmReference, and TNT-ergmProposal, which can be invoked
with ergmTerm?edges etc.. Visible terms are dynamically indexed
in ergmTerm, ergmConstraint, ergmHint, ergmReference, and
ergmProposal. (Joyce Cheng)
o
Indexing can be done by keyword (using R's concepts), whose
meanings can be looked up in ergmKeyword. Terms cane be
searched via search.ergmTerms, search.ergmConstraints, etc..
(Joyce Cheng)
o
Term nodemix can now be passed a levels2 argument that is a
factor or character and optionally a matrix, allowing multiple
cells to be mapped to the same statistic. (Joyce Cheng)
o
An API has been added for caching state information on worker
nodes; in particular, when making repeated calls to MCMC
sampling, ergm_model and ergm_proposal objects are only sent
the first time, and subsequent MCMC runs from the same terms
and proposal use the cache. This means that they do not need to
be serialized and send through the link.
BUG FIXES
o
Calculations are now somewhat more robust for models whose
statistics have vastly different magnitudes: in particular,
covariance matrices are now generally converted to correlation
matrices before inversion and then scaled back, avoiding false
positives for signularness detection.
o
Dyads constraint now detects if any of the terms passed to it
are dyad-dependent and stops with an error.
o
fixallbut constraint now works for matrix input.
o
The "confidence" convergence criterion is now more robust to
nonidentifiable models.
o
edgecov and dyadcov now detect and stop with an error when the
specified network attribute is not found.
o
Bugfixes in gof handling of bipartite networks. (Michal
Bojanowski)
o
as.matrix is called in a number of places where
as.matrix.network was called directly.
o
gof.ergm now handles missing data networks more or less
correctly again.
o
Log-likelihood calculation for missing data has been partially
rewritten. This fixes some corner cases, as well improve speed
and memory efficiency.
o
Miscellaneous documentation fixes and improvements. (regular
contributors, and Fabio A. Correa and Jiahao Wang)
OTHER USER-VISIBLE CHANGES
o
Almost all tests now use the testthat 3 framework. (Joyce Cheng
and Chad Klumb)
o
ergm_GWDECAY curved ERGM pattern is now exported.
o
MPLE predictor matrix calculation now uses a dynamically
growing hash table as its back end, which means that
MPLE.max.dyad.types= is deprecated and does not need to be
specified.
o
Adaptive bridge sampling for likelihood calculation now shifts
the bridge locations by an offset generated from a
low-discrepancy sequence after each attempt in order to reduce
bias due to finite number of bridges.
o Hummel (2012) step length calculation now uses an improved
algorithm (Krivitsky, Kuvelkar, and Hunter 2022) and uses Rglpk
where available for better performance. is.inCH and the
Stepping algorithms have been deprecated (the latter in favour
of MCMLE).
o
Adaptive MCMC's burn-in detection now models the burning in as
exponential decay to the stationary distribution, and selects
burn-in based on a given amount of bias due to burning in.
o
approx.hotelling.diff.test with var.equal=TRUE now uses a
pooled estimate of autocovariance, so spectrum0.mvar is only
called once.
o
MPLE estimation now returns the Hessian as well. (Previously,
it was only MCMC-based methods that did.)
o
ergmMPLE no longer has the fitmodel= argument.
o
ergmMPLE with output types other than "fit" now attach eta map
information as an attribute.
o
ERGM MPLE calculation no longer returns $glm and $glm.null
elements, instead returning $mple.lik and $mple.null.lik.
o
ergm_model() no longer sets an element $coef.names, and
offset() decorator is set on each term's coef.names.
o
In summary.ergm() output, $coefs is no longer returned.
o
check.ErgmTerm() helper function can now also capture the
expressions resulting in term arguments. This incidentally
fixes a regression in statistic naming of edgecov() and
dyadcov() effects.
o
main.method="Robbins-Monro" implementation is broken and has
been disabled pending either fixing in the next release or
removal. (There is nothing it can do that
"Stochastic-Approimation" doesn't do better.
o
Term hamming-ergmConstraint implementation is broken and has
been disabled pending a fix.
o
Messages about inconsistent arguments for geometrically
weighted terms are now a bit more consistent, as is their
documentation.
PACKAGE INSTALLATION
o
Package Rglpk is not strictly required and has additional
external library requirements on some platforms, but it is
strongly recommended, as it outperforms lpSolve in most
situations.
Changes in version 4.1.2 (2021-07-27)
NEW FEATURES
o
F() operator's filter formula can now be a simple logical or
comparison expression.
o
Passthrough() operator now takes an optional boolean label=
argument, which controls whether Passthrough~ will be prepended
to the coefficient name; it defaults to TRUE for backwards
compatibility, though this may change in the future.
BUG FIXES
o
In summary.ergm() output, the $coefficients element is now a
matrix rather than a dataframe. This fixes some issues with
duplicate term names. $coefs is no longer returned.
o
check.ErgmTerm() no longer skips argument type check if the
passed argument is NULL. For backwards compatibility, the check
is skipped if the argument is optional _and_ the default value
is NULL. A constant ERGM_VATTR_SPEC_NULL has been added for
when NULL is a valid (but not default) input for nodal
attribute specification.
o
A serious bug in calculation of geodesic distance distribution
in gof.formula() has been fixed. (Thanks to Jeffrey Alan Smith
(University of Nebraska at Lincoln) for reporting it.)
o
Documentation corrections, fixes, and clean-ups.
o
A number of memory leaks have been fixed.
OTHER USER-VISIBLE CHANGES
o
Miscellaneous improvements to the BDStrat* family of proposals.
o
In adaptive MCMC, burn-in detection now fits an exponential
decay rather than a broken stick model.
Changes in version 4.0.1 (2021-06-21)
BUG FIXES
o
Fixes to extended state API propagation in Passthrough term.
o
Fixes to the handling, particularly of curved terms and
offsets, in the Sum() and Offset() operators.
o
Minor fixes and improvements to some terms' C implementations.
OTHER USER-VISIBLE CHANGES
o
Per request of the sna maintainer, symmetrize() generic and
methods have been renamed to ergm_symmetrize.
o
Metadata set by %ergmlhs% is now pretty-printed.
C-LEVEL FACILITIES
o
In the C API, the ToggleKnownEdge(), function now ensures that
tail < head for undirected networks.
Changes in version 4.0.0 (2021-06-14)
NEW FEATURES
o
Terms, such as nodecov, that take matrix-valued functions of
nodal attributes now generate coefficient names from the matrix
column names more sensibly.
o
The levels2 argument in terms mm and nodemix now accepts an
argument in the form of a logical mixing matrix, selecting
which mixing matrix cells should be included.
o
ergmMPLE() now has an expand.bipartite= argument, which, for
output='array', controls whether bipartite networks' adjacency
matrices are represented as rectangular or as square. Other
behaviors under output='array' have also been made more
consistent.
o
In gof functions, bipartite networks now have their own
goodness-of-fit statistics, b1degree and b2degree.
o
Formula or function-type nodal attribute specifications can now
be more complex. In particular, magrittr-package's %>% operator
can now be used on one of the sides of an mm formula.
o
nodal_attributes documentation and vignette now have more
examples.
o
Nonidentifiability detection code now checks for nonvarying
statistics first and handles them appropriately. See
control.ergm for the parameters that control this handling.
o
Control lists can now be specified as plain lists with sublists
allocated by argument name. Function snctrl can provide
completion in base R, RStudio, and elsewhere.
o
ERGM now checks for whether an MPLE exists and warns the user
if not. (Thanks to Christian Schmidt (PSU).)
o
Arguments to ergm terms can now be specified a little bit more
flexibly; e.g., one can specify an unnamed argument after a
named argument, as one can in an R function call.
o
Curved ERGMs are no longer “second class citizens”. Curved
parameters can now be passed via coef= and init= arguments
rather than embedded in the formula.
o
A new type of term, an _operator_ is introduced, taking one or
more ergm formulas as arguments and transforming their inputs
and outputs allowing a wide variety of models to be specified.
These include interactions for dyad-independent effects
(TERM1:TERM2 and TERM1*TERM2), B()inary terms in valued ERGMs,
Label(), F()ilter, Offset(), Symmetrize(), Sum(), S()ubgraph,
Curve(), NodematchFilter(), Log(), Exp(), Prod(), and others.
o
A new type of MPLE, "logitreg", invoked when the model is
curved.
o
A new term, attrcov, can cumulate statistics from multiple
cells in the mixing matrix.
o
Termes transitiveties and cyclicalties now work for undirected
networks (where they count undirected transitive ties).
o
is.valued is a family of methods for testing if a particular
aspect of an ERGM is valued.
o
Long MCMC, SAN, etc. runs can now be interrupted (i.e., with
CTRL-C) even from inside the C code.
o
update.network can now update the network using a variety of
inputs, including edgelists and ergm_states.
o
The MPLE initial method can now be used to estimate curved
ERGMs without specifying the initial curved parameter. The
initialfit= InitErgmTerm argument and as.initialfit= argument
of ergmMPLE have been removed. Similarly, fix.curved and
enformulate.curved have been deprecated and may be removed in a
future release.
o
A mechanism for specifying “observational constraints”
(obs.constraints) has been added to ergm, allowing more complex
observation processes than just missing data to be estimated.
Currently, this can be used for estimating arbitrary ERGMs on
networks whose edges have been randomly flipped with known
probabilities (say, to preserve privacy) (Karwa, Krivitsky, and
Slavcovic, 2017) using the dyadnoise or observed egocentrically
with alters identified (Handcock and Gile, 2010) using the
egocentric constraint.
An argument observational= to simulate.ergm can specify whether
the model or the observational constraint from the ergm fit
should be used.
o
The user can now specify “hints” on a formula to MCMC.prop= and
obs.MCMC.prop= arguments passed to control.ergm that can allow
the MCMC sampler to select an optimal proposal for the process.
Currently, the available hints are sparse structure, implying
that the network is sparse (the default), and strat, implying
that the dyads are grouped in blocks which should be subject to
stratified sampling.
This is documented in the _Proposal Lookup API_ vignette.
o
ergmMPLE output types now include "dyadlist", which returns the
same output as "matrix", but without compressing the duplicate
rows.
o
New constraint, blocks has been implemented, allowing dyads for
some combinations of a factor to be prohibited from toggling
(i.e., fixed, or set as structural 0s).
o
An MCMC proposal BDStratTNT has been implemented, allowing for
highly efficient MCMC sampling for some special cases of
bounded degree and block-level stratification among the dyads.
o
A number of model specification settings, including
constraints, obs.constraints, and response can be attached to
the network itself using the %ergmlhs% operator and are
inherited by the respective arguments unless overridden.
o
Terms nodecovar, nodeocovar, and similar have been improved.
(Terms nodesqrtcovar terms had been folded into the former.)
o
san can now take into account offsets (finite and infinite).
o
A new default MCMLE stopping criterion, "confidence" has been
implemented. It performs a multivarate equivalence test,
stopping if it can reject the null hypothesis that the the
parameter guess is outside of a certain tolerance region around
the true parameter value. If the test fails to reject, it
increases the target effective size and resumes the
optimization.
o
Data structures for edgelists returned from MCMC, SAN, and
Godfather are now allocated dynamically. This means that
control parameters *.init.maxedges and *.max.maxeges are no
longer useful and has been removed. MCMC.maxedges (for
control.ergm and control.simulate.ergm) is retained (with an
infinite default) to be used to short-circuit a sampler that
has gone degenerate.
o
The "Stochastic-Approxmation" algorithm (a C-based
implementation of Robbins-Monro) now fully supports curved
ERGMs.
o
The control.ergm parameters for "Stochastic-Approximation" and
"Robbins-Monro" have been reorganised.
o
Limited support for multithreaded (i.e., multicore) evaluation
of change statistics has been implemented. It has to be enabled
at compile time and is controlled by set.MT_terms and related
functions, and parallel.inherit.MT= argument of control.ergm
and others.
o
Controls for bridge sampling (i.e., control.ergm.bridge) can
now be set separately for the constrained (missing data)
sample.
o
The standard argument response= can now be a rlang-style
formula containing an expression in terms of edge attributes
for the modelled edge value. If the expression (or the
attribute) evalutes to a logical (TRUE/FALSE) variable, a
binary ERGM is estimated.
o
Adaptive (effective size) sampling is now possible for the
simulate.ergm family of functions as well.
o
control.simulate.ergm control parameter MCMC.scale can now be
used to set the MCMC burn-in and interval relative to those of
the ergm fit.
o
In ergm formulas, the offset() decorator now takes a second
optional argument allowing only some of the parameters in the
term to be fixed.
o
ergm is now a bit more careful about saving formulas and
environments, saving memory and disk space.
o
An experimental lack-of-fit diagnostic rank_test.ergm has been
added.
o
The sna function symmetrize is made into a generic and a method
for network objects is implemented.
o
The user term and proposal APIs has been extended
significantly. A new API enables storage of information between
calls that is updated with the network state, _auxiliaries_:
terms that make available information to other terms, and many
other capabilities. See the _Terms API_ vignette for the
current specification. The API remains source-compatible with
the previous versions.
The R API for ergm_model takes an additional argument
extra.aux=, which can be used to request auxiliaries by other
functions, such as proposals.
o
A number of auxiliaries has been implemented (see
R/InitErgmTerm.auxnet.R) and a convenient API for evaluating
network statistics on auxiliary networks is provided.
o
Log-likelihood estimates and derived quantities (deviance, AIC,
BIC) now also report their standard errors due to bridge
sampling. Setting the bridge.target.se control option to
control.logLik.ergm and/or control.ergm.bridge will continue
sampling and accumulating samples until the estimated standard
error due to bridge sampling falls below it.
o
san output now includes the sampled statistics of the network.
BUG FIXES
o
The package functions now work more reliably when loaded but
not attached but rather invoked via ::.
o
The Dyads operator constraint now works correctly on undirected
networks.
o
Term initialization traceback printing has been robustified.
o
Term nodeisqrtcovar now initializes without error. (Thanks to
Yu-Lun Chen (NYU) for reporting the issue.)
o
The MPLE code has been robustified for some corner cases (e.g.,
a model with 0 free parameters).
o
Various fixes to predict.ergm. (Thanks to Michal Bojanowski.)
o
In ddsp, dnsp, dgwdsp, and dgwnsp, the "RTP" (reciprocated
transitive partners) implementation has been fixed.
o
Term initialization error messages are now somewhat cleaner and
more informative.
o
Miscellaneous documentation fixes and CRAN warning fixes.
OTHER USER-VISIBLE CHANGES
o
*IMPORTANT:* The levels2= argument of nodemix and mm terms now
defaults to -1 (i.e., exclude the first level combination). Old
behaviour is available through the version term option.
o
*IMPORTANT:* In curved terms such as gwesp (with fixed=FALSE),
the decay parameter in the term is now ignored; the initial
decay parameter must be specified as a part of
control.ergm(init=...). Note that because MPLE for curved ERGMs
has been implemented, it is optional in the first place.
o
summary_formula family of functions now dispatch based on the
basis= argument if present, with the formula being allowed to
be one-sided.
o
In control.ergm, arguments SAN.control= and loglik.control=
have been shortened to SAN= and loglik=, respectively.
o
Global ERGM options and ERGM term options are now properly
documented in options?ergm.
o
The hammingmix term has been deprecaed.
o
The convex hull testing now uses the lpSolveAPI-package and is
faster and more robust as a result. (Thanks to Christian Schmid
(PSU).)
o
enformulate.curved family of functions has been deprecated.
o
ergmfit$coef element has been superseded by
ergmfit$coefficients for consistency with glm and others. The
former still works, with a deprecation warning. Using
coef(ergmfit) is recommended.
o
Arguments to ergm_MCMC_sample and ergm_MCMC_slave have changed,
and similarly for SAN and CD.
o
Shared partner counts in gw*sp and *sp terms are now cached,
resulting in a significant speedup. This can be turned off with
the term option cache.sp.
o
The term API now supports box constraints on parameters or
coefficients, which may be set via minpar and maxpar elements
in the InitErgmTerm's return list.
o
In the valued ERGM API, the response setting is now carried as
an %ergmlhs% setting "response".
o
Some likelihood metrics, particularly the Median one, should
work better now.
o
In the InitErgmConstraint API, free_dyads can now be a function
with 0 arguments, that is only evaluated if needed and is
memoized (using the memoise package).
o
control.ergm parameter MPLE.constraints.ignore can be used to
suppress calculations of complex RLEBDMs for large networks if
the constraint is imposed in some other fashion.
o
control.ergm obs.MCMC.* parameters can now be set relative to
the unconstrained MCMC parameters via obs.MCMC.mul.
o
A variety of improvements and tuning parameters for the Hummel
step length algorithm (control.ergm parameters
MCMLE.steplength.*).
o
control.ergm's *.samplesize can now be specified as a multiple
of the number of free parameters in the model, via the
*.samplesize.per_theta parameter.
o
Adaptive MCMC has been significantly improved. Methods of Vats,
Flegal, and Jones (2019) are used to determine the multivariate
effective sample size, and automatic burn-in detection now
works by fitting a broken stick linear model to see where the
sample statistics level out, then uses the Geweke convergence
diagnostic to verify. See help for control.ergm and other
functons for the available tuning parameters.
o
A number of defaults for control parameters have changed.
o
The pending_update_network, ergm.Cprepare, and other APIs for
moving between R and C have been replaced by the ergm_state API
that uses the .Call interface.
o
simulate.ergm now has not just the ergm_model methods but also
ergm_state methods.
o
The lasttoggle API created for the tergm package has been
removed in favour of the “extended state” API that allows
client packages to implement their own states. Similarly,
is.durational family of methods has been removed.
o
Information used by print.summary.ergm to explain the type of
fit is now set in ergm.
o
The ergm_proposal_table API now allows a more flexible
specification of which constraints a proposal _can_ enforce as
opposed to which ones it _does_ (i.e., can't not) enforce.
o
The InitErgmConstraint and InitErgmReference API now has the
same calling convention as Init*ErgmTerm, which enables
check.ErgmTerm to be used to preprocess and check their
arguments.
o
The Init*Ergm* functions now receive an optional env= argument
containing the environment of the formula from which they were
called.
o
The InitErgmConstraint API now allows multiple nested
constraints to be returned, to allow a proposal to address
either a more general or a more specific one.
o
The do.sim= aregument to the simulate.ergm family of functions
has been deprecated in favor of a more consistent return.args=.
o
Likelihood-change trust region (trustregion) code has been
removed.
C-LEVEL FACILITIES
o
Almost all of the R-C interface has been transition to use the
.Call rather than the .C API. Some helper functions are
provided in inst/include/ergm_Rutils.h.
o
Functions ergm.eta, ergm.etagrad, and ergm.etagradmult have
been reimplemented in C using the .Call interface. They are
available in the C API in inst/include/ergm_etamap.h.
o
inst/include/ergm_changestat.h and
inst/include/ergm_wtchangestat.h now provide more helpful
helper macros.
o
InitErgmTerm and InitErgmProposal functions can now pass a
integer (as opposed to a numeric) vector to the C functions
with an outlist$iinputs element.
o
A general API for setting callback functions that are called
whenever a network changes is provided. See the _Network
Callback API_ vignette.
o
The discordance network API has been removed in favour of the
storage API.
o
The khash macro library (from
) has been
incorporated into the package with some modifications and is
available to use, in particular, for O(1) storage of dyad
information, particularly in applications where efficient
iteration over edges incident on a node is not needed. It can
be found in /inst/include/ergm_khash.h.
A variety of helper data structures and functions make use of
it and are also available, particularly
/inst/include/ergm_dyad_hashmap.h.
o
Additional helper APIs and data structures have been provided
in /inst/include/.
o
A DyadGen API implemented on the C side by
/inst/include/ergm_dyadgen.h and on the R side by
ergm_dyadgen_select automatically selects sampling arbitrary
dyads, sampling from an edgelist, or sampling from an RLEBDM.
It obviates a number of other proposals, such as RLETNT and
listTNT.
o
All header files exported by ergm have been prefixed with
ergm_. (Old header file names now issue deprecation warnings.)
Changes in version 3.11.0 (2020-10-14)
NEW FEATURES
o
ergm now checks models for evidence of nonidentifiability
(linear dependence between statistics) after MPLE and during
the MCMLE and CD estimation. QR decomposition is used to
attempt to identify which statistics are redundant.
o
It is now possible to limit the systematic sample size taken by
MPLE before resorting to the case-control likelihood using the
MPLE.samplesize control parameter (if initial fit is final) and
by the init.MPLE.samplesize control parameter (if it is used
only to initialize the MCMC-based estimation).
o
A new “operator” constraint Dyads takes ergm formulas and
constrains dyads based on which dyads affect their change
statistics.
o
It is now possible to calculate model-predicted *conditional*
and *unconditional* tie probabilities using predict.ergm and
predict.formula. (Contributed by Michal Bojanowski.)
o
The nodal attribute specification mechamism (i.e., the attr=
and levels= arguments to terms) now includes a number of
convenience functions and predicates, such as LARGEST and
SMALLEST to select or exclude the most/least frequent levels,
and COLLAPSE_SMALLEST to collapse the smallest categories into
one.
o
ergmMPLE now takes a constraints argument and handles it and
missing dyads correctly.
o
san now has the ability to take offsets into account.
o
mcmc.diagnostics.ergm now takes an argument which= to to
specify which output is wanted.
o
The following new model terms have been implemented:
• b1dsp, b2dsp, gwb1dsp, and gwb1dsp, the bipartite versions
of dsp and gwdsp.
• isolatededges, to count the number of edges that are in a
single component.
o
A vignette for the nodal attributes UI has been added.
o The simulate.ergm family of functions' output= argument can no
only takes a function through which the simulated networks are
mapped before returning.
o
The cycle term implementation has been greatly improved.
o
ergm now takes a basis= argument as others.
o
plot.gof now plots a blue rhombus to indicate the simulated
mean.
BUG FIXES
o
A bug involving assumptions based on the first entry in the
lasttoggle vector has been corrected.
o
In logLik.ergm, degrees of freedom no longer count offsets.
o
The Dyad type used in C code is now at least 64 bits on all
systems, fixing some issues around large networks.
o
A bug that made san fail to terminate when it had hit its
target stats exactly has been corrected.
o
The as.rlebdm.edgelist function now correctly handles the
network size attribute attached to the edgelist.
o
Fixed incorrect use of MCMC.* control parameters in san.
o
Fixed the documentation for the object argument to
ergm_proposal, and fixed a recursive default argument to
ergm_proposal.character.
o
Added a workaround for a limitation of
coda::densityplot.mcmc.list when variable names are not unique,
which caused a problem in mcmc.diagnostics pointed out by James
Wells.
o
The levels argument was removed from starmix terms, as it was
not functioning correctly.
o
A bug in ergmMPLE for bipartite networks has been fixed.
o
Some fixes to approx.hotelling.diff.test.
o
Contrastive divergence runtime diagnostics now work correctly.
o
ergm.godfather now handles undirected valued networks
correctly.
o
Per CRAN warning, none of the internal glm-alike functions
default to data=sys.parent() anymore.
o
as.network.numeric now handles the bip argument consistently
with network.initialize.
o
For bipartite terms, NAs in nodal attributes are now tolerated
if they are in the unused bipartition.
o
ergm.bridge now correctly updates the state of the network
after every bridge's burn-in. (This bug did not invalidate any
prior results, but it made the log-likelihoods and derived
quantities reported by summary.ergm less accurate.)
o
ergmMPLE now handles offsets corectly when returning matrix and
array output.
o
Miscellaneous fixes to predict.ergm and ergmMPLE, particularly
in handling offsets.
o
Miscellaneous vignette and documentation fixes.
OTHER USER-VISIBLE CHANGES
o
Datasets fauxhigh and fauxhigh.withnumericattributes have been
removed.
o
Control parameters *.Hummel.* have been renamed to
*.steplength.* for consistency.
o
Parallel multisection search for the Hummel step length is now
only enabled for missing data MLE by default, and can be
disabled altogether with appropriate control parameters.
o
Formulas are no longer attached to ergm_model, ergm_proposal,
ergm_conlist, and others.
o
The simulate family of methods has been restructured. In
particular, it is now possible to call simulate() on an
ergm_model object without reinitializing it.
o
A number of improvements have been made to the nodal attribute
API. In particular, ergm_get_vattr now has an AsIs method that
makes minimal changes to the input before returning,
ergm_get_vattr.function now propagates its arguments to the
function it calls, and ergm_get_vattr now accepts a "index"
type argument representing vertex indices (a logical of
appropriate length, or a nonnegative or nonpositive integer
vector).
o
Missing nodal attributes now generate an error in model
initialization.
o
summary.ergm and its printing method have been cleaned up.
o
A variety of miscellaneous optimizations, coleanups, and
documentation improvements.
o
The InitErgmTerm API's check.ErgmTerm now accepts NA or "" for
argument type, indicating that any type is accepted.
o
In parallel computing, worker nodes now load packges .libPaths
of the manager node.
o
The following deprecated functions have been made defunct:
ergm.update.formula, remove.offset.formula, network.update,
ergm.getmodel, ergm.getglobalstats, as.edgelist.compressed,
as.network.uncompressed, standardize.network, and
newnw.extract.
o
san.ergm has been deprecated, since it lacks a known use case.
o
The simulate.formula dispatching mechanism has been rewritten
to coexist with other pacakges that want to dispatch based on
the LHS of the formula, particularly lme4. The simulate_formula
API still works, but it may be phased out in the future.
o
ergm.bridge has has been optimised to avoid repeated calls to
model and proposal initialisation.
C-LEVEL FACILITIES
o C export ergm_constants.h now exports the major and the minor
version of ergm.
Changes in version 3.10.4 (2019-06-10)
OTHER USER-VISIBLE CHANGES
o
Deprecated term argument warnings are now only printed once per
session.
o
mcparallel antiwarnings are now printed less frequently.
BUG FIXES
o
ergm version 3.10.1 inadvertently depended on R 3.6. The
dependence has been reverted to 3.5.
Changes in version 3.10.1 (2019-05-14)
NEW FEATURES
o
In all gw* terms, the cutoff= argument can now be controlled by
a gw.cutoff term option.
o
nobs method has now been implemented for ergm objects.
o
simulate.ergm now takes a basis= argument (defaulting to NULL)
that it passes to simulate.formula().
o
ergm.godfather now takes an additional changes.only= argument,
to return statistics relative to initial network.
o
san's internals have been singificantly updated. In particular,
• SAN now performs true simulated annealing, and arguments
are interpreted somewhat differently.
• SAN's weighting of the statistics is now determined
adaptively, in approximate proportion to the standard
deviation of proposal distribution of these statistics.
o
fix.curved and enformulate.curved now handle the dgw*sp terms.
o
simulate.ergm and others now have an output= argument to
provide finer control over the return format. It is to be
preferred over the statsonly= argument.
o
A number of terms (see terms help) now use the new nodal
attributes UI.
o
Hummel steplength search can now be run in parallel.
o
Terms node*cov and b*cov can now take multiple quantitative
attributes or a function that returns a quantitative attribute
matrix and produce a statistic for each.
o
Terms b1sociality and b2sociality have been added.
o
MCMLE estimation method can now checkpoint and resume
optimization. See control.ergm's MCMLE.checkpoint= and
MCMLE.resume= arguments.
o
A variety of documentation expansions, cleanup, and other
improvements.
BUG FIXES
o
The default method of ergm.stopCluster had not been exported.
o
summary.ergm fixed for CD estimation.
o
diff term with sign.action="abs" no longer produces a warning
on bipartite undirected networks. Thanks to Damien Georges for
pointing out that this warning is unnecessary.
o
More robust searching for initialization functions.
o
Some spurious warnings fixed.
o
ergm version is now stored in the fitted object; this should
produce sensible warnings when, say, trying to compute a
summary.ergm on a object produced by an earlier version.
o
Disambiguation help pages have been added for concepts (such as
edges and hamming) that have multiple roles (such as as an ERGM
term and as an ERGM sample space constraint), removing
duplication of aliases.
o
Miscellaneous term and example documentation fixes. (Thanks to
Christian Loehle and others.)
OTHER USER-VISIBLE CHANGES
o
Low-level function ergm_SAN_slave has now been split out of san
like ergm_MCMC_slave.
o
Lower-level simulate.ergm_model and san.ergm_model have been
split out of simulate.formula and san.formula.
o
gof.ergm now uses a longer MCMC.interval by default.
o
Parallel processing “API” now handles cluster starting and
stopping more intelligently. In particular, ergm.getCluster now
automatically sets up the calling function to stop the cluster
when the calling function terminantes, as well as keeping track
of which packages have already been loaded on the slave nodes.
o
The vignette no longer tests egocentric code.
o
Failure to allocate memory in the C routines now produces
sensible errors.
o
A semi-internal pending_udpate_network API can be used to carry
around network information between .C calls without having to
reconstruct the network.
o
control.ergm's init.method= argument now overrides the
candidate list when selecting initialization methods.
o
network.update is deprecated in favor of an update.network
method.
o
standardize.network has been deprecated, rendered obsolite by
improvements to the network package method.
o
simulate.ergm now defaults to starting the simulation from the
$newnetwork element of the fit object. Thanks to Saeid Ghafouri
for raising the issue and Sam Jenness, Steven Goodreau, and
Martina Morris for suggesting a solution.
o
simulate methods now attach an attr(,"monitored") to the
returned statistics, indicating which statistics were generated
from the monitor= argument.
o
pending_update_network “API” is more formalized now, including
methods overriding those of network.
o
control$init.method now overrides the candidate list when
selecting initialization methods.
o
The main vignette no longer contains egocentric inference code.
Refer to the ergm.ego package.
o
Improvements to plot.gof for large networks.
o
logLik.ergm(warn.dyads=) control parameter has been replaced by
options(ergm.loglik.warn_dyads=) option.
o
A number of previously deprecated functions are now defunct; a
number of previously defunct functions have been removed.
o SAN's documentation has been augmented with examples.
o
sociality term's arguments attrname and levels have been
deprecated.
o
Most parallel calls are now a little bit more fault-tolerant,
retrying on error.
o
Chad Klumb has been added as a contributor to the package.
C-LEVEL FACILITIES
o Some changes to the Metropolis-Hastings proposal API.
o Network initialization functions now return a pointer, and
destroying functions free it.
o
Miscellaneous improvements to low-level C code. In particular,
more of the code now runs deterministically.
o
Improvements to encapsulation of Network structures.
Changes in version 3.9.4 (2018-08-16)
NEW FEATURES
o
A new API allows arbitrary combinations of dyad-level sample
space constraints.
o
Most terms that take categorical nodal attributes now have a
levels= argument, which can be used to control the set and the
ordering of the attribute levels.
o
More informative error messages for term initialization.
o
ergm.godfather has been reimplemented in the ergm package,
along with its valued counterpart.
o
New terms have been added or improved:
• mm for a more flexible specification for mixing matrix and
marginal effects;
• valued versions of sender, receiver, sociality terms;
• ininterval now allows interval openness to be specified as
a character string.
o A new term.options control parameter allows additional
arguments to be passed to term initializers.
BUG FIXES
o
A numerical instability in penalised pseudolikelihood
calculation identified by Kevin Reuning has been fixed.
o
An error in runtime traceplotting for models with offset terms
reported by Kevin Reuning has been fixed.
o
An error when trying to run the Robbins-Monro algorithm with
parallel processing enabled, reported by George G. Vega Yon has
been fixed.
o
A bug in the meandeg term for directed networks has been fixed.
o
Miscellaneous bugs in the gof family of functions have been
fixed.
OTHER USER-VISIBLE CHANGES
o
The coefficient names associated with terms enclosed in
offset() are now also enclosed in offset().
o
summary method for ergm now uses uses z-tests rather than
t-tests, since there is no “dispersion” parameter. In addition,
it no longer takes a digits= argument.
o
Handling of missing relations has been improved.
o
Estimation progress when verbose=TRUE is now a bit less
verbose; use verbose=2 and up to get more information.
o
The default value of the eval.loglik= argument to ergm is now
controlled by options option ergm.eval.loglik=.
o
plot.network.ergm has been deprecated.
o
Some of the unofficial APIs have been changed for consistency
and ease of use:
• A new set of helper functions has been added to improve
handling of nodal attributes. See nodal_attributes-API for
details.
• summary method for ergm now exports a $coefficients element
(like summary.lm) and $devtable is a proper table.
• New generics nparam and param_names can be used to query
the number and the names of the parameters in a model.
• ergm_model (replacing ergm.getmodel) is now a full-fledged
S3 class, representing initialized ergm models. See its
help for the major methods. In particular,
ergm.getglobalstats has been repalced with
summary.ergm_model.
• simulate.formula functions now take an ergm_model as an
argument to monitor=.
• Constraint initializers have been renamed from
InitConstraint to InitErgmConstraint. The constraint
implications table has been replaced with implies and
impliedby constraint lists.
• Proposal initializers have been renamed from InitMHP (and
InitWtMHP) to InitErgmProposal (and InitWtErgmProposal).
ergm.MHP.table has been renamed to ergm_proposal_table.
• Reference initializers have been renamed from InitReference
to InitErgmReference. Return format has also been changed,
replacing ergm.init.methods.
• ergm.Clist.* functions have been refined and specialized.
In particular, those that specifically return numeric
vectors (not lists of numeric vectors) for passing to C
code are now methods of the to_ergm_Cdouble generic.
• ergm.getMCMCsample and ergm.mcmcslave have been renamed to
ergm_MCMC_sample and ergm_MCMC_slave respectively, and the
arguments of ergm_MCMC_sample have been made more
user-friendly.
Changes in version 3.8.0 (2017-08-20)
NEW FEATURES
o
Development of ergm and associated packages is now hosted on
GitHub.
o
Some terms, particularly dyadcov have been improved.
BUG FIXES
o
Bug fixes to contrastive divergence code.
o
ddsp and dnsp terms now work correctly for 0 shared partners.
(Thanks to Wouter Spekkink for reporting this bug.)
o
Miscellaneous bug fixes, typo corrections, and
robustifications.
OTHER USER-VISIBLE CHANGES
o
Terms degreepopularity, idegreepopularity, and
odegreepopularity have been renamed to degree1.5, idegree1.5,
and odegree1.5 respectively.
o
Progress reports for ERGM fits and simulations are now printed
using message, so they can be suppressed with suppressMessages.
o
A number of functions deprecated in 2015 have been removed. See
help('ergm-defunct') for the list.
Changes in version 3.7.1 (2017-03-21)
BUG FIXES
o
Reverted a non-portable use of C function alloca(). (Thanks to
Prof. Brian Ripley for pointing out the problem.)
Changes in version 3.7.0 (2017-03-20)
NEW FEATURES
o
New term diff, a directed analogue to absdiff has been added,
allowing for different ways to handle differences in nodal
attributes.
o
By default, gof now checks goodness-of-fit with respect to the
estimated model in addition to the specified terms. This can be
used to diagnose convergence.
BUG FIXES
o Terms concurrent, degree, degrange, and concurrentties “byarg”
argument has been corrected to “by”.
o The bug in the Contrastive Divergence code that caused ERGM
fits with bd constraint to hang has been fixed.
o Documentation for the curved ERGM terms has been clarified in a
number of places.
o Miscellaneous fixes and robustifications in the step-length
code.
OTHER USER-VISIBLE CHANGES
o
The geometric decay parameter in gw*sp and dgw*sp terms has
been renamed from alpha to decay, for consistency with
gw*degree terms.
o
It is now explicitly an error to pass a control= parameter to
the function directly. (Previously, such parameters were
silently ignored.)
Changes in version 3.6.1 (2017-01-05)
BUG FIXES
o The implementation of the bounded degree (bd) constraint had a
bug that distorted somewhat the distribution of networks
simulated (and therefore estimated) away from the boundary of
the constraint.
o Vertex labels in the sampson and samplike datasets have been
corrected. (Thanks to Dr. Linda Tan Siew Li for pointing this
error out.)
o Use of the deprecated unix.time has been changed to
system.time.
o Miscellaneous fixes to the documentation and robustifications.
Changes in version 3.6.0 (2016-03-25)
NEW FEATURES
o
A new suite of geometrically-weighted family of terms has been
added that allow the user to specify what directions of shared
partnerships are of interest. The new terms are,
• (Directed) geometrically weighted dyadwise shared partners
(dgwdsp)
• (Directed) geometrically weighted edgewise shared partners
(dgwesp)
• (Directed) geometrically weighted non-edgewise shared
partners (dgwnsp)
In addition, terms for specific shared partner counts (ddsp,
desp, and dnsp) have been implemented. See ergm-terms for help.
o New terms (binary and valued) b1cov and b2cov have been
implemented, analogous to nodecov, nodeicov, and nodeocov but
for bipatite networks.
o New valued terms atleast, equalto, and smallerthan have been
implemented. A number of terms that were binary-only before
have been implemented for valued ERGMs.
o
ergm package now works when loaded (e.g., using
requireNamespace) but not attached (e.g., using library).
BUG FIXES
o A number of implementation bugs in the valued ERGM terms have
been fixed.
o Parallel processing when using ergm.userterms and similar was
accidentaly broken in the previous release.
o Calculation of Hummel et. al. (2010) steplength for missing
data MLE was incorrect; a slower but more accurate algorithm is
now used.
o Miscellaneous bugfixes and robustifications.
o gof.formula and others now work with missing data.
o Miscelaneous cleanups and bug fixes.
OTHER USER-VISIBLE CHANGES
o robust.inverse has been deprecated in favor of ginv.
o simulate.formula now does parallel processing more efficiently.
Changes in version 3.5.1 (2015-10-24)
NEW FEATURES
o Added a new generic, is.curved that tests if a given ERGM or
model is curved.
o Block-diagonal sampler now handles bipartite networks.
o Code for parallel calculation has been optimized to provide a
bigger gain from multiple cores/processors/nodes.
o Bridge sampling to evaluate the log-likelihood at the MLE now
prints out a brief progress report by default.
BUG FIXES
o MPLE is no longer used if the model is curved and target
statistics are passed, as that caused problems.
o MCMC standard error calculation, "dropping" of extreme terms,
main MC MLE loop, and other places have been made more robust
to weird combinations of estimating problems (e.g., curved
terms + target statistics + offset terms + poor starting
value).
o threepath has been deprecated in favor of threetrail to more
accurately reflect what is being computed.
o The "naive" log-likelihood ratio metric now handles offsets
more robustly.
o The null log-likelihood calculation prints messages instead of
throwing warnings.
o The closed-form solution (see Hummel et al., 2010) for the
"lognormal" metric had been inadvertantly disabled. It has been
reenabled.
o Many documentation fixes and clarifications.
OTHER USER-VISIBLE CHANGES
o Skye Bender-deMoll has been added as a contributor to the
package.
o Hummel et al.'s convex hull calculation and MCMC SE calculation
have been robustified against highly correlated sample
statistics by using PCA to rotate them into an orthogonal
configuration.
o Some functions, particularly ERRVL, append.rhs.formula,
vectors.namesmatch, term.list.formula, and ergm.update.formula
have been moved to the statnet.common package.
o The as.edgelist family of functions have been moved to the
network package.
o mcmc.diagnostics.ergm now takes the esteq= argument. If TRUE,
the diagnostics are performed on the simulated values of the
estimating functions. If FALSE, they are performed on simulated
values of canonical statistics. This obviates and replaces the
the curved= argument.
o san when used with curved models now requires canonical
statistics as targets.
Changes in version 3.4
NEW FEATURES
o Added message to notify when ergm MCMLE does not converge after
max iterations.
o Copied the combined Sampson monks dataset to ergm. See
?sampson.
o ergm simulation, bridge, and logLik functions now "inherit" the
parallel setting from the ergm object and generally pass it
along when possible.
o A new estimate type and source for initial values, contrastive
divergence, has been added. It is intended primarily for
obtaining initial values for MCMLE for valued ERGMs and ERGMs
with complex (e.g., degree and edge-count) constraints. For
binary networks with dyad-independent constraints, MPLE still
generally works better and remains the default.
To obtain the contrastive divergence estimate, call ergm with
estimate="CD".
BUG FIXES
o Fixed issue where constraints was not appropriately compared to
older version
o Fixed bug where the deviance of dyad-independence models was
incorrectly computed/reported for all models
o Removed Rglpk package dependency; replaced it with lpSolve
package dependency. See man page for is.inCH for details
o Fixed integer overflow bug in sample size reporting
o Fixed bug in saving target.stats vector. Offset terms in
target.stats output are now NA instead of the SAN network
stats. (issue #1049)
o Fixed ergm segfault when unknown node attributes are used in
ergm formulas. Modified get.node.attr function so that it will
check if specified attribute exists. (previous code only
checked if network was bipartite). (issue #1140, reported by
Philip Leifeld)
o Implemented solution to MCMLE steplength getting stuck at 0 for
some models where initial networks are very far from target
stats. If the Hummel step length is <
control$MCMLE.steplength.min, stop with an informative error
message, reporting that the the starting value is poor. If
using target stats, try increasing SAN parameters, or your
configuration may be impossible or unlikely. (This suggests a
poor model for the observed data.) MCMLE.steplength.min=0.0001
by default. Estimation will stop with an error message when
steplen is smaller than the min for 2 iterations. (issue #1089)
o Replaced the integer function abs() by floating point function
fabs() in MHproposals_degree.c.
o Various documentation corrections and fixes
OTHER USER-VISIBLE CHANGES
o ergm with estimate="MPLE" will now refuse to estimate the MPLE
for valued ERGMs, curved ERGMs, and ERGMs with certain complex
constraints, as true MPLE for these is not yet implemented.
o CRAN-requested code structure changes (generally not visable to
user):
• require and library calls changed to requireNamespace and
namespace prefixes added to calls from other packages,
• S3 methods explicitly registered in NAMESPACE.
• packageDescription is no longer used in package citation
methods.
• Many formerly 'internal' functions have been documented in
a semi-stable API for use by developers of other
ergm-related packages.
• Many formerly undocumented 'internal' functions have been
made internal by the NAMESPACE. As far as we know, this
avoids functions in use by reverse-Depending packages.
These currently appear as commented items in the NAMESPACE
file.
• Many undocumented 'internal' functions that do not appear
to be used have been deprecated and will likely be removed
in the next release. See ?ergm_deprecated for a list. If
called, these functions will give a Deprecation warning and
suggest an alternate function where appropriate.
Changes in version 3.2.4 (2014-12-14)
NEW FEATURES
o ergm MCMLE estimation, by default, uses the stepping algorithm
by Hummel et al (2012) to determine step length, and terminates
estimation when the step length = 1 for two consecutive
iterations. The old method (from version 3.1) is still
available by setting control parameter
MCMLE.termination="Hotelling".
o As a result of using Hummel stepping algorithm, the final MCMC
sample average may be different from the observed statistics.
This is reflected in mcmc.diagnostics(): these plots can no
longer be used to ensure that the mean statistics from the
model match the observed network statistics. For that
functionality, please use the GOF command: gof(object,
GOF=~model).
o Default ergm MCMC parameters changed to MCMC.interval=1024,
MCMC.samplesize=1024, MCMC.burnin=MCMC.interval*16. The final
sample size in the Hummel stepping algorithm is boosted by a
factor of MCMLE.last.boost
o Default values for a number of other control parameters have
changed, see CHANGES below.
o Parallel functionality: ergm can take user-created clusters as
the parallel control parameter. This is the recommended method
for using ergm on a high-performance computing cluster. See
ergm-parallel. Functionality now implemented via the parallel
package, direct dependence on snow package is removed
o New helper function search.ergmTerms() function which through
the ergm.terms help page and prints out a list of terms
appropriate for the specified network's structural constraints,
optionally restricting by additional categories and keyword
matches.
o The estimated covariance matrix of the ergm estimate can be
extracted using vcov function.
o New EXPERIMENTAL Effective Sample Size (ESS) feature to
adaptively determine MCMC length needed to get the specified
effective size. Set MCMC.effectiveSize to non-NULL to enable
this functionality; 50 is a reasonable value. Includes new
ergm.control parameters
• MCMC.effectiveSize=NULL
• MCMC.effectiveSize.damp=10
• MCMC.effectiveSize.maxruns=1000
• MCMC.effectiveSize.base=1/2
• MCMC.effectiveSize.points=5
• MCMC.effectiveSize.order=0.1
• MCMLE.MCMC.max.ESS.frac
o SAN.control now includes an MPLE.max.dyad.types parameter which
defaults to the value of the ergm.control parameter of the same
name.
o Addition of the StdNormal reference distribution. See
?ergm.references
o New ergm terms:
• b1mindegree, b2mindegree Minimum degree for the designated
mode in a bipartite network
• b1nodematch, b2nodematch Nodal attribute-based homophily
effect for the designated mode in a bipartite network.
o Additional arguments added to the network.update function to
control which attributes and properties are updated.
o new esteq argument for simulate.formula and simulate.ergm:
Default is FALSE. If TRUE, compute the sample estimating
equations of an ERGM. If the model is linear, all non-offset
statistics are passed. If the model is curved, the score
estimating equations (3.1) by Hunter and Handcock (2006) are
given instead.
o New and expanded tests of the ergm functions for use with R CMD
CHECK tools.
o Addition of is.durational methods for models and formulas.
These functions test whether the terms in an ERGM model or
formula is duration dependent or not. If the formula or model
does not include any terms that need information about the
duration of existing ties, the ergm process can use more
efficient internal data structures. This is mostly in support
of tergm functionality.
o New ergm constraint terms: fixallbut(free.dyads),
fixedas(present,absent). The former one can specify the set of
dyads (as an edgelist or a network object) to be fixed, the
latter one can specify two sets of dyads (as edgelists or
networks objects), to be fixed present and fixed absent
respectively. See ?ergm.constraints
o Potential speed/memory usage improvement: sampling algorithms
in both R can C levels are optimized.
o ergm now imports the network package via NAMESPACE to avoid
internal namespace collisions when used with iGraph
CHANGES
o MCMC control parameters changes in control.ergm
• default for MCMC.interval increased from 100 to 1000
• default for MCMC.burnin changed from 10000 to
mcmc.interval*16
• default for MCMC.samplesize decreased from 10000 to 1024
o MCMLE control parameter changes in control.ergm
• a new control argument MCMLE.termination has been added to
specify the criterion used for terminating MCMLE
estimation.
• a new MCMLE.metric argument 'logtaylor' has been added
• control parameter MCMCLE.steplength.margin has been added
• default value for MCMLE.MCMC.precision has been increased
from 0.05 to 0.005
• default value for MCMLE.steplength has been changed from
0.5 to 1
o ergm.control parameter SA.nsubphases default changed from
MCMLE.maxit to 4
o control.gof parameter MCMC.burnin default increased from 1000
to 10000
o similarly, the default for the MCMC.burnin control parameter
for control.simulate, control.simulate.formula and
control.simulate.formula.ergm increased from 1000 to 10000
BUG FIXES
o Networks where some statistics are at the lowest value, leading
to some terms being -Inf, was not giving the correct estimated
coefficients. Now fixed.
o Bug fix in Penalized-likelihood MPLE estimation
o Bug fix in MPLE estimation when ergm edgecov term has an
attribute as a matrix.
o Bug fix in ergm nodecov term when attributes are specified only
for the second mode in a bipartite network
o Various compatibility improvements to avoid warnings from R
3.1.2 and 3.1.3
o control parameter MPLE.max.dyad.types is now passed to
logLik.ergm() and ergm.bridge.dindstart.llk(). fixes issue
reported by Sebastian Daza
o Fixed a fencepost bug in ergm.bridge.dindstart.llk()'s
construction of the offset coefficient vector in the
dyad-independent submodel reported by Philip Leifeld
o Adjusted package initialization code to avoid throwing error
reported by Philip Leifeld when ergm imported by another
package instead of attached to workspace.
o Fixed a bug with ergm.pl not dropping the appropriate rows when
there are Infs. When network stats are 0, the glm model should
now be specified correctly. Reported by Kevin Lewis
o Many other fixes...
DEPRECATED & DEFUNCT
o The ergm control parameter MCMLE.method has been deprecated.
By default, ergm uses trust, and falls back to optim with
Nelder-Mead method when trust fails.
o The ergm control parameter MCMLE.adaptive.epsilon has been
removed.
o The ergm control parameters MCMC.burnin.retries,
MCMC.burnin.check.last and MCMC.burnin.check.alpha have been
removed.
o MCMLE.adaptive.epsilon parameter has been removed
o The faux.high dataset was removed as it was identical to
faux.mesa.high
OTHER USER-VISIBLE CHANGES
o The "iterations" output in an ergm object now returns the
number of MCMLE iterations taken by the estimation.
o New help page for ergm MetropolisHastings Proposal methods.
Changes in version 3.1.3 (2014-07-19)
BUG FIXES
o An array bounds issue was fixed in the C code. It has not
affected any previous output.
o Some spurious convergence warnings are no longer printed by
summary.ergm.
o Bugs in the valued Uniform and Discrete Uniform
Metropolis-Hastings proposals for missing dyads have been
fixed.
o Term edgecov invoked with the network attribute syntax now
checks for the presence of the network attribute in question.
DEPRECATED & DEFUNCT
o Calling ergm, with estimate="MPLE" for a curved exponential
family model (e.g., gwesp with fixed=FALSE) is now an error.
(Previously, it treated the curved term as fixed, which was
misleading.)
Changes in version 3.1.2 (2014-01-31)
NEW FEATURES
o ergmMPLE can now output an array of change scores associated
with each dyad. See the help page for more details.
BUG FIXES
o Some Metropolis-Hastings proposal functions would sometimes
return incorrect acceptance probabilities when combined with
the bd constraint. This has been fixed.
o In simulate.ergm and simulate.formula, some combinations of
control$parallel, statsonly, and sequential arguments would
cause an error. This has been fixed. Note that the current
implementation of parallel simulation when statsonly=FALSE or
sequential=FALSE is very inefficient.
o A namespace bug in the likelihod calculation code, reported by
Matthew Hoover, has been fixed.
o MPLE for some degree-based constraints has been reenabled.
DEPRECATED & DEFUNCT
o Argument fitmodel to ergmMPLE has been deprecated in favor of
output.
OTHER USER-VISIBLE CHANGES
o Default SAN.burnin control parameter has been increased to
100,000.
Changes in version 3.1.1 (2013-11-28)
BUG FIXES
o Long-standing bugs in MCMC standard error calculation have been
fixed. In particular, MCMC standard errors are now calculated
for offset models, and they are no longer overestimated (by too
much).
o san now behaves sensibly when the network exceeds the number of
edges allocated.
o degrange terms now initialize correctly for their respective
network types.
o Some spurious warnings are no longer printed.
o A variety of minor errors has been fixed.
OTHER USER-VISIBLE CHANGES
o ergm's implementation and tests now work with network version
1.8. (In particular, bipartite=0 is now treated as a network
with no actors.)
Changes in version 3.1
NEW FEATURES
o Infrastructure has been added for fitting valued ERGMs of
Krivitsky (2012). The “user interface” is subject to change,
however. (The implementation of reference measures for counts
can be found in R package ergm.count)
o ergm itself now includes rudimentary implementations for
discrete uniform and continuous uniform reference measures. See
help('ergm-references').
o A large number of ERGM terms for counts have been implemented
and documented. See help('ergm-terms').
o A number of new binary ERGM terms have been implemented as
well. Particularly, degrange, odegrange, idegrange, b1degrange,
and b2degrange, which generalize degree and concurrent by
allowing the user to specify contiguous ranges of degree
values.
o A rudimentary “degeneracy” heuristic has been implemented and
enabled by default, immediately stopping MC MLE optimization if
simulating from a parameter configuration of interest
encounters produces networks with too many edges. See
MCMLE.density.guard argument in control.ergm documentation for
details. Note that this is intended mainly to keep the fitting
from bogging down on bad models, and it should not be used as a
formal degeneracy diagnostic.
o ergm now keeps track of of when it is and when it's not
possible to evaluate the likelihood of the null model (a model
with no terms), and takes into account whether a model is
constrained, has missing dyads, etc.. This can also improve the
MPLE.
A new generic, logLikNull has been added that returns the null
model likelihood.
For models where this is not possible, the null likelihood (and
deviance, etc.) is defined to be 0.
o A new constraint, blockdiag has been added, for modeling
networks with only within-block ties allowed. This is useful
for, e.g., fitting an ERGM to several networks jointly. See ?
'ergm-constraints' for available constraints.
OTHER USER-VISIBLE CHANGES
o The implementation of dynamic network models has been moved to
a new package, tergm.
o Sample space constraints degrees, idegrees, odegrees,
b1degrees, b2degrees have been re-implemented or fixed.
o Certain functions are now only exported if they haven't already
been defined (e.g., by latentnet).
o Documentation and citation information have been cleaned up and
reorganized. In particular, see ? 'ergm-constraints', ?
'ergm-terms' for an article on terms, and ? 'ergm-references'
for reference measures implemented.
C-LEVEL FACILITIES
o ergm now exports header and stub files for the LinkingTo: API,
and package ergm.userterms now uses it. Please see
inst/include/README before using it, however.
DEPRECATED & DEFUNCT
o Dynamic network modeling code has been moved to tergm package.
o Function statnet.edit has been removed.
BUG FIXES
o Some bugs introduced by the developers relying on a certain
behavior of the .C API which had changed have been fixed.
o Some undocumented terms have been fixed and documented,
including odegreepopularity, idegreepopularity,
degreepopularity, and smalldiff.
Changes in version 3.0
NEW FEATURES
o Facilities for fitting and simulating Separable Temporal ERGMs
(STERGMs) of Krivitsky (2009) and, Krivitsky and Handcock
(2010) have been added. See stergm and simulate.
o ergm MCMLE will now test if the optimization has converged to
the MLE and stop if it detects convergence.
o ergm Now checks if a constraint specified in the constraints
argument fixes any statistics in the model (e.g., ergm(y~edges,
constraints=~edges)). It issues a warning, and fixes their
parameters at 0.
o simulate functions now take an argument monitor, a one-sided
formula for additional statistics to be returned. This allows
one to easily simulate from an ergm or stergm fit statistics
that were not in the fitted model.
o ergm can now optionally detect when a burn-in is insufficient
and retry it until it is sufficient. See control.ergm argument
MCMC.burnin.retries for details.
o ergm MCMLE now stores “history” of theta and simulated
statistics.
o ergm extreme statistics detection (if control.ergm(drop=TRUE))
can now detect both extremely high and extremely low values,
setting the coefficients to +Inf and -Inf respectively.
Direction of “dropping” is returned.
o An initial method "zeros" has been, to use a vector of zeros as
starting parameters.
o A number of new ERGM terms have been added.
OTHER USER-VISIBLE CHANGES
o ergm, simulate, and other functions now enforce a conceptual
separation between _what_ to fit, which is controlled by
arguments to the function and _how_ to fit it, which is
controlled by the control lists, generated by control.ergm and
control.simulate, respectively. (Old arguments for ergm and
simulate still work with a warning, and they may be removed
later.)
o The data structure returned by simulate is now a list of
networks with attr-style attributes describing how it was
generated. The list has print and summary methods, and it can
be used in the left-hand side of a summary formula.
o Matrices of sample statistics returned by ergm are mcmc objects
(or mcmc.list objects, for parallel computing).
o Arguments theta have been renamed to coef. Arguments meanstats
have been renamed to target.stats. Many control parameters have
also been renamed and reorganized. (Old parameters still work
with a warning, and they may be removed later.)
o A number of arguments to control.ergm, control.simulate, and
others, have been renamed.
o ergm now uses bridge sampling evaluate the log-likelihood by
default. (Before, the default was to not evaluate it.)
o mcmc.diagnostics has been rewritten:
• Raftery-Lewis diagnostic has been replaced with several
others, including tests of (non)convergence.
• For fits with missing data, diagnostics for both the
constrained and the unconstrained sample are printed and
plotted.
• Plots now use lattice graphics, if available.
o Handling of networks with many edges has been improved
somewhat.
o gof.ergm and gof.formula now set the statistics used to
diagnose the fit adaptively, depending on the directedness of
the network being modeled.
DEPRECATED & DEFUNCT
o The following control parameters have been removed or renamed:
maxedges, prop.weights, prop.args, packagename, summarizestats,
nr.maxit, nr.reltol, maxNumDyadTypes, steplength, initialfit,
style, obs.MCMCsamplesize, obs.interval, obs.burnin, compress,
metric, force.mcmc, adaptive.trustregion, adaptive.epsilon,
mcmc.precision, method, MPLEtype, check.degeneracy,
maxMPLEsamplesize, MPLEsamplesize, phase1_n, nsubphases,
RobMon.phase1n_base, RobMon.phase2n_base, RobMon.phase2sub,
RobMon.init_gain, RobMon.phase3n, trustregion, stepMCMCsize,
steppingmaxit, gridsize, sequential, returnMCMCstats,
calc.mcmc.se, hessian, prop.weights, prop.args, and
packagenames.
o The following arguments to functions have been moved to the
corresponding control functions, removed or renamed: burnin,
MCMCsamplesize, interval, maxit, seed, and theta0.
BUG FIXES
o Fixed some errors in log-likelihood calculation, especially in
models with missing data and/or offset terms.
o Parallel processing has been made more robust. In particular,
ergm now checks to make sure that the version it finds on slave
nodes is the same as the version on the master. Also, although
ergm will start its own cluster as needed, it will also detect
if an MPI cluster has already been started and use that.
o Several bugs relating to handling models with with offset terms
have been fixed.
o The bounded degree (bd) ERGM would sometimes tabulate degrees
incorrectly. This has been fixed.
o Miscellaneous robustification and bug fixes.
Changes in version 2.4 (2011-05-27)
NEW FEATURES
o The “news” feature has been implemented. Type
news(package="ergm") to see the version's updates.
o A function ergm.allstats was added to calculate all possible
network statistics for a given ERGM and network. The number of
possible networks grows on the order of 2^{n^2}, so this should
only be used for small networks. Related function ergm.exact
calculates exact log-likelihood for a particular canonical
parameter and a particular ergm.
o A cutoff argument has been added to specify maximum shared
partner count or degree to be evaluated to the following model
terms: gwb1degree, gwb2degree, gwdegree, gwdsp, gwesp,
gwidegree, gwnsp, gwodegree. This significantly speeds up
fitting curved ERGMs on large, sparse networks.
o The logLik method for ergm objects, with the attendant AIC and
BIC methods, has been implemented.
o Calculation of loglikelihoods for MCMC-based ergm fits has been
reengineered to use bridge sampling for dyad-dependent models.
(See logLik.ergm, ergm.bridge.llr, and
ergm.bridge.dindstart.llk.)
o A generic function is.dyad.independent to test whether an ERGM
fit or formula is dyad-independent has been added.
o A generic function fix.curved to convert curved exponential
family models to variants in which the curved parameters are
fixed has been added. See the function documentation for usage
scenarios.
o A generic function enformulate function to work around a
current limitation in the ergm function to substitute curved
parameters from a model fit into the model formula, allowing
them to be used as initial values (the theta0 argument). See
the function documentation for usage scenarios.
o The following new models terms have been added: degcrossprod
and degcor.
o Tests for change statistics have been added.
o A new dataset has been added: kapferer, the well-known tailor
shop network dataset of Kapferer (1972).
OTHER USER-VISIBLE CHANGES
o The package has been “standardized” to represent directed ties
as (tail,head).
BUG FIXES
o Log-likelihood calculation for dyad-dependent models has been
fixed.
o Some errors in estimating parameters in curved exponential
family models have been fixed.
o gof now automatically selects the right goodness-of-fit
statistics for the network type (directed vs. undirected)
given.
o Bug in is.inCH in 2.4-2 fixed in 2.4-3.
DEPRECATED & DEFUNCT
o as.directed function has been removed.
o All model terms included in the package have been reimplemented
using the new InitErgmTerm framework.