Skip to content

ergm

4.12.0Package record

Fit, Simulate and Diagnose Exponential-Family Models for Networks

29packages dependsuggested by 8
116.8Kdownloads / year
68.9%test coverage
7/13flavors OK

Overview

About

An integrated set of tools to analyze and simulate networks based on exponential-family random graph models (ERGMs). 'ergm' is a part of the Statnet suite of packages for network analysis. See Hunter, Handcock, Butts, Goodreau, and Morris (2008) doi:10.18637/jss.v024.i03 and Krivitsky, Hunter, Morris, and Klumb (2023) doi:10.18637/jss.v105.i06.

Changes in 4.12.0

NEW FEATURES

  • ergm() constraint now supports 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.
  • MCMC, CD, SAN, and MPLE sampling now produce cli progress bars.
  • ergm() (AsIs) operator can now handle character strings containing lists of terms.
  • 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

  • Some fixes to inadvertent partial matching and more uses of seq_len(n) instead of 1:n. (Thanks, Chung-hong Chan GitHub:@chainsawriot!)
  • esteq argument to the simulate.ergm() family of functions has been fixed.
  • Some typographical problems in the Nodal Attribute Specification in ERGM Terms vignette have been fixed.

OTHER USER-VISIBLE CHANGES

  • If an %ergmlhs% list is emptied out, it is now removed.
  • convert_ergmlhs() has been deprecated.
Show all changes in 4.12.0Hide the rest of the changes in 4.12.0
  • Verbose printing for variance-based adaptive MCMC no longer creates a wall of text.

C-LEVEL FACILITIES

  • The C++ shim edge ranges now have a size() method.

From inst/NEWS.Rd in the release

Install

Health

CRAN checks
1WARNING5NOTE7OK
Check messages
WARNINGwhether package can be installedr-patched-linux-x86_64
Found the following significant warnings:
  Rd warning: B-ergmTerm-1e2e5333.Rd:65: no hsearch.rds meta data for package ergm
See ‘/home/hornik/tmp/R.check/r-patched-gcc/Work/PKGS/ergm.Rcheck/00install.out’ for details.
* used C compiler: ‘gcc-16 (Debian 16.2.0-3) 16.2.0’
* used C++ compiler: ‘g++-16 (Debian 16.2.0-3) 16.2.0’
NOTER code for possible problemsr-devel-linux-x86_64-debian-clang, r-devel-linux-x86_64-debian-gcc, r-devel-linux-x86_64-fedora-clang, r-devel-linux-x86_64-fedora-gcc, r-devel-windows-x86_64
Found calls to structure() using deprecated special names:
  ergm/tests/testthat/test-update.network.R (.Dim: 2)
'.Dim' should be changed to 'dim'.

CRAN check page ↗

Slowest check: 15.9 min · r-oldrel-macos-x86_64
Status changes
  • WARNING7 OK, 5 NOTE, 1 WARNING2026-08-24
  • ERROR7 OK, 4 NOTE, 1 WARNING, 1 ERROR2026-08-23
  • WARNING12 OK, 1 WARNING2026-06-09
  • ERROR11 OK, 1 WARNING, 1 ERROR2026-06-08
  • WARNING10 OK, 3 NOTE, 1 WARNING2026-03-10
Advisories

none known

Documentation

In release 4.12.0
README· In the repository, left out of the releaseVignettesYes · 7 · dynamicNEWSYes · mentions 4.12.0Citation fileYes · cites a publicationWebsiteYes
Cites a JSS article
Help pages
297 (62 internal)includes a package overview page
Examples that run
68%26 run in a plain check · 7 only when donttest examples are enabled (R CMD check --as-cran) · 5 never run
Exported functions with examples
37%
Documented parameters
84%
Return-value docs
74%
Help pages citing references
15% with a bibliography file

Downloads

116.8K
CRAN downloads in the past year
Rank #1,177 · ~320/day · ~9.7K/mo
Daily download trend is not available in this view yet.
9K30 days
29K90 days
116.8K1 year
Compare downloads with other packages →
Also on1.3K r2u9 autocran9.2K conda_forge260 c2d4u

Repository

110Stars
44Forks
125Open issues
5Open PRs
0Releases
6,617Commits
28Commit identities
6,617 commits · Last activity 2026-10-20 · +0.9% stars, 30d · Default branch at 4.13.0-8251, ahead of CRAN 4.12.0 (checked 2026-10-21) · Discussions: 26 posts
Responsiveness
How these are sampled
PRs merged (all time)
68%
Median days to close, 50 most recently updated closed issues
22
Median days to close, 50 most recently updated closed PRs
2

Stars over time

2025-10-17 · 1032026-10-01 · 110
PracticesBeta

7 development-tooling and community-health practices detected across 4 families in the upstream repository

Checks run against github.com/statnet/ergm on 2026-10-21.

Continuous integration (2)
GitHub ActionsR CMD check workflow

The R CMD check workflow runs on Linux, macOS and Windows, and on R-devel

Coverage (1)
Coverage reporting (Codecov)
CRAN release process (1)
revdep/
Lint, format, editor (3)
Lint workflowVS CodeRStudio project
How this is detected·Detection ruleset v4 (2026-10-20)
AI coding toolsBeta

This repository shows signs of AI coding tools.

  • GitHub Copilotfirst seen 2025-10-24
    Seen in the repository: .github/workflows/copilot-setup-steps.yml
    Pull request: opened by its own account
    Commits: 3 by its own account · at least 3 crediting it in the message
Counts are commits, not lines of code. Commits by a tool's accounts count once across all of its accounts. Commits crediting it are the largest count among its credit lines, a minimum.How this is detected·Detection ruleset v4 (updated 2026-09-27)

Dependencies

Declared dependencies
27 external dependencies (excludes base and recommended)

Installing ergm adds 31 packages (19 with compiled code, 22 MB of source tarballs). Heaviest: stringi 11 MB, robustbase 2.2 MB, rbibutils 1.1 MB.

Depends (2)
R >= 4.2network
LinkingTo (1)
Enhances (0)
none
Reverse dependencies
29direct
10indirect
Depends 16 · Imports 13 · LinkingTo 9
Suggested by 8
Show all 37 packagesHide all 37 packages
Depends, Imports or LinkingTo, most downloaded first
Suggests, most downloaded first

Datasets

People & History

People (16)
Author, Maintainer since 3.1-0 (2013) · added in 2.2-0
Contributor · added in 3.5.1
Contributor · added in 3.11.0
Contributor · added in 3.11.0
Contributor · added in 4.2.1
Contributor · added in 4.5.0
Contributor · added in 3.10.1
Contributor · added in 4.7.1
Contributor · added in 3.2.3
Show 2 more contributorsHide 2 contributors
Contributor · added in 4.0.0
Contributor · added in 3.2.3

Previously maintained by David R. Hunter (2.2-2 to 3.0-3) and Mark S. Handcock (2.0 to 2.2-1).

Listed in earlier versions (5)
Show 5 peopleHide 5 people
Steven M.
no longer listed · 4.5.0 to 4.12.0
Pavel N.
no longer listed · 4.5.0 to 4.12.0
David R.
no longer listed · 4.5.0 to 4.12.0
Mark S.
no longer listed · 4.5.0 to 4.12.0
Carter T.
no longer listed · 4.5.0 to 4.12.0
Releases (60)

Pick two releases to compare their code metrics.

  • R
    R 4.6.0 released · 2026-04-24
  • 4.12.0Latest
    record
    2026-02-18 · current release · diff ↗
  • 4.11.0
    record
    2025-12-22 · diff ↗ ·
    removed 1 export
    control.ergm.godfather
    added 1 export
    ergm_most_frequent_n
  • 4.10.1
    record
    2025-08-27 · diff ↗
  • 4.9.0.1
    record
    2025-08-26 · diff ↗
  • 4.9.0
    record
    2025-06-10 · diff ↗ ·
    added 2 exports
    control.ergm3, search.ergmAuxiliaries
  • R
    R 4.5.0 released · 2025-04-11
  • 4.8.1
    record
    2025-01-21 · diff ↗ ·
    removed 1 export
    offset.info.formula
  • 4.7.5
    record
    2024-11-06 · diff ↗
  • 4.7.1
    record
    2024-10-07 · diff ↗ ·
    added 4 exports
    param_names<-, ergm_Init_message, ergm_Init_stop, ergm_Init_warning
  • R
    R 4.4.0 released · 2024-04-24
  • 4.6.0
    record
    2023-12-18 · diff ↗
  • 4.5.0
    record
    2023-05-28 · diff ↗ ·
    added 1 export
    ergm_cutoff_message
  • R
    R 4.3.0 released · 2023-04-21
  • 4.4.0
    record
    2023-01-27 · diff ↗
  • 4.3.2
    record
    2022-11-24 · diff ↗
Show 68 earlier eventsHide 68 earlier events
  • 4.3.1
    record
    2022-11-07 · diff ↗ ·
    removed 1 export
    is.inCH
    added 1 export
    search.ergmHints
  • 4.2.3
    record
    2022-10-02 · diff ↗ ·
    added 1 export
    .simulate_formula.network
  • 4.2.2
    record
    2022-06-01 · diff ↗
  • 4.2.1
    record
    2022-05-10 · diff ↗ ·
    added 8 exports
    ergm_GWDECAY, ergm_edgecov_args, ergm_keyword, ergm_state_cache, search.ergmConstraints, search.ergmProposals, search.ergmReferences, shrink_into_CH
  • R
    R 4.2.0 released · 2022-04-22
  • 4.1.2
    record
    2021-07-27 · diff ↗ ·
    added 1 export
    ERGM_VATTR_SPEC_NULL
  • 4.0.1
    record
    2021-06-21 · diff ↗ ·
    removed 1 export
    symmetrize
    added 1 export
    ergm_symmetrize
  • 4.0.0
    record
    2021-06-14 · diff ↗ ·
    removed 9 exports
    ergm.Cprepare, ergm.el.lasttoggle, ergm_Clist, is.durational, is.pending_update_network, pending_update_network, remove.offset.formula, to.lasttoggle.matrix, to.matrix.lasttoggle
    added 28 exports
    %ergmlhs%, %ergmlhs%<-, ERGM_STATE_C_CHANGED, ERGM_STATE_RECONCILED, ERGM_STATE_R_CHANGED, call.ErgmTerm, convert_ergmlhs, ergm_Cstate_clear, ergm_Init_try, ergm_SAN_slave, ergm_bd_init, ergm_dyadgen_select, ergm_mk_std_op_namewrap, ergm_no_ext.encode, ergm_preprocess_response, ergm_propagate_ext.encode, ergm_state, ergm_state_receive, ergm_state_send, get.MT_terms, is.ergm_state, is.valued, rank_test.ergm, set.MT_terms, snctrl, symmetrize, update_network, wrap.ergm_model
  • R
    R 4.1.0 released · 2021-05-18
  • 3.11.0
    record
    2020-10-14 · diff ↗ ·
    removed 7 exports
    ergm.degeneracy, ergm.getglobalstats, ergm.getmodel, ergm.update.formula, network.update, newnw.extract, standardize.network
    added 4 exports
    COLLAPSE_SMALLEST, LARGEST, SMALLEST, simulate_formula
  • R
    R 4.0.0 released · 2020-04-24
  • 3.10.4
    record
    2019-06-10 · diff ↗
  • 3.10.1
    record
    2019-05-14 · diff ↗ ·
    removed 33 exports
    MHproposal, MHproposal.character, MHproposal.ergm, MHproposal.formula, coef.ergm, coef.length.model, colMeans.mcmc.list, ergm.ConstraintImplications, ergm.Cprepare.el, ergm.Cprepare.miss, ergm.MHP.table, ergm.checkargs, ergm.checkbipartite, ergm.checkdirected, ergm.etamap, ergm.getMCMCsample, ergm.getterms, ergm.init.methods, ergm.mcmcslave, get.miss.dyads, gof.ergm, gof.formula, logLik.ergm, plot.mcmc.list.ergm, plot.network.ergm, simulate.ergm, simulate.formula, summary.ergm, summary.formula, summary.statistics and 3 more
    added 5 exports
    ERGM_GET_VATTR_MULTIPLE_TYPES, ergm.restartCluster, is.pending_update_network, nthreads, pending_update_network
  • R
    R 3.6.0 released · 2019-04-26
  • 3.9.4
    record
    2018-08-16 · diff ↗ ·
    removed 72 exports
    anova.ergm, anova.ergmlist, as.edgelist.compressed, central.network, coefficients.ergm, coef.sublength.model, degreedistfactor, delete.isolates, drawpie, dspartnerdist, enformulate.curved.ergm, enformulate.curved.formula, ergm.bounddeg, ergm.logisticdeviance, ergm.logitreg, ergm.mahalanobis, ergm.mple, espartnerdist, fix.curved.ergm, fix.curved.formula, get.free.dyads, gof.default, invert.network, is.durational.character, is.durational.ergm.model, is.durational.formula, is.durational.NULL, is.dyad.independent.conlist, is.dyad.independent.ergm, is.dyad.independent.ergm.model and 42 more
    added 28 exports
    ERGM_LEVELS_SPEC, ERGM_VATTR_SPEC, as.ergm_model, as.rlebdm, control.ergm.godfather, ergm.checkbipartite, ergm.estfun, ergm.godfather, ergm_Clist, ergm_Init_abort, ergm_Init_inform, ergm_Init_warn, ergm_MCMC_sample, ergm_MCMC_slave, ergm_attr_levels, ergm_get_vattr, ergm_model, ergm_plot.mcmc.list, ergm_proposal, ergm_proposal_table, geweke.diag.mv, network.list, nparam, param_names, rlebdm, spectrum0.mvar, summary_formula, to_ergm_Cdouble
  • R
    R 3.5.0 released · 2018-04-23
  • 3.8.0
    record
    2017-08-20 · diff ↗
  • R
    R 3.4.0 released · 2017-04-21
  • 3.7.1
    record
    2017-03-21 · diff ↗
  • 3.7.0
    record
    2017-03-20 · diff ↗
  • 3.6.1
    record
    2017-01-05 · diff ↗
  • R
    R 3.3.0 released · 2016-05-03
  • 3.6.0
    record
    2016-03-25 · diff ↗ ·
    removed 6 exports
    pattern:^InitErgmTerm.*, pattern:^InitWtErgmTerm.*, pattern:^InitConstraint.*, pattern:^InitMHP.*, pattern:^InitWtMHP.*, pattern:^InitReference.*
  • 3.5.1
    record
    2015-10-24 · diff ↗ ·
    removed 6 exports
    append.rhs.formula, as.edgelist, as.edgelist.matrix, as.edgelist.network, term.list.formula, vector.namesmatch
    added 5 exports
    is.curved, is.curved.ergm, is.curved.ergm.model, is.curved.formula, is.curved.NULL
  • 3.4.0
    record
    2015-06-16 · diff ↗ ·
    removed 1 export
    pattern:^[^\\.]
    added 169 exports
    anova.ergm, anova.ergmlist, append.rhs.formula, approx.hotelling.diff.test, as.edgelist, as.edgelist.compressed, as.edgelist.matrix, as.edgelist.network, central.network, check.ErgmTerm, coef.ergm, coefficients.ergm, coef.length.model, coef.sublength.model, colMeans.mcmc.list, control.ergm, control.ergm.bridge, control.gof.ergm, control.gof.formula, control.logLik.ergm, control.san, control.simulate, control.simulate.ergm, control.simulate.formula, control.simulate.formula.ergm, degreedist, degreedistfactor, delete.isolates, drawpie, dspartnerdist and 139 more
  • R
    R 3.2.0 released · 2015-04-16
  • 3.2.4
    record
    2014-12-14 · diff ↗
  • 3.2.3
    record
    2014-12-11 · diff ↗
  • 3.1.3
    record
    2014-07-19 · diff ↗
  • R
    R 3.1.0 released · 2014-04-10
  • 3.1.2
    record
    2014-01-31 · diff ↗
  • 3.1.1
    record
    2013-11-28 · diff ↗
  • 3.1-0
    record
    2013-04-25 · diff ↗ ·
    removed 1 export
    pattern:.
    added 1 export
    pattern:^[^\\.]
  • R
    R 3.0.0 released · 2013-04-03
  • 3.0-3
    record
    2012-05-28 · diff ↗
  • R
    R 2.15.0 released · 2012-03-30
  • 3.0-1
    record
    2012-03-08 · diff ↗ ·
    added 1 export
    pattern:.
  • R
    R 2.14.0 released · 2011-10-31
  • 2.4-3
    record
    2011-09-19 · diff ↗
  • 2.4-2
    record
    2011-06-15 · diff ↗
  • 2.4
    record
    2011-05-27 · diff ↗
  • R
    R 2.13.0 released · 2011-04-13
  • 2.3
    record
    2011-02-03 · diff ↗
  • 2.2-7
    record
    2010-11-23 · diff ↗
  • 2.2-6
    record
    2010-11-03 · diff ↗
  • R
    R 2.12.0 released · 2010-10-15
  • 2.2-5
    record
    2010-07-24 · diff ↗
  • 2.2-4
    record
    2010-04-22 · diff ↗
  • R
    R 2.11.0 released · 2010-04-22
  • 2.2-3
    record
    2010-04-05 · diff ↗
  • 2.2-2
    record
    2010-01-14 · diff ↗
  • R
    R 2.10.0 released · 2009-10-26
  • R
    R 2.9.0 released · 2009-04-17
  • 2.2-1
    record
    2009-03-08 · diff ↗
  • 2.2-0
    record
    2009-03-01 · diff ↗
  • R
    R 2.8.0 released · 2008-10-20
  • 2.1
    record
    2008-04-28 · diff ↗
  • 2.0-8
    record
    2008-04-22 · diff ↗
  • R
    R 2.7.0 released · 2008-04-22
  • 2.0-7
    record
    2008-04-03 · diff ↗
  • 2.0-6
    record
    2008-03-12 · diff ↗
  • 2.0-5
    record
    2008-02-18 · diff ↗
  • 2.0-4
    record
    2008-02-05 · diff ↗
  • 2.0-3
    record
    2008-02-03 · diff ↗
  • 2.0-2
    record
    2008-01-23 · diff ↗
  • 2.0-1
    record
    2008-01-19 · diff ↗
  • 2.0
    record
    2008-01-14
  • R
    R 2.6.0 released · 2007-10-03

Package metadata

First published
2008-01-14
Total releases
60 / 18 yrs
License
GPL-3 + file LICENSE OSI
Minimum R
≥ 4.2
Bundled data
69 KB / 13 files
Download size
2.0 MB
Appears in task views

Cite

Cite this package

Run in R for the authors' preferred citation:

citation("ergm")

The package provides a citation file that builds its entry when R runs it. Run citation() to see it.

Cite the R Observatory

For a number measured here: a download total, a coverage figure, an archival date.

APA

Balamuta, J. J. (2026). R Observatory: Metrics for ergm version 4.12.0 [Data set]. HJJB, LLC. Data release v2026-10-24. https://doi.org/10.5281/zenodo.21843040

From data release v2026-10-24, which the citation names so these numbers can be found later. More on citing and the projects behind them.

Report a problem with this page →

Privacy choices

These apply to this browser and are stored on this device only. Nothing about your choice is sent to us.

Read the privacy policy