ergm
Fit, Simulate and Diagnose Exponential-Family Models for Networks
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>.
README
USAGE
These files are exported by ergm via R's LinkingTo: API, and allow
other R packages to extend ergm's functionality. To make use of them,
add the following dependencies to your package's DESCRIPTION file:
Depends: ergm
LinkingTo: ergm
and place a one-line C file (e.g., include_stubs.c) containing the
following one line in the src/ directory of your package:
#include "ergm_stubs.c"
You will then be able to #include any of the exported header files,
use the macros, and call any functions they define.
If you make use of this functionality, please credit us and cite the
ergm package. (See citation(ergm) for instructions.)
STABILITY
Currently, the following exported APIs are considered stable, and
should remain source-compatible (1) for the forseeable future:
* Custom binary and valued change statistics API used by
'ergm.userterms'. This includes, in particular, the functionality
documented in the Journal of the Statistical Sofware paper(s) and in
workshops. The header files involved are ergm_changestat.h,
ergm_edgetree.h, ergm_wtchangestat.h, and ergm_wtedgetree.h . (Their
names without the ergm_ prefix have been deprecated and will produce
a warning.)
* Storage and auxiliary storage API (ergm_storage.h).
ALL OTHER exported header files and APIs are provided as a
courtesy. They are to be considered EXPERIMENTAL and subject to change
without notice.
(1) An API being "source-compatible" means that if updating ergm
package breaks your package, the breakage can be fixed without
modifying it, simply by recompiling your package.Versions across snapshots
| Version | Repository | File | Size |
|---|---|---|---|
4.12.0 |
rolling linux/jammy R-4.5 | ergm_4.12.0.tar.gz |
3.0 MiB |
4.12.0 |
rolling linux/noble R-4.5 | ergm_4.12.0.tar.gz |
3.0 MiB |
4.12.0 |
rolling source/ R- | ergm_4.12.0.tar.gz |
2.0 MiB |
4.12.0 |
latest linux/jammy R-4.5 | ergm_4.12.0.tar.gz |
3.0 MiB |
4.12.0 |
latest linux/noble R-4.5 | ergm_4.12.0.tar.gz |
3.0 MiB |
4.12.0 |
latest source/ R- | ergm_4.12.0.tar.gz |
2.0 MiB |
4.12.0 |
2026-04-26 source/ R- | ergm_4.12.0.tar.gz |
2.0 MiB |
4.12.0 |
2026-04-23 source/ R- | ergm_4.12.0.tar.gz |
2.0 MiB |
4.12.0 |
2026-04-09 windows/windows R-4.5 | ergm_4.12.0.zip |
3.0 MiB |
4.8.1 |
2025-04-20 source/ R- | ergm_4.8.1.tar.gz |
1.7 MiB |
Dependencies (latest)
Depends
- network (>= 1.19.0)
Imports
- robustbase (>= 0.99-6)
- coda (>= 0.19-4.1)
- trust (>= 0.1-8)
- lpSolveAPI (>= 5.5.2.0-17.14)
- statnet.common (>= 4.13.0)
- rle (>= 0.10.0)
- purrr (>= 1.2.1)
- rlang (>= 1.1.7)
- memoise (>= 2.0.1)
- tibble (>= 3.3.1)
- magrittr (>= 2.0.4)
- Rdpack (>= 2.6.4)
- knitr (>= 1.51)
- stringr (>= 1.6.0)
- cli (>= 3.6.5)
- MASS
- Matrix
- parallel
- methods
LinkingTo
Suggests
- latticeExtra (>= 0.6-31)
- sna (>= 2.8)
- rmarkdown (>= 2.30)
- testthat (>= 3.3.2)
- ergm.count (>= 4.1.3)
- withr (>= 3.0.2)
- covr (>= 3.6.5)
- Rglpk (>= 0.6-5.1)
- slam (>= 0.1-55)
- networkLite (>= 1.1.0)
- lattice