Skip to content

tergm

Fit, Simulate and Diagnose Models for Network Evolution Based on Exponential-Family Random Graph Models

v4.2.2 · Jun 15, 2025 · GPL-3 + file LICENSE

Description

An integrated set of extensions to the 'ergm' package to analyze and simulate network evolution based on exponential-family random graph models (ERGM). 'tergm' is a part of the 'statnet' suite of packages for network analysis. See Krivitsky and Handcock (2014) <doi:10.1111/rssb.12014> and Carnegie, Krivitsky, Hunter, and Goodreau (2015) <doi:10.1080/10618600.2014.903087>.

Downloads

CRAN

1.7K

Last 30 days

2931st

6.7K

Last 90 days

46K

Last year

Trend: -26.5% (30d vs prior 30d)

r2u CRAN

37

Last 30 days

176

Last 90 days

661

Last year

Trend: -48.6% (30d vs prior 30d)

autoCRAN

1

Last 7 days

10

Last 30 days

1

All-time

autoCRAN-only: this name is served only by autoCRAN, so the count is exact.

conda-forge CRAN

220

Last 30 days

745

Last 90 days

5.9K

Last year

Trend: -47.1% (30d vs prior 30d)

CRAN Check Status

13 OK
Show all 13 flavors
Flavor Status
r-devel-linux-x86_64-debian-clang OK
r-devel-linux-x86_64-debian-gcc OK
r-devel-linux-x86_64-fedora-clang OK
r-devel-linux-x86_64-fedora-gcc OK
r-devel-windows-x86_64 OK
r-oldrel-macos-arm64 OK
r-oldrel-macos-x86_64 OK
r-oldrel-windows-x86_64 OK
r-patched-linux-x86_64 OK
r-release-linux-x86_64 OK
r-release-macos-arm64 OK
r-release-macos-x86_64 OK
r-release-windows-x86_64 OK

Check History

OK 13 OK · 0 NOTE · 0 WARNING · 0 ERROR · 0 FAILURE Jun 9, 2026
ERROR 12 OK · 0 NOTE · 0 WARNING · 1 ERROR · 0 FAILURE Jun 7, 2026
ERROR r-devel-linux-x86_64-debian-gcc

Rd files

cannot open the connection
cannot open the connection
cannot open the connection
cannot open the connection
cannot open the connection
cannot open the connection
cannot open the connection
cannot open the connection
cannot open the connection
problems found in ‘staticDiscordTNT-ergmProposal-b73a241d.Rd’, ‘stergm.Rd’, ‘stergm.utils.Rd’, ‘summary_formula.networkDynamic.Rd’, ‘tergm-deprecated.Rd’, ‘tergm-package.Rd’, ‘tergm.Rd’, ‘tergm.godfather.Rd’, ‘tergm_MCMC_sample.Rd’
OK 13 OK · 0 NOTE · 0 WARNING · 0 ERROR · 0 FAILURE May 5, 2026
ERROR 12 OK · 0 NOTE · 0 WARNING · 1 ERROR · 0 FAILURE May 4, 2026
ERROR r-release-windows-x86_64

tests

Running 'degree.mean.age.R' [8s]
  Running 'dynamic_EGMME.R' [0s]
  Running 'dynamic_MLE_blockdiag.R' [0s]
  Running 'dynamic_MLE_blockdiag.bipartite.R' [0s]
  Running 'sim_gf_sum.R' [8s]
  Running 'simulate_networkDynamic.R' [6s]
  Running 'tergm_of
...[truncated]...
       └─base::lapply(...)
   15.               └─testthat (local) FUN(X[[i]], ...)
   16.                 └─private$handle_error(msg, i)
   17.                   └─cli::cli_abort(...)
   18.                     └─rlang::abort(...)
  Execution halted
OK 14 OK · 0 NOTE · 0 WARNING · 0 ERROR · 0 FAILURE Apr 24, 2026
ERROR 13 OK · 0 NOTE · 0 WARNING · 1 ERROR · 0 FAILURE Apr 22, 2026
ERROR r-devel-windows-x86_64

tests

Running 'degree.mean.age.R' [8s]
  Running 'dynamic_EGMME.R' [0s]
  Running 'dynamic_MLE_blockdiag.R' [0s]
  Running 'dynamic_MLE_blockdiag.bipartite.R' [0s]
  Running 'sim_gf_sum.R' [7s]
  Running 'simulate_networkDynamic.R' [6s]
  Running 'tergm_of
...[truncated]...
       └─base::lapply(...)
   15.               └─testthat (local) FUN(X[[i]], ...)
   16.                 └─private$handle_error(msg, i)
   17.                   └─cli::cli_abort(...)
   18.                     └─rlang::abort(...)
  Execution halted
OK 14 OK · 0 NOTE · 0 WARNING · 0 ERROR · 0 FAILURE Mar 10, 2026

Code

Structure

Lines of code

20,241

Files

135

Compiled share

22.6%

Has compiled src

Yes

Language breakdown

R 6,321 (31.2%)C/C++/src 4,583 (22.6%)Tests 5,699 (28.2%)Docs 3,321 (16.4%)Vignettes 317 (1.6%)

API

Exported functions

16

Internal functions

70

Recent export changes

v4.2.0−2 combine_networks, uncombine_network

Testing & CI

Has tests

Yes

Test-to-code ratio

0.90

testthat edition

3

CI present

No

CI type

[]

PR gated

No

Docs

Return-value doc rate

84.6%

\dontrun example ratio

40%

Roxygen coverage

100%

Has pkgdown

No

NEWS present

No

Health & Security signals

Informational signals; not verdicts.

on.exit coverage

0%

Unsafe pattern score

0

Dep constraint coverage

66.7%

Secret pattern count

0

Bundled 3rd-party code

2 items

Portability & License

Min R version

System requirements

C++ standard

License

GPL-3 + file LICENSE

License flags

SPDX valid, OSI approved

History

Versions

20

First release

2013-04-26

Latest release

2025-06-15

Avg cadence

216 days

Cold removal rate

92.9%

Dep drift

29

LOC over versions

v3.1-0: 8,796 LOCv3.1.2: 9,313 LOCv3.1.4: 9,427 LOCv3.2.3: 10,865 LOCv3.2.4: 10,865 LOCv3.3.0: 11,396 LOCv3.3.1: 11,833 LOCv3.4.0: 11,789 LOCv3.4.1: 11,884 LOCv3.5.2: 13,550 LOCv3.6.0: 12,824 LOCv3.6.1: 12,824 LOCv3.7.0: 12,983 LOCv4.0.1: 20,062 LOCv4.0.2: 20,165 LOCv4.1.0: 20,298 LOCv4.1.1: 20,652 LOCv4.2.0: 20,047 LOCv4.2.1: 20,241 LOCv4.2.2: 20,241 LOC

Per-file churn detail lives in the source pipeline: https://github.com/r-observatory/cran-code-metrics.

Reverse Dependencies (6)

suggests

Dependency Network

Dependencies Reverse dependencies ergm network networkDynamic (>= 0.11.5) robustbase coda statnet.common ergm.multi purrr nlme MASS EpiModel statnet tergmLite ergm.sign netmediate ndtv tergm

Version History

21 tracked
new 4.2.2 Mar 10, 2026
updated 4.2.2 ← 4.2.1 diff Jun 14, 2025
updated 4.2.1 ← 4.2.0 diff Oct 7, 2024
updated 4.2.0 ← 4.1.1 diff May 29, 2023
updated 4.1.1 ← 4.1.0 diff Nov 7, 2022
updated 4.1.0 ← 4.0.2 diff Jun 21, 2022
updated 4.0.2 ← 4.0.1 diff Jul 27, 2021
updated 4.0.1 ← 3.7.0 diff Jun 23, 2021
updated 3.7.0 ← 3.6.1 diff Oct 14, 2020
updated 3.6.1 ← 3.6.0 diff Jun 11, 2019
updated 3.6.0 ← 3.5.2 diff May 14, 2019
updated 3.5.2 ← 3.4.1 diff Aug 17, 2018
updated 3.4.1 ← 3.4.0 diff Sep 11, 2017
updated 3.4.0 ← 3.3.1 diff Mar 27, 2016
updated 3.3.1 ← 3.3.0 diff Oct 24, 2015