| NEWS | R Documentation |
NEWS file for the ergm package
Changes in version 4.10.1
NEW FEATURES
-
gof'sGOF=formula can now contain anyergm()statistics in addition to the special ones. -
Passing
NaNrather thanNAas 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
-
Documentation link and typo fixes.
-
Fixes to MPLE Hessian calculation.
-
Fixed an initialization error in the experimental
~. -
Printing of user-provided initial parameters is now more clear.
-
requireNamespace()calls are no longer passedwarn.conflicts=arguments. -
Dynamic HTML term index generation now avoids creating tags with repeated HTML
ids.
OTHER USER-VISIBLE CHANGES
-
Sum()now uses a sparse matrix representation fr its weight matrix. -
gofshould now run significantly faster by making use of thes_-only statistics.
C-LEVEL FACILITIES
-
A vestigial element,
int status;, has been removed from*MHProposalstructures. -
ABI version has been increased.
-
All header files (including those with static inline functions and macros) should now compile under C++.
-
The default ABI mismatch action is now to warn the user once per session.
-
A statistic may now implement
s_(summary) functions without implementingc_andd_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
NEW FEATURES
-
S(),Symmetrize(), andFor()operators now work for valued networks. -
An experimental valued operator,
(EXPR ~ TERMS), can evaluateTERMSafter transforming them according toEXPR, Currently, onlysqrtis implemented. -
New function,
control.ergm3()can be used as acontrol=argument toergm()to emulate pre-4.0 behavior as much as possible. At this time, it setsMCMLE.termination = "Hummel"andMCMLE.effectiveSize = NULL, disabling adaptive MCMC. -
There is now a
ergmAuxiliarydocumentation type, and.spcache.net()has been documented. -
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
-
HTML termalike index links to packages outside of ergm have been fixed.
-
gwdegree(0, fixed = TRUE)and others in its family no longer produceNaNs and do not cause errors when the network has no isolates of the corresponding type. Thanks to Kevin Reuning (@reuning) for the bug report. -
Confidence-based convergence testing is now more robust.
-
Printing and summarization of
network.lists is now more accurate, particularly when they are generated bysimulate(..., simplify = FALSE). -
predict.formula()now takes thebasis=argument.
OTHER USER-VISIBLE CHANGES
-
Documentation improvements, particularly in valued terms and the Terms API vignette.
-
Warning about loops in networks can now be disabled by setting
options(ergm.warn_loops = FALSE). -
cycle()is now more efficient with respect to memory management. -
gof.formula()has been substantially speeded up. -
triangle(attr, diff, levels)withdiff = FALSEand non-nulllevels=now behaves consistently withnodematch()with the same corresponding arguments. -
Passing
nsim=tosan()is now an error. -
In
predict.formula(), thetheta=argument has been rename toeta=, since canonical parameters are expected.
C-LEVEL FACILITIES
-
Many parallel implementations for binary and valued ERGMs, both C and header files, have been merged.
-
_GET_OVERRIDE*()family of macros are now in their own header file ‘ergm_variadic_macros.h’. -
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. -
Some vestigial elements from the
Networkdata structure have been removed. This necessitate an ABI version change. -
*NetworkInitialize()have had their lasttoggle-related arguments removed; macro alchemy is used to maintain source compatibility for now; itsdirected_flagargument is now anRboolean. -
A number of vestigial functions have been removed.
Changes in version 4.8.1
NEW FEATURES
-
A new bipartite term operator
Project(), with aliasesProj1()andProj2(), evaluating the statistics on an undirected valued network of counts constructed by projecting the bipartite network onto one of its modes. -
A new family of terms,
nodecovrange(),nodeocovrange(),nodeicovrange(),b1covrange(), andb2covrange(), 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!) -
A new family of terms,
nodefactordistinct(),nodeofactordistinct(),nodeifactordistinct(),b1factordistinct(), andb2factordistinct(), 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!) -
The
fixallbut()now supports anrlebdm(in addition to an edge list matrix and anetwork) for its argument.
BUG FIXES
-
Fix in stochastic approximation code for compatibility with most recent coda.
-
In
ergm(), a bug in initialization of MH proposals for constrained sampling requesting auxiliaries has been fixed. -
A memory error in the
ergm.eta()family of functions triggered when the length of the curved parameter is 0 has been fixed. -
Fixed calculation of
b1degree(),b2degree(),b1degrange()andb2degrange()when degrees of interest include 0. Their coefficient names have been changed to be more consistent with other terms. -
Calculation of the effective number of observations, i.e.,
nobs.ergm(), is no longer affected by the estimation method. -
The
B()operator withform="nonzero"was miscalculating change statistics when given multiple toggles in a sequence. -
Some instances of memory leaks, warnings, and undefined behavior have been fixed.
-
Some dataset links that were broken have been fixed.
OTHER USER-VISIBLE CHANGES
-
Precision of geometrically weighted statistics (degrees and shared partners) has been improved, particularly for large decay parameters.
-
Dynamic term documentation is now more robust to extension developer error.
-
A new
as.rle()method forrlebdmobjects to cast it back to anrle. -
*degreepopularityandhammingmix()terms andoffset.info.formula()function have been removed from the package. -
In the terms API, the auxiliaries specification can now be a
term_listrather than a formula. -
ergm.pl()no longer takes the defunctdummyargument.
C-LEVEL FACILITIES
-
Degree-conditioned proposals are now exported in ‘inst/include/’.
-
The M-H proposal API now makes lengths of input vectors available to the proposals, paralleling the change statistics API.
-
The
DyadGenAPI 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 aDyadGenis initialized. This can be used to set up groups of non-overlappingDyadGens. -
‘ergm_khash.h’ API now provides a
kh_put_codeenumeration type forkh_put()'s optional return status value. -
Packages
LinkingToergm 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 settingoptions(ergm.ABI.action=); seeoptions?ergmfor details.
Changes in version 4.7.5
NEW FEATURES
-
A new hint
triadicand associated proposalSPDyadshave 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 withsparse). -
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. -
Constraint
fixedas()now hasfixed.dyads=as its first argument, and ifpresent=orabsent=is passed explicitly, it will check that the LHS network conforms before proceeding. -
In
ergm()and related, MPLE existence check can now be disabled by passingMPLE.check=FALSEtocontrol.ergm(). Auxiliary calls to MPLE do so by default. -
A number of improvements to
ergm.allstats()andergm.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.
-
ergm.godfather()now takes abasis=argument likeergm(),simulate.ergm(), and others. Its term options can be passed directly as well.
BUG FIXES
-
COLLAPSE_SMALLESTwas selecting incorrect categories under some circumstances. -
blockdiagconstraint initialization now detects when blocks are non-contiguous and stops with an error. (Previously, it would behave in undefined ways.) -
Sumoperator now handlesI()label specifications correctly; this also fixes an error in theProdterm. -
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).
-
In
control.ergm(),MCMC.prop=is now passed through toSAN.prop=. -
A bug in the auxiliary reuse code has been fixed.
-
A bug in
simulate.ergm()triggered by a combination of a proposal using an auxiliary andmonitor=argument being passed has been fixed. -
In proposal help, listing of proposal table entries works again.
-
nodemix()now uses correct parameter names. -
Godambe information for the MPLE now works if the model has an offset. (Thanks, Cornelius Fritz for reporting and Michał Bojanowski for fixing.)
-
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.
-
edgecov()anddyadcov()now handlenetwork-format input correctly. -
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.
-
MCMC diagnostics for non-confidence convergence criteria no longer rely on
$target.statsbeing part of the ergm object. -
Likelihood calculation is now robust to dropped parameters and parameters fixed at infinity.
-
Label()operator now documents its behavior when the model is curved more clearly. -
Invalid
levels2specification formm()no longer causes memory errors. -
Valued proposal updater function was not being passed the current edge state.
-
Undefined behavior warnings flagged by CRAN's
clang-asanhave been fixed.
OTHER USER-VISIBLE CHANGES
-
A number of utilities, including
sginvandxTAx_seigenhave been moved to statnet.common. -
LARGEST,SMALLEST, andCOLLAPSE_SMALLESTnow break ties lexicographically with a warning. -
absdiffcatis now more memory-efficient during initialization. -
MCMLE estimation code for missing data MLE with high missingness fraction is more robust.
-
Verbose output in Hummel step length calculation code is now more concise.
-
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.
-
is.dyad.independent.ergm_model()now takes an additional argument whether auxiliaries “count”.wrap.ergm_model()detects this from itsnamewrap=argument. -
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. -
Improvements to the
ergmProposaldocumentation. -
ergm_Init_stop(),ergm_Init_warning(), andergm_Init_message()that behave more like their base counterparts have been added to the API.ergm_Init_abort(),ergm_Init_warn(), andergm_Init_info()will eventually change to use their rlang semantics. -
edgecov()anddyadcov()now check that their covariate matrix has the correct dimension. -
Constraints
fixedas()andfixallbut()now warn when given a network whose size does not match the LHS network's. -
Nodal attribute specification documentation (
?nodal_attributes?) now includes an example for specifyinglevels2=levels by value. -
Miscellaneous documentation fixes.
-
param_names()API now allows assignment, and its method forergm_modelobjects is more explicit about whether canonical or curved parameters are being modified and when. -
ergm_model()constructor is now generic, with methods forformula,term_list, andergm_model. -
is.dyad.independent()can now return dyadic-independence information for each term. -
control.ergm.godfather()has been deprecated, since it is no longer used to pass term options. -
R documentation macros
\ergmTerm,\ergmConstraint,\ergmReference,\ergmHint, and\ergmProposal. -
Some improvements to the Terms API (see Vignette), particularly in handling of dyadic dependence and auxiliaries.
-
Documentation improvements to extended state and network callback APIs.
-
The main ERGM vignette is now in HTML.
C-LEVEL FACILITIES
-
The
khashC API now uses anenumtype for insertion status. -
The dyad hash edgelist API has been improved, in particular with guarding against double-insertions and using
UnsrtELToHashELto turn an unsorted edgelist into a hash edgelist. Dyad generator API “upgrades” it after several show searches. -
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.
-
HashELInitialize()function no longer takes thedirectedargument. Instead, it expects that any dyads passed to it be appropriately sorted. -
Calls to
Calloc(),Realloc(), andFree()have been replaced with theirR_-prefixed counterparts. -
khashno longer allows allocators to be specified via macros; they are now hardcoded to use those from R. -
Non-API
SET_TYPEOF()is no longer used. -
UnsrtELandHashELnow have, respectively,UnsrtELSize()andHashELSize()methods to query their current numbers of edges stored. This should allow seamless changes to their internal representations. -
The
kvecmacro library (from https://github.com/attractivechaos/klib/) 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.) -
RLEBDM1DC API now exportsFirstRLEBDM1D()andLastRLEBDM1D()macros, providing dyad indices of the first and the last dyad in the RLEBDM, respectively. -
ChangeStats()function has been split intoChangeStatsDo()andChangeStatsUndo(), the latter only called on rejection, which speeds up MCMC and SAN when the proposal has multiple toggles. -
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
NEW FEATURES
-
edgesconstraint can now be combined with arbitrary dyadic constraints.
BUG FIXES
-
Syntactic fixes in documentation.
-
The bounded degree support in the dyad noise proposal (see
dyadnoise-ergmConstraint) has been fixed. -
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
edgeswith some dyadic constraint). (Thanks to Benjamin Rosche (Cornell University) for the bug report.) -
A number of potential errors and vulnerabilities in C code flagged by CRAN have been fixed.
-
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
-
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.
-
In
simulate.ergm()withobservational=TRUE, the basis (initial network) defaults toobject$network, notobject$newnetwork, since the latter often has missing edges and other metadata missing. -
Documentation for defunct functions (in
ergm-defunct) no longer includes function prototypes as they triggered CRAN warnings. -
Some changes to minimize matrix inversions and improve numerical stability.
C-LEVEL FACILITIES
-
New C macros to simplify initialization of the standard dyad generator and bounded degree sampler.
Changes in version 4.5.0
NEW FEATURES
-
as.network.numeric()no longer constructsn\times nmatrices in doing so, allowing it to scale to large, sparse networks. -
Additional arguments to
mcmc.diagnostic()are now passed to helper functions, including plotting functions, allowing better customization. (Thanks to Fabio A. Correa.) -
Stochastic Approximation MLE method now uses adaptive subphase lengths from Snijders (2002). (Thanks Arya Karami.)
-
ergm can now use networkLite's
networkLiteobjects in place of fullnetworkobjects. -
MPLE estimation can now provide improved standard errors via bootstrap or Godambe estimation. (Thanks to Christian Schmid.)
BUG FIXES
-
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. -
Fixes in final likelihood calculation when
basis=argument is passed to theergm()call. -
“Confidence” stopping criterion is now more robust to scale of sufficient statistics.
-
Better handling of invalid inputs in
predict.ergm(). -
bd()now checks validity of its arguments and appropriateness for the network being modeled.
OTHER USER-VISIBLE CHANGES
-
Optimizations to various directed shared partner calculations.
-
gw*sp()anddgw*sp()terms are now just aliases of each other. -
In
dgw*sp()terms,cutoff=argument is not meaningful whenfixed==TRUEand produces a warning. -
ergm.pl()'s API has changed (though the old calling convention is still supported for now). -
Some control parameters for Stochastic Approximation have been renamed, removed, or better documented.
-
Some improvements in term name formatting.
-
Documentation improvements for some terms.
C-LEVEL FACILITIES
-
Some helper functions for printing vectors and matrices in
ergm_util.chave been improved.
Changes in version 4.4.0
NEW FEATURES
-
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. -
ergm(),san.formula(),ergmMPLE(),gof.ergm(),gof.formula(),logLik.ergm(),.simulate_formula.network(), andsimulate.ergm()now check if any of the...arguments are unusued and issues a warning. -
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.-
ergmobjects no longer include$constrainedand$constrained.obselements 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$infoelement. -
ergm()now takes anewnetwork=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()'sMCMC.return.stats=now controls the maximum number of iterations to be stored in$sampleand$sample.obsfor diagnostics; actual MCMC samples are thinned to at most that length.mcmc.diagnostics()code prints the information from the full and the thinned samples.
-
-
is.dyad.independent.ergm()can now answer based on terms, sample space, or both. -
is.na(ergm)andanyNA(ergm)methods can now be used to test if an ERGM was fit a missing data or observational process. -
mcmc.diagnostics()now has acompact=argument, to optionally abbreviate statistic and/or parameter names for more compact display.
BUG FIXES
-
control.ergm()'s handling of consistency check between step length and termination method hs been fixed. -
Some improvements to tests; in particular, a formerly stochastically erring test is now deterministic.
OTHER USER-VISIBLE CHANGES
-
In the
simulate(), passingtheta0=is now an error.
Changes in version 4.3.2
BUG FIXES
-
ergm_edgecov_args()helper function now formats the network attribute names without the quotes. -
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.
-
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
NEW FEATURES
-
New functions
search.ergmHints()andsearch.ergmReferences()can now be used to search availableergmHintsandergmReferences, respectively. -
A new
For()term operator to construct a list of terms with some varying parameter. -
Term API vignette is now more complete, and includes all API elements, not just the post-4.0 ones.
-
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.
-
ergm()can now take a formula with an arbitrary LHS, providedbasis=argument is supplied and is a network.
BUG FIXES
-
In C, prototypes of functions with no arguments now use the
(void)placeholder. -
gof(..., GOF=~... - model)now correctly removes the model from the set of goodness-of-fit terms. -
Fixes to
plot.gof()for bipartite networks. -
Fixes to
plot.gof()for dense networks. -
Package manual now passes
tidyHTML tests. (Thanks to Elin Waring for suggesting a workaround.) -
The default description for the
attr=term argument is now more accurate.
OTHER USER-VISIBLE CHANGES
-
Constraints and model construction code now uses the
term_listAPI from statnet.common 4.7 and avoid formula manipulation, making it more robust to formulas with varying environments. -
%ergmlhs%constraints are now inherited by default, unless theconstraints=formula includes a-.(minus dot) term. The former behaviour was to inherit only ifconstraints=argument had a.. -
Some constraints' implementations are now much more memory-efficient.
-
Improvements to the API documentation in the Terms API vignette.
-
The Stepping estimation method has been removed, since all of its improvements have been incorporated into MCMLE.
-
The Robbins-Monro estimation algorithm has been removed, since it is currently broken and everything it does Stochastic Approximation does better.
-
Function
is.inCH()has been removed, having been deprecated in favour ofshrink_to_CH(). -
san.ergm()has been removed, having been deprecated for having no known use case. -
Improvements to
blockdiag()constraint,gw*sp(), and other documentation. -
An
Init*ErgmTerm.*function can now return anergm_model, in which case its terms will be “pasted” into the model. -
Documentation for
san()algorithm is now much more detailed. -
Some improvements to the
BDStratTNTproposals.
C-LEVEL FACILITIES
-
Some useful dynamic node and edge list data structures added and exported.
INSTALLATION
-
Packages tergm, networkDynamic, and latentnet are no longer Suggested to simplify testing.
Changes in version 4.2.3
NEW FEATURES
-
In terms
edgecov()anddyadcov(), the argument can now be a network.
BUG FIXES
-
Fixes to estimation for valued ERGMs with missing data.
-
Retrying and other robustification to lpSolve-based step length calculation has been added back.
-
Typo fixed in a rarely used storage API macro.
-
check.ErgmTerm()no longer fails when a term has argument names that coincide with certain Rbasefunctions. -
Bridge sampling now disables the density guard (as some briges may result in much denser networks than observed).
-
Syntactic fixes to documentation.
-
anova.ergm()now correctly labels its tables as analysis of deviance; passing invalid inputs (e.g., non-ergmobjects) now produces an informative error message.
OTHER USER-VISIBLE CHANGES
-
Miscellaneous documentation improvements.
-
ergm_egecov_args()helper function can now handle network class input. -
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.
-
.simulate_formula.network()is now exported explicitly. This means that extension packages overriding thesimulate_formulamethod fornetworkobjects can call it directly. -
In
ergm(), the LHS no longer needs to be a network object, as long asbasis=is provided. -
anova.ergm()documentation no longer discusses test statistics (which were never implemented in the first place).
INSTALLATION
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
NEW FEATURES
-
More
ergmKeywords have been added for dyadic and triadic covariates, and terms have been tagged appropriately.
BUG FIXES
-
Robustification of step length calculation, documentation processing, numerical optimization, and elsewhere.
-
Minor documentation and vignettes fixes and clarifications.
INSTALLATION
-
Package ergm.userterms for implementing custom ERGM terms is no longer maintained on CRAN and is instead maintained on GitHub at https://github.com/statnet/ergm.userterms. It is no longer listed as a Suggested package.
Changes in version 4.2.1
NEW FEATURES
-
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, andTNT-ergmProposal, which can be invoked withergmTerm?edgesetc.. Visible terms are dynamically indexed inergmTerm,ergmConstraint,ergmHint,ergmReference, andergmProposal. (Joyce Cheng) -
Indexing can be done by keyword (using R's concepts), whose meanings can be looked up in
ergmKeyword. Terms cane be searched viasearch.ergmTerms,search.ergmConstraints, etc.. (Joyce Cheng) -
Term
nodemixcan now be passed alevels2argument that is afactororcharacterand optionally a matrix, allowing multiple cells to be mapped to the same statistic. (Joyce Cheng) -
An API has been added for caching state information on worker nodes; in particular, when making repeated calls to MCMC sampling,
ergm_modelandergm_proposalobjects 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
-
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.
-
Dyadsconstraint now detects if any of the terms passed to it are dyad-dependent and stops with an error. -
fixallbutconstraint now works for matrix input. -
The
"confidence"convergence criterion is now more robust to nonidentifiable models. -
edgecovanddyadcovnow detect and stop with an error when the specified network attribute is not found. -
Bugfixes in
gofhandling of bipartite networks. (Michal Bojanowski) -
as.matrixis called in a number of places whereas.matrix.networkwas called directly. -
gof.ergmnow handles missing data networks more or less correctly again. -
Log-likelihood calculation for missing data has been partially rewritten. This fixes some corner cases, as well improve speed and memory efficiency.
-
Miscellaneous documentation fixes and improvements. (regular contributors, and Fabio A. Correa and Jiahao Wang)
OTHER USER-VISIBLE CHANGES
-
Almost all tests now use the
testthat3 framework. (Joyce Cheng and Chad Klumb) -
ergm_GWDECAYcurved ERGM pattern is now exported. -
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. -
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.
Hummel (2012) step length calculation now uses an improved algorithm (Krivitsky, Kuvelkar, and Hunter 2022) and uses Rglpk where available for better performance.
is.inCHand theSteppingalgorithms have been deprecated (the latter in favour ofMCMLE).-
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.
-
approx.hotelling.diff.testwithvar.equal=TRUEnow uses a pooled estimate of autocovariance, sospectrum0.mvaris only called once. -
MPLE estimation now returns the Hessian as well. (Previously, it was only MCMC-based methods that did.)
-
ergmMPLEno longer has thefitmodel=argument. -
ergmMPLEwith output types other than"fit"now attach eta map information as an attribute. -
ERGM MPLE calculation no longer returns
$glmand$glm.nullelements, instead returning$mple.likand$mple.null.lik. -
ergm_model()no longer sets an element$coef.names, andoffset()decorator is set on each term'scoef.names. -
In
summary.ergm()output,$coefsis no longer returned. -
check.ErgmTerm()helper function can now also capture the expressions resulting in term arguments. This incidentally fixes a regression in statistic naming ofedgecov()anddyadcov()effects. -
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. -
Term
hamming-ergmConstraintimplementation is broken and has been disabled pending a fix. -
Messages about inconsistent arguments for geometrically weighted terms are now a bit more consistent, as is their documentation.
PACKAGE INSTALLATION
-
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
NEW FEATURES
-
F()operator's filter formula can now be a simple logical or comparison expression. -
Passthrough()operator now takes an optional boolean label= argument, which controls whether Passthrough~ will be prepended to the coefficient name; it defaults toTRUEfor backwards compatibility, though this may change in the future.
BUG FIXES
-
In
summary.ergm()output, the$coefficientselement is now a matrix rather than a dataframe. This fixes some issues with duplicate term names.$coefsis no longer returned. -
check.ErgmTerm()no longer skips argument type check if the passed argument isNULL. For backwards compatibility, the check is skipped if the argument is optional and the default value isNULL. A constantERGM_VATTR_SPEC_NULLhas been added for whenNULLis a valid (but not default) input for nodal attribute specification. -
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.) -
Documentation corrections, fixes, and clean-ups.
-
A number of memory leaks have been fixed.
OTHER USER-VISIBLE CHANGES
-
Miscellaneous improvements to the
BDStrat*family of proposals. -
In adaptive MCMC, burn-in detection now fits an exponential decay rather than a broken stick model.
Changes in version 4.0.1
BUG FIXES
-
Fixes to extended state API propagation in
Passthroughterm. -
Fixes to the handling, particularly of curved terms and offsets, in the
Sum()andOffset()operators. -
Minor fixes and improvements to some terms' C implementations.
OTHER USER-VISIBLE CHANGES
-
Per request of the sna maintainer,
symmetrize()generic and methods have been renamed toergm_symmetrize. -
Metadata set by
%ergmlhs%is now pretty-printed.
C-LEVEL FACILITIES
-
In the C API, the
ToggleKnownEdge(), function now ensures that tail < head for undirected networks.
Changes in version 4.0.0
NEW FEATURES
-
Terms, such as
nodecov, that take matrix-valued functions of nodal attributes now generate coefficient names from the matrix column names more sensibly. -
The
levels2argument in termsmmandnodemixnow accepts an argument in the form of a logical mixing matrix, selecting which mixing matrix cells should be included. -
ergmMPLE()now has anexpand.bipartite=argument, which, foroutput='array', controls whether bipartite networks' adjacency matrices are represented as rectangular or as square. Other behaviors underoutput='array'have also been made more consistent. -
In
goffunctions, bipartite networks now have their own goodness-of-fit statistics,b1degreeandb2degree. -
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 anmmformula. -
nodal_attributesdocumentation and vignette now have more examples. -
Nonidentifiability detection code now checks for nonvarying statistics first and handles them appropriately. See
control.ergmfor the parameters that control this handling. -
Control lists can now be specified as plain lists with sublists allocated by argument name. Function
snctrlcan provide completion in base R, RStudio, and elsewhere. -
ERGM now checks for whether an MPLE exists and warns the user if not. (Thanks to Christian Schmidt (PSU).)
-
Arguments to
ergmterms 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. -
Curved ERGMs are no longer “second class citizens”. Curved parameters can now be passed via
coef=andinit=arguments rather than embedded in the formula. -
A new type of term, an operator is introduced, taking one or more
ergmformulas 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:TERM2andTERM1*TERM2),B()inary terms in valued ERGMs,Label(),F()ilter,Offset(),Symmetrize(),Sum(),S()ubgraph,Curve(),NodematchFilter(),Log(),Exp(),Prod(), and others. -
A new type of MPLE,
"logitreg", invoked when the model is curved. -
A new term,
attrcov, can cumulate statistics from multiple cells in the mixing matrix. -
Termes
transitivetiesandcyclicaltiesnow work for undirected networks (where they count undirected transitive ties). -
is.valuedis a family of methods for testing if a particular aspect of an ERGM is valued. -
Long MCMC, SAN, etc. runs can now be interrupted (i.e., with CTRL-C) even from inside the C code.
-
update.networkcan now update the network using a variety of inputs, including edgelists andergm_states. -
The MPLE initial method can now be used to estimate curved ERGMs without specifying the initial curved parameter. The
initialfit=InitErgmTermargument andas.initialfit=argument ofergmMPLEhave been removed. Similarly,fix.curvedandenformulate.curvedhave been deprecated and may be removed in a future release. -
A mechanism for specifying “observational constraints” (
obs.constraints) has been added toergm, 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
dyadnoiseor observed egocentrically with alters identified (Handcock and Gile, 2010) using theegocentricconstraint.An argument
observational=tosimulate.ergmcan specify whether the model or the observational constraint from theergmfit should be used. -
The user can now specify “hints” on a formula to
MCMC.prop=andobs.MCMC.prop=arguments passed tocontrol.ergmthat can allow the MCMC sampler to select an optimal proposal for the process.Currently, the available hints are
sparsestructure, implying that the network is sparse (the default), andstrat, implying that the dyads are grouped in blocks which should be subject to stratified sampling.This is documented in the Proposal Lookup API vignette.
-
ergmMPLEoutput types now include"dyadlist", which returns the same output as"matrix", but without compressing the duplicate rows. -
New constraint,
blockshas been implemented, allowing dyads for some combinations of a factor to be prohibited from toggling (i.e., fixed, or set as structural 0s). -
An MCMC proposal
BDStratTNThas been implemented, allowing for highly efficient MCMC sampling for some special cases of bounded degree and block-level stratification among the dyads. -
A number of model specification settings, including
constraints,obs.constraints, andresponsecan be attached to the network itself using the%ergmlhs%operator and are inherited by the respective arguments unless overridden. -
Terms
nodecovar,nodeocovar, and similar have been improved. (Termsnodesqrtcovarterms had been folded into the former.) -
sancan now take into account offsets (finite and infinite). -
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. -
Data structures for edgelists returned from MCMC, SAN, and Godfather are now allocated dynamically. This means that control parameters
*.init.maxedgesand*.max.maxegesare no longer useful and has been removed.MCMC.maxedges(forcontrol.ergmandcontrol.simulate.ergm) is retained (with an infinite default) to be used to short-circuit a sampler that has gone degenerate. -
The
"Stochastic-Approxmation"algorithm (a C-based implementation of Robbins-Monro) now fully supports curved ERGMs. -
The
control.ergmparameters for"Stochastic-Approximation"and"Robbins-Monro"have been reorganised. -
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_termsand related functions, andparallel.inherit.MT=argument ofcontrol.ergmand others. -
Controls for bridge sampling (i.e.,
control.ergm.bridge) can now be set separately for the constrained (missing data) sample. -
The standard argument
response=can now be arlang-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. -
Adaptive (effective size) sampling is now possible for the
simulate.ergmfamily of functions as well. -
control.simulate.ergmcontrol parameterMCMC.scalecan now be used to set the MCMC burn-in and interval relative to those of theergmfit. -
In
ergmformulas, theoffset()decorator now takes a second optional argument allowing only some of the parameters in the term to be fixed. -
ergmis now a bit more careful about saving formulas and environments, saving memory and disk space. -
An experimental lack-of-fit diagnostic
rank_test.ergmhas been added. -
The sna function
symmetrizeis made into a generic and a method fornetworkobjects is implemented. -
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_modeltakes an additional argumentextra.aux=, which can be used to request auxiliaries by other functions, such as proposals. -
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. -
Log-likelihood estimates and derived quantities (deviance, AIC, BIC) now also report their standard errors due to bridge sampling. Setting the
bridge.target.secontrol option tocontrol.logLik.ergmand/orcontrol.ergm.bridgewill continue sampling and accumulating samples until the estimated standard error due to bridge sampling falls below it. -
sanoutput now includes the sampled statistics of the network.
BUG FIXES
-
The package functions now work more reliably when loaded but not attached but rather invoked via
::. -
The
Dyadsoperator constraint now works correctly on undirected networks. -
Term initialization traceback printing has been robustified.
-
Term
nodeisqrtcovarnow initializes without error. (Thanks to Yu-Lun Chen (NYU) for reporting the issue.) -
The MPLE code has been robustified for some corner cases (e.g., a model with 0 free parameters).
-
Various fixes to
predict.ergm. (Thanks to Michal Bojanowski.) -
In
ddsp,dnsp,dgwdsp, anddgwnsp, the"RTP"(reciprocated transitive partners) implementation has been fixed. -
Term initialization error messages are now somewhat cleaner and more informative.
-
Miscellaneous documentation fixes and CRAN warning fixes.
OTHER USER-VISIBLE CHANGES
-
IMPORTANT: The
levels2=argument ofnodemixandmmterms now defaults to-1(i.e., exclude the first level combination). Old behaviour is available through theversionterm option. -
IMPORTANT: In curved terms such as
gwesp(withfixed=FALSE), the decay parameter in the term is now ignored; the initial decay parameter must be specified as a part ofcontrol.ergm(init=...). Note that because MPLE for curved ERGMs has been implemented, it is optional in the first place. -
summary_formulafamily of functions now dispatch based on thebasis=argument if present, with the formula being allowed to be one-sided. -
In
control.ergm, argumentsSAN.control=andloglik.control=have been shortened toSAN=andloglik=, respectively. -
Global ERGM options and ERGM term options are now properly documented in
options?ergm. -
The
hammingmixterm has been deprecaed. -
The convex hull testing now uses the
lpSolveAPI-packageand is faster and more robust as a result. (Thanks to Christian Schmid (PSU).) -
enformulate.curvedfamily of functions has been deprecated. -
ergmfit$coefelement has been superseded byergmfit$coefficientsfor consistency withglmand others. The former still works, with a deprecation warning. Usingcoef(ergmfit)is recommended. -
Arguments to
ergm_MCMC_sampleandergm_MCMC_slavehave changed, and similarly for SAN and CD. -
Shared partner counts in
gw*spand*spterms are now cached, resulting in a significant speedup. This can be turned off with the term optioncache.sp. -
The term API now supports box constraints on parameters or coefficients, which may be set via
minparandmaxparelements in theInitErgmTerm's return list. -
In the valued ERGM API, the
responsesetting is now carried as an%ergmlhs%setting"response". -
Some likelihood metrics, particularly the Median one, should work better now.
-
In the
InitErgmConstraintAPI,free_dyadscan now be a function with 0 arguments, that is only evaluated if needed and is memoized (using the memoise package). -
control.ergmparameterMPLE.constraints.ignorecan be used to suppress calculations of complex RLEBDMs for large networks if the constraint is imposed in some other fashion. -
control.ergmobs.MCMC.*parameters can now be set relative to the unconstrained MCMC parameters viaobs.MCMC.mul. -
A variety of improvements and tuning parameters for the Hummel step length algorithm (
control.ergmparametersMCMLE.steplength.*). -
control.ergm's*.samplesizecan now be specified as a multiple of the number of free parameters in the model, via the*.samplesize.per_thetaparameter. -
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.ergmand other functons for the available tuning parameters. -
A number of defaults for control parameters have changed.
-
The
pending_update_network,ergm.Cprepare, and other APIs for moving between R and C have been replaced by theergm_stateAPI that uses the.Callinterface. -
simulate.ergmnow has not just theergm_modelmethods but alsoergm_statemethods. -
The
lasttoggleAPI 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.durationalfamily of methods has been removed. -
Information used by
print.summary.ergmto explain the type of fit is now set inergm. -
The
ergm_proposal_tableAPI 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. -
The
InitErgmConstraintandInitErgmReferenceAPI now has the same calling convention asInit*ErgmTerm, which enablescheck.ErgmTermto be used to preprocess and check their arguments. -
The
Init*Ergm*functions now receive an optional env= argument containing the environment of the formula from which they were called. -
The
InitErgmConstraintAPI now allows multiple nested constraints to be returned, to allow a proposal to address either a more general or a more specific one. -
The
do.sim=aregument to thesimulate.ergmfamily of functions has been deprecated in favor of a more consistentreturn.args=. -
Likelihood-change trust region (
trustregion) code has been removed.
C-LEVEL FACILITIES
-
Almost all of the R-C interface has been transition to use the
.Callrather than the.CAPI. Some helper functions are provided ininst/include/ergm_Rutils.h. -
Functions
ergm.eta,ergm.etagrad, andergm.etagradmulthave been reimplemented in C using the.Callinterface. They are available in the C API ininst/include/ergm_etamap.h. -
inst/include/ergm_changestat.handinst/include/ergm_wtchangestat.hnow provide more helpful helper macros. -
InitErgmTermandInitErgmProposalfunctions can now pass ainteger(as opposed to anumeric) vector to the C functions with anoutlist$iinputselement. -
A general API for setting callback functions that are called whenever a network changes is provided. See the Network Callback API vignette.
-
The discordance network API has been removed in favour of the storage API.
-
The
khashmacro library (from https://github.com/attractivechaos/klib/) has been incorporated into the package with some modifications and is available to use, in particular, forO(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. -
Additional helper APIs and data structures have been provided in
/inst/include/. -
A
DyadGenAPI implemented on the C side by/inst/include/ergm_dyadgen.hand on the R side byergm_dyadgen_selectautomatically selects sampling arbitrary dyads, sampling from an edgelist, or sampling from an RLEBDM. It obviates a number of other proposals, such asRLETNTandlistTNT. -
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
NEW FEATURES
-
ergmnow 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. -
It is now possible to limit the systematic sample size taken by
MPLEbefore resorting to the case-control likelihood using theMPLE.samplesizecontrol parameter (if initial fit is final) and by theinit.MPLE.samplesizecontrol parameter (if it is used only to initialize the MCMC-based estimation). -
A new “operator” constraint
Dyadstakesergmformulas and constrains dyads based on which dyads affect their change statistics. -
It is now possible to calculate model-predicted conditional and unconditional tie probabilities using
predict.ergmandpredict.formula. (Contributed by Michal Bojanowski.) -
The nodal attribute specification mechamism (i.e., the
attr=andlevels=arguments to terms) now includes a number of convenience functions and predicates, such asLARGESTandSMALLESTto select or exclude the most/least frequent levels, andCOLLAPSE_SMALLESTto collapse the smallest categories into one. -
ergmMPLEnow takes aconstraintsargument and handles it and missing dyads correctly. -
sannow has the ability to take offsets into account. -
mcmc.diagnostics.ergmnow takes an argumentwhich=to to specify which output is wanted. -
The following new model terms have been implemented:
-
b1dsp,b2dsp,gwb1dsp, andgwb1dsp, the bipartite versions ofdspandgwdsp. -
isolatededges, to count the number of edges that are in a single component.
-
-
A vignette for the nodal attributes UI has been added.
The
simulate.ergmfamily of functions'output=argument can no only takes a function through which the simulated networks are mapped before returning.-
The
cycleterm implementation has been greatly improved. -
ergmnow takes abasis=argument as others. -
plot.gofnow plots a blue rhombus to indicate the simulated mean.
BUG FIXES
-
A bug involving assumptions based on the first entry in the
lasttogglevector has been corrected. -
In
logLik.ergm, degrees of freedom no longer count offsets. -
The
Dyadtype used in C code is now at least 64 bits on all systems, fixing some issues around large networks. -
A bug that made
sanfail to terminate when it had hit its target stats exactly has been corrected. -
The
as.rlebdm.edgelistfunction now correctly handles the network size attribute attached to the edgelist. -
Fixed incorrect use of
MCMC.*control parameters insan. -
Fixed the documentation for the
objectargument toergm_proposal, and fixed a recursive default argument toergm_proposal.character. -
Added a workaround for a limitation of
coda::densityplot.mcmc.listwhen variable names are not unique, which caused a problem inmcmc.diagnosticspointed out by James Wells. -
The
levelsargument was removed fromstarmixterms, as it was not functioning correctly. -
A bug in
ergmMPLEfor bipartite networks has been fixed. -
Some fixes to
approx.hotelling.diff.test. -
Contrastive divergence runtime diagnostics now work correctly.
-
ergm.godfathernow handles undirected valued networks correctly. -
Per CRAN warning, none of the internal
glm-alike functions default todata=sys.parent()anymore. -
as.network.numericnow handles thebipargument consistently withnetwork.initialize. -
For bipartite terms,
NAs in nodal attributes are now tolerated if they are in the unused bipartition. -
ergm.bridgenow 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 bysummary.ergmless accurate.) -
ergmMPLEnow handles offsets corectly when returning matrix and array output. -
Miscellaneous fixes to
predict.ergmandergmMPLE, particularly in handling offsets. -
Miscellaneous vignette and documentation fixes.
OTHER USER-VISIBLE CHANGES
-
Datasets
fauxhighandfauxhigh.withnumericattributeshave been removed. -
Control parameters
*.Hummel.*have been renamed to*.steplength.*for consistency. -
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.
-
Formulas are no longer attached to
ergm_model,ergm_proposal,ergm_conlist, and others. -
The
simulatefamily of methods has been restructured. In particular, it is now possible to callsimulate()on anergm_modelobject without reinitializing it. -
A number of improvements have been made to the nodal attribute API. In particular,
ergm_get_vattrnow has anAsIsmethod that makes minimal changes to the input before returning,ergm_get_vattr.functionnow propagates its arguments to the function it calls, andergm_get_vattrnow accepts a"index"type argument representing vertex indices (a logical of appropriate length, or a nonnegative or nonpositive integer vector). -
Missing nodal attributes now generate an error in model initialization.
-
summary.ergmand its printing method have been cleaned up. -
A variety of miscellaneous optimizations, coleanups, and documentation improvements.
-
The
InitErgmTermAPI'scheck.ErgmTermnow acceptsNAor""for argument type, indicating that any type is accepted. -
In parallel computing, worker nodes now load packges
.libPathsof the manager node. -
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, andnewnw.extract. -
san.ergmhas been deprecated, since it lacks a known use case. -
The
simulate.formuladispatching mechanism has been rewritten to coexist with other pacakges that want to dispatch based on the LHS of the formula, particularlylme4. Thesimulate_formulaAPI still works, but it may be phased out in the future. -
ergm.bridgehas has been optimised to avoid repeated calls to model and proposal initialisation.
C-LEVEL FACILITIES
C export
ergm_constants.hnow exports the major and the minor version ofergm.
Changes in version 3.10.4
OTHER USER-VISIBLE CHANGES
-
Deprecated term argument warnings are now only printed once per session.
-
mcparallelantiwarnings are now printed less frequently.
BUG FIXES
-
ergmversion 3.10.1 inadvertently depended on R 3.6. The dependence has been reverted to 3.5.
Changes in version 3.10.1
NEW FEATURES
-
In all
gw*terms, thecutoff=argument can now be controlled by agw.cutoffterm option. -
nobsmethod has now been implemented forergmobjects. -
simulate.ergmnow takes abasis=argument (defaulting to NULL) that it passes to simulate.formula(). -
ergm.godfathernow takes an additionalchanges.only=argument, to return statistics relative to initial network. -
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.
-
fix.curvedandenformulate.curvednow handle thedgw*spterms. -
simulate.ergmand others now have anoutput=argument to provide finer control over the return format. It is to be preferred over thestatsonly=argument. -
A number of terms (see terms help) now use the new nodal attributes UI.
-
Hummel steplength search can now be run in parallel.
-
Terms
node*covandb*covcan now take multiple quantitative attributes or a function that returns a quantitative attribute matrix and produce a statistic for each. -
Terms
b1socialityandb2socialityhave been added. -
MCMLE estimation method can now checkpoint and resume optimization. See
control.ergm'sMCMLE.checkpoint=andMCMLE.resume=arguments. -
A variety of documentation expansions, cleanup, and other improvements.
BUG FIXES
-
The default method of
ergm.stopClusterhad not been exported. -
summary.ergmfixed for CD estimation. -
diffterm withsign.action="abs"no longer produces a warning on bipartite undirected networks. Thanks to Damien Georges for pointing out that this warning is unnecessary. -
More robust searching for initialization functions.
-
Some spurious warnings fixed.
-
ergmversion is now stored in the fitted object; this should produce sensible warnings when, say, trying to compute asummary.ergmon a object produced by an earlier version. -
Disambiguation help pages have been added for concepts (such as
edgesandhamming) that have multiple roles (such as as an ERGM term and as an ERGM sample space constraint), removing duplication of aliases. -
Miscellaneous term and example documentation fixes. (Thanks to Christian Loehle and others.)
OTHER USER-VISIBLE CHANGES
-
Low-level function
ergm_SAN_slavehas now been split out ofsanlikeergm_MCMC_slave. -
Lower-level
simulate.ergm_modelandsan.ergm_modelhave been split out ofsimulate.formulaandsan.formula. -
gof.ergmnow uses a longerMCMC.intervalby default. -
Parallel processing “API” now handles cluster starting and stopping more intelligently. In particular,
ergm.getClusternow 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. -
The vignette no longer tests egocentric code.
-
Failure to allocate memory in the C routines now produces sensible errors.
-
A semi-internal
pending_udpate_networkAPI can be used to carry around network information between.Ccalls without having to reconstruct the network. -
control.ergm'sinit.method=argument now overrides the candidate list when selecting initialization methods. -
network.updateis deprecated in favor of anupdate.networkmethod. -
standardize.networkhas been deprecated, rendered obsolite by improvements to thenetworkpackage method. -
simulate.ergmnow defaults to starting the simulation from the$newnetworkelement of the fit object. Thanks to Saeid Ghafouri for raising the issue and Sam Jenness, Steven Goodreau, and Martina Morris for suggesting a solution. -
simulatemethods now attach anattr(,"monitored")to the returned statistics, indicating which statistics were generated from themonitor=argument. -
pending_update_network“API” is more formalized now, including methods overriding those ofnetwork. -
control$init.methodnow overrides the candidate list when selecting initialization methods. -
The main vignette no longer contains egocentric inference code. Refer to the
ergm.egopackage. -
Improvements to
plot.goffor large networks. -
logLik.ergm(warn.dyads=)control parameter has been replaced byoptions(ergm.loglik.warn_dyads=)option. -
A number of previously deprecated functions are now defunct; a number of previously defunct functions have been removed.
SAN's documentation has been augmented with examples.
-
socialityterm's argumentsattrnameandlevelshave been deprecated. -
Most parallel calls are now a little bit more fault-tolerant, retrying on error.
-
Chad Klumb has been added as a contributor to the package.
C-LEVEL FACILITIES
Some changes to the Metropolis-Hastings proposal API.
Network initialization functions now return a pointer, and destroying functions free it.
-
Miscellaneous improvements to low-level C code. In particular, more of the code now runs deterministically.
-
Improvements to encapsulation of
Networkstructures.
Changes in version 3.9.4
NEW FEATURES
-
A new API allows arbitrary combinations of dyad-level sample space constraints.
-
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. -
More informative error messages for term initialization.
-
ergm.godfatherhas been reimplemented in theergmpackage, along with its valued counterpart. -
New terms have been added or improved:
-
mmfor a more flexible specification for mixing matrix and marginal effects; -
valued versions of
sender,receiver,socialityterms; -
inintervalnow allows interval openness to be specified as a character string.
-
A new
term.optionscontrol parameter allows additional arguments to be passed to term initializers.
BUG FIXES
-
A numerical instability in penalised pseudolikelihood calculation identified by Kevin Reuning has been fixed.
-
An error in runtime traceplotting for models with offset terms reported by Kevin Reuning has been fixed.
-
An error when trying to run the Robbins-Monro algorithm with parallel processing enabled, reported by George G. Vega Yon has been fixed.
-
A bug in the
meandegterm for directed networks has been fixed. -
Miscellaneous bugs in the
goffamily of functions have been fixed.
OTHER USER-VISIBLE CHANGES
-
The coefficient names associated with terms enclosed in
offset()are now also enclosed inoffset(). -
summarymethod forergmnow uses usesz-tests rather thant-tests, since there is no “dispersion” parameter. In addition, it no longer takes adigits=argument. -
Handling of missing relations has been improved.
-
Estimation progress when
verbose=TRUEis now a bit less verbose; useverbose=2and up to get more information. -
The default value of the
eval.loglik=argument toergmis now controlled byoptionsoptionergm.eval.loglik=. -
plot.network.ergmhas been deprecated. -
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.
-
summarymethod forergmnow exports a$coefficientselement (likesummary.lm) and$devtableis a proper table. -
New generics
nparamandparam_namescan be used to query the number and the names of the parameters in a model. -
ergm_model(replacingergm.getmodel) is now a full-fledged S3 class, representing initializedergmmodels. See its help for the major methods. In particular,ergm.getglobalstatshas been repalced withsummary.ergm_model. -
simulate.formulafunctions now take anergm_modelas an argument tomonitor=. -
Constraint initializers have been renamed from
InitConstrainttoInitErgmConstraint. The constraint implications table has been replaced withimpliesandimpliedbyconstraint lists. -
Proposal initializers have been renamed from
InitMHP(andInitWtMHP) toInitErgmProposal(andInitWtErgmProposal).ergm.MHP.tablehas been renamed toergm_proposal_table. -
Reference initializers have been renamed from
InitReferencetoInitErgmReference. Return format has also been changed, replacingergm.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 theto_ergm_Cdoublegeneric. -
ergm.getMCMCsampleandergm.mcmcslavehave been renamed toergm_MCMC_sampleandergm_MCMC_slaverespectively, and the arguments ofergm_MCMC_samplehave been made more user-friendly.
-
Changes in version 3.8.0
NEW FEATURES
-
Development of
ergmand associated packages is now hosted on GitHub. -
Some terms, particularly
dyadcovhave been improved.
BUG FIXES
-
Bug fixes to contrastive divergence code.
-
ddspanddnspterms now work correctly for 0 shared partners. (Thanks to Wouter Spekkink for reporting this bug.) -
Miscellaneous bug fixes, typo corrections, and robustifications.
OTHER USER-VISIBLE CHANGES
-
Terms
degreepopularity,idegreepopularity, andodegreepopularityhave been renamed todegree1.5,idegree1.5, andodegree1.5respectively. -
Progress reports for ERGM fits and simulations are now printed using
message, so they can be suppressed withsuppressMessages. -
A number of functions deprecated in 2015 have been removed. See
help('ergm-defunct')for the list.
Changes in version 3.7.1
BUG FIXES
-
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
NEW FEATURES
-
New term
diff, a directed analogue toabsdiffhas been added, allowing for different ways to handle differences in nodal attributes. -
By default,
gofnow 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
Terms
concurrent,degree,degrange, andconcurrentties“byarg” argument has been corrected to “by”.The bug in the Contrastive Divergence code that caused ERGM fits with
bdconstraint to hang has been fixed.Documentation for the curved ERGM terms has been clarified in a number of places.
Miscellaneous fixes and robustifications in the step-length code.
OTHER USER-VISIBLE CHANGES
-
The geometric decay parameter in
gw*spanddgw*spterms has been renamed fromalphatodecay, for consistency withgw*degreeterms. -
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
BUG FIXES
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.Vertex labels in the
sampsonandsamplikedatasets have been corrected. (Thanks to Dr. Linda Tan Siew Li for pointing this error out.)Use of the deprecated
unix.timehas been changed tosystem.time.Miscellaneous fixes to the documentation and robustifications.
Changes in version 3.6.0
NEW FEATURES
-
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, anddnsp) have been implemented. Seeergm-termsfor help. New terms (binary and valued)
b1covandb2covhave been implemented, analogous tonodecov,nodeicov, andnodeocovbut for bipatite networks.New valued terms
atleast,equalto, andsmallerthanhave been implemented. A number of terms that were binary-only before have been implemented for valued ERGMs.-
ergmpackage now works when loaded (e.g., usingrequireNamespace) but not attached (e.g., usinglibrary).
BUG FIXES
A number of implementation bugs in the valued ERGM terms have been fixed.
Parallel processing when using
ergm.usertermsand similar was accidentaly broken in the previous release.Calculation of Hummel et. al. (2010) steplength for missing data MLE was incorrect; a slower but more accurate algorithm is now used.
Miscellaneous bugfixes and robustifications.
gof.formulaand others now work with missing data.Miscelaneous cleanups and bug fixes.
OTHER USER-VISIBLE CHANGES
robust.inversehas been deprecated in favor ofginv.simulate.formulanow does parallel processing more efficiently.
Changes in version 3.5.1
NEW FEATURES
Added a new generic,
is.curvedthat tests if a given ERGM or model is curved.Block-diagonal sampler now handles bipartite networks.
Code for parallel calculation has been optimized to provide a bigger gain from multiple cores/processors/nodes.
Bridge sampling to evaluate the log-likelihood at the MLE now prints out a brief progress report by default.
BUG FIXES
MPLE is no longer used if the model is curved and target statistics are passed, as that caused problems.
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).
-
threepathhas been deprecated in favor ofthreetrailto more accurately reflect what is being computed. The "naive" log-likelihood ratio metric now handles offsets more robustly.
The null log-likelihood calculation prints messages instead of throwing warnings.
The closed-form solution (see Hummel et al., 2010) for the "lognormal" metric had been inadvertantly disabled. It has been reenabled.
Many documentation fixes and clarifications.
OTHER USER-VISIBLE CHANGES
Skye Bender-deMoll has been added as a contributor to the package.
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.
Some functions, particularly
ERRVL,append.rhs.formula,vectors.namesmatch,term.list.formula, andergm.update.formulahave been moved to thestatnet.commonpackage.The
as.edgelistfamily of functions have been moved to thenetworkpackage.-
mcmc.diagnostics.ergmnow takes theesteq=argument. IfTRUE, the diagnostics are performed on the simulated values of the estimating functions. IfFALSE, they are performed on simulated values of canonical statistics. This obviates and replaces the thecurved=argument. -
sanwhen used with curved models now requires canonical statistics as targets.
Changes in version 3.4
NEW FEATURES
Added message to notify when ergm MCMLE does not converge after max iterations.
Copied the combined Sampson monks dataset to ergm. See
?sampson.ergm simulation, bridge, and logLik functions now "inherit" the parallel setting from the ergm object and generally pass it along when possible.
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
ergmwithestimate="CD".
BUG FIXES
Fixed issue where constraints was not appropriately compared to older version
Fixed bug where the deviance of dyad-independence models was incorrectly computed/reported for all models
Removed
Rglpkpackage dependency; replaced it withlpSolvepackage dependency. See man page foris.inCHfor detailsFixed integer overflow bug in sample size reporting
Fixed bug in saving target.stats vector. Offset terms in target.stats output are now NA instead of the SAN network stats. (issue #1049)
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)
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)
Replaced the integer function abs() by floating point function fabs() in MHproposals_degree.c.
Various documentation corrections and fixes
OTHER USER-VISIBLE CHANGES
ergmwithestimate="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.CRAN-requested code structure changes (generally not visable to user):
-
requireandlibrarycalls changed torequireNamespaceand namespace prefixes added to calls from other packages, S3 methods explicitly registered in
NAMESPACE.-
packageDescriptionis 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 theNAMESPACEfile.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_deprecatedfor a list. If called, these functions will give a Deprecation warning and suggest an alternate function where appropriate.
-
Changes in version 3.2.4
NEW FEATURES
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".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).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 ofMCMLE.last.boostDefault values for a number of other control parameters have changed, see CHANGES below.
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
parallelpackage, direct dependence onsnowpackage is removedNew helper function
search.ergmTerms()function which through theergm.termshelp page and prints out a list of terms appropriate for the specified network's structural constraints, optionally restricting by additional categories and keyword matches.The estimated covariance matrix of the ergm estimate can be extracted using
vcovfunction.New EXPERIMENTAL Effective Sample Size (ESS) feature to adaptively determine MCMC length needed to get the specified effective size. Set
MCMC.effectiveSizeto non-NULL to enable this functionality; 50 is a reasonable value. Includes newergm.controlparameters-
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
-
SAN.control now includes an
MPLE.max.dyad.typesparameter which defaults to the value of the ergm.control parameter of the same name.-
Addition of the
StdNormalreference distribution. See?ergm.references New ergm terms:
-
b1mindegree, b2mindegreeMinimum degree for the designated mode in a bipartite network -
b1nodematch, b2nodematchNodal attribute-based homophily effect for the designated mode in a bipartite network.
-
-
Additional arguments added to the
network.updatefunction to control which attributes and properties are updated. -
new
esteqargument forsimulate.formulaandsimulate.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. New and expanded tests of the ergm functions for use with R CMD CHECK tools.
Addition of
is.durationalmethods 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 oftergmfunctionality.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.constraintsPotential speed/memory usage improvement: sampling algorithms in both R can C levels are optimized.
ergm now imports the
networkpackage via NAMESPACE to avoid internal namespace collisions when used withiGraph
CHANGES
-
MCMC control parameters changes in
control.ergmdefault for
MCMC.intervalincreased from 100 to 1000default for
MCMC.burninchanged from 10000 to mcmc.interval*16default for
MCMC.samplesizedecreased from 10000 to 1024
MCMLE control parameter changes in
control.ergma new control argument
MCMLE.terminationhas been added to specify the criterion used for terminating MCMLE estimation.a new
MCMLE.metricargument'logtaylor'has been addedcontrol parameter
MCMCLE.steplength.marginhas been addeddefault value for
MCMLE.MCMC.precisionhas been increased from 0.05 to 0.005default value for
MCMLE.steplengthhas been changed from 0.5 to 1
-
ergm.control parameter
SA.nsubphasesdefault changed from MCMLE.maxit to 4 -
control.gof parameter
MCMC.burnindefault increased from 1000 to 10000 -
similarly, the default for the
MCMC.burnincontrol parameter forcontrol.simulate,control.simulate.formulaandcontrol.simulate.formula.ergmincreased from 1000 to 10000
BUG FIXES
Networks where some statistics are at the lowest value, leading to some terms being -Inf, was not giving the correct estimated coefficients. Now fixed.
Bug fix in Penalized-likelihood MPLE estimation
Bug fix in MPLE estimation when ergm edgecov term has an attribute as a matrix.
Bug fix in ergm nodecov term when attributes are specified only for the second mode in a bipartite network
Various compatibility improvements to avoid warnings from R 3.1.2 and 3.1.3
control parameter
MPLE.max.dyad.typesis now passed tologLik.ergm()andergm.bridge.dindstart.llk(). fixes issue reported by Sebastian DazaFixed a fencepost bug in
ergm.bridge.dindstart.llk()'s construction of the offset coefficient vector in the dyad-independent submodel reported by Philip LeifeldAdjusted package initialization code to avoid throwing error reported by Philip Leifeld when ergm imported by another package instead of attached to workspace.
-
Fixed a bug with
ergm.plnot 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 Many other fixes...
DEPRECATED & DEFUNCT
The ergm control parameter
MCMLE.methodhas been deprecated. By default, ergm usestrust, and falls back tooptimwith Nelder-Mead method whentrustfails.The ergm control parameter
MCMLE.adaptive.epsilonhas been removed.The ergm control parameters
MCMC.burnin.retries,MCMC.burnin.check.lastandMCMC.burnin.check.alphahave been removed.-
MCMLE.adaptive.epsilonparameter has been removed The
faux.highdataset was removed as it was identical tofaux.mesa.high
OTHER USER-VISIBLE CHANGES
The "iterations" output in an ergm object now returns the number of MCMLE iterations taken by the estimation.
New help page for ergm MetropolisHastings Proposal methods.
Changes in version 3.1.3
BUG FIXES
An array bounds issue was fixed in the
Ccode. It has not affected any previous output.Some spurious convergence warnings are no longer printed by
summary.ergm.Bugs in the valued Uniform and Discrete Uniform Metropolis-Hastings proposals for missing dyads have been fixed.
Term
edgecovinvoked with the network attribute syntax now checks for the presence of the network attribute in question.
DEPRECATED & DEFUNCT
Calling
ergm, withestimate="MPLE"for a curved exponential family model (e.g.,gwespwithfixed=FALSE) is now an error. (Previously, it treated the curved term as fixed, which was misleading.)
Changes in version 3.1.2
NEW FEATURES
-
ergmMPLEcan now output an array of change scores associated with each dyad. See the help page for more details.
BUG FIXES
Some Metropolis-Hastings proposal functions would sometimes return incorrect acceptance probabilities when combined with the
bdconstraint. This has been fixed.In
simulate.ergmandsimulate.formula, some combinations ofcontrol$parallel,statsonly, andsequentialarguments would cause an error. This has been fixed. Note that the current implementation of parallel simulation whenstatsonly=FALSEorsequential=FALSEis very inefficient.A namespace bug in the likelihod calculation code, reported by Matthew Hoover, has been fixed.
MPLE for some degree-based constraints has been reenabled.
DEPRECATED & DEFUNCT
Argument
fitmodeltoergmMPLEhas been deprecated in favor ofoutput.
OTHER USER-VISIBLE CHANGES
Default
SAN.burnincontrol parameter has been increased to 100,000.
Changes in version 3.1.1
BUG FIXES
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).
-
sannow behaves sensibly when the network exceeds the number of edges allocated. -
degrangeterms now initialize correctly for their respective network types. Some spurious warnings are no longer printed.
A variety of minor errors has been fixed.
OTHER USER-VISIBLE CHANGES
-
ergm's implementation and tests now work withnetworkversion 1.8. (In particular,bipartite=0is now treated as a network with no actors.)
Changes in version 3.1
NEW FEATURES
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)-
ergmitself now includes rudimentary implementations for discrete uniform and continuous uniform reference measures. Seehelp('ergm-references'). A large number of ERGM terms for counts have been implemented and documented. See
help('ergm-terms').A number of new binary ERGM terms have been implemented as well. Particularly,
degrange,odegrange,idegrange,b1degrange, andb2degrange, which generalizedegreeandconcurrentby allowing the user to specify contiguous ranges of degree values.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.guardargument incontrol.ergmdocumentation 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.-
ergmnow 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,
logLikNullhas 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.
A new constraint,
blockdiaghas 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
The implementation of dynamic network models has been moved to a new package,
tergm.Sample space constraints
degrees,idegrees,odegrees,b1degrees,b2degreeshave been re-implemented or fixed.Certain functions are now only exported if they haven't already been defined (e.g., by
latentnet).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
-
ergmnow exports header and stub files for theLinkingTo:API, and packageergm.usertermsnow uses it. Please seeinst/include/READMEbefore using it, however.
DEPRECATED & DEFUNCT
Dynamic network modeling code has been moved to
tergmpackage.Function
statnet.edithas been removed.
BUG FIXES
Some bugs introduced by the developers relying on a certain behavior of the
.CAPI which had changed have been fixed.Some undocumented terms have been fixed and documented, including
odegreepopularity,idegreepopularity,degreepopularity, andsmalldiff.
Changes in version 3.0
NEW FEATURES
Facilities for fitting and simulating Separable Temporal ERGMs (STERGMs) of Krivitsky (2009) and, Krivitsky and Handcock (2010) have been added. See
stergmandsimulate.-
ergmMCMLE will now test if the optimization has converged to the MLE and stop if it detects convergence. -
ergmNow checks if a constraint specified in theconstraintsargument fixes any statistics in the model (e.g.,ergm(y~edges, constraints=~edges)). It issues a warning, and fixes their parameters at 0. -
simulatefunctions now take an argumentmonitor, a one-sided formula for additional statistics to be returned. This allows one to easily simulate from anergmorstergmfit statistics that were not in the fitted model. -
ergmcan now optionally detect when a burn-in is insufficient and retry it until it is sufficient. Seecontrol.ergmargumentMCMC.burnin.retriesfor details. -
ergmMCMLE now stores “history” of\thetaand simulated statistics. -
ergmextreme statistics detection (ifcontrol.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. An initial method
"zeros"has been, to use a vector of zeros as starting parameters.A number of new ERGM terms have been added.
OTHER USER-VISIBLE CHANGES
-
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 thecontrollists, generated bycontrol.ergmandcontrol.simulate, respectively. (Old arguments forergmandsimulatestill work with a warning, and they may be removed later.) The data structure returned by
simulateis now a list of networks withattr-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 asummaryformula.Matrices of sample statistics returned by
ergmaremcmcobjects (ormcmc.listobjects, for parallel computing).Arguments
thetahave been renamed tocoef. Argumentsmeanstatshave been renamed totarget.stats. Many control parameters have also been renamed and reorganized. (Old parameters still work with a warning, and they may be removed later.)A number of arguments to
control.ergm,control.simulate, and others, have been renamed.-
ergmnow uses bridge sampling evaluate the log-likelihood by default. (Before, the default was to not evaluate it.) -
mcmc.diagnosticshas 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
latticegraphics, if available.
Handling of networks with many edges has been improved somewhat.
-
gof.ergmandgof.formulanow set the statistics used to diagnose the fit adaptively, depending on the directedness of the network being modeled.
DEPRECATED & DEFUNCT
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, andpackagenames.The following arguments to functions have been moved to the corresponding control functions, removed or renamed:
burnin,MCMCsamplesize,interval,maxit,seed, andtheta0.
BUG FIXES
Fixed some errors in log-likelihood calculation, especially in models with missing data and/or offset terms.
Parallel processing has been made more robust. In particular,
ergmnow checks to make sure that the version it finds on slave nodes is the same as the version on the master. Also, althoughergmwill start its own cluster as needed, it will also detect if an MPI cluster has already been started and use that.Several bugs relating to handling models with with offset terms have been fixed.
The bounded degree (
bd) ERGM would sometimes tabulate degrees incorrectly. This has been fixed.Miscellaneous robustification and bug fixes.
Changes in version 2.4
NEW FEATURES
The “news” feature has been implemented. Type
news(package="ergm")to see the version's updates.A function
ergm.allstatswas added to calculate all possible network statistics for a given ERGM and network. The number of possible networks grows on the order of2^{n^2}, so this should only be used for small networks. Related functionergm.exactcalculates exact log-likelihood for a particular canonical parameter and a particular ergm.A
cutoffargument 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.The
logLikmethod forergmobjects, with the attendantAICandBICmethods, has been implemented.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, andergm.bridge.dindstart.llk.)A generic function
is.dyad.independentto test whether an ERGM fit or formula is dyad-independent has been added.A generic function
fix.curvedto convert curved exponential family models to variants in which the curved parameters are fixed has been added. See the function documentation for usage scenarios.A generic function
enformulatefunction to work around a current limitation in theergmfunction to substitute curved parameters from a model fit into the model formula, allowing them to be used as initial values (thetheta0argument). See the function documentation for usage scenarios.The following new models terms have been added:
degcrossprodanddegcor.Tests for change statistics have been added.
A new dataset has been added:
kapferer, the well-known tailor shop network dataset of Kapferer (1972).
OTHER USER-VISIBLE CHANGES
The package has been “standardized” to represent directed ties as
(tail,head).
BUG FIXES
Log-likelihood calculation for dyad-dependent models has been fixed.
Some errors in estimating parameters in curved exponential family models have been fixed.
-
gofnow automatically selects the right goodness-of-fit statistics for the network type (directed vs. undirected) given. Bug in is.inCH in 2.4-2 fixed in 2.4-3.
DEPRECATED & DEFUNCT
-
as.directedfunction has been removed. All model terms included in the package have been reimplemented using the new
InitErgmTermframework.