tabulergm is an R package designed to translate models estimated with
the ergm framework into
publication-ready tables and explanatory summaries.
# Install from GitHub
# install.packages("remotes")
remotes::install_github("gvegayon/tabulergm")Here is a simple example fitting an ERGM to the Florentine marriage network and generating a summary table:
library(ergm)
library(tabulergm)
# Fit a simple ERGM
data(florentine)
model <- ergm(flomarriage ~ edges + triangle)
# Parse the model
parse_ergm_model(model)
#> term coef_name attribute estimate se pvalue
#> 1 edges edges <NA> -1.7051583 0.3537373 1.432649e-06
#> 2 triangle triangle <NA> 0.1339233 0.5446231 8.057590e-01
#> description math
#> 1 Number of edges in the network \\sum_{i<j} y_{ij}
#> 2 Triangles \\sum_{i<j<k} y_{ij} y_{jk} y_{ik}
#> figure
#> 1 /tmp/RtmpqY7ElF/ee181bc8e0ec4d7031265399c458b232.png
#> 2 /tmp/RtmpqY7ElF/058b92bf247dcf2024909eb22259b055.pngMIT © George Vega Yon