Skip to contents

Extracts terms, coefficients, standard errors, p-values, and term metadata from a fitted ergm object. Returns a standardized data frame for use in publication-ready tables.

Usage

parse_ergm_model(object)

Arguments

object

A fitted ergm object.

Value

A data frame with columns:

term

Character. The canonical ERGM term name.

coef_name

Character. The full coefficient name from the model.

attribute

Character or NA. The attribute(s) used in the term, comma-separated when multiple.

estimate

Numeric. The coefficient estimate.

se

Numeric. The standard error.

pvalue

Numeric. The p-value.

description

Character or NA. Term description from the ERGM term database.

math

Character or NA. The mathematical definition (reserved for future use).

figure

Character or NA. Path to an associated figure (reserved for future use).

Details

The coefficient names produced by ergm (which may expand terms into multiple rows, e.g., nodefactor.race.Black) are mapped back to the canonical term names from the formula. Term metadata is looked up from the ERGM term database using search.ergmTerms.

See also

parse_ergm_formula for formula-only parsing, search.ergmTerms for the underlying term database.

Examples

if (FALSE) { # \dontrun{
library(ergm)
data(florentine)
fit <- ergm(flomarriage ~ edges + nodematch("wealth"))
parse_ergm_model(fit)
} # }