Skip to contents

S3 generic that dispatches to methods for fitted ergm objects or plain formula objects, calling the internal parsing engine and returning a formatted table.

Usage

tabulergm_table(object, ...)

# S3 method for class 'ergm'
tabulergm_table(
  object,
  include_description = FALSE,
  include_math = FALSE,
  include_attribute = FALSE,
  format = c("data.frame", "html", "markdown"),
  ...
)

# S3 method for class 'formula'
tabulergm_table(object, format = c("data.frame", "html", "markdown"), ...)

Arguments

object

A fitted ergm object or an ERGM formula.

...

Additional arguments passed to methods.

include_description

Logical. Include the term description column? Default FALSE.

include_math

Logical. Include the mathematical notation column? Default FALSE.

include_attribute

Logical. Include the attribute column? Default FALSE.

format

Character. Output format: "data.frame" (default), "html", or "markdown". HTML and Markdown output require the knitr package.

Value

A data.frame (default), or a knitr_kable object when format is "html" or "markdown".

Methods (by class)

  • tabulergm_table(ergm): Method for fitted ergm objects.

    Calls parse_ergm_model and returns a table with default columns term, figure, estimate, se, and pvalue. Optional columns (description, math, attribute) can be included via logical arguments.

  • tabulergm_table(formula): Method for formula objects.

    Calls parse_ergm_formula and returns a table with columns term, figure, math, and description. Coefficient statistics are excluded because no fitted model is available.

See also

tabulergm_table.ergm, tabulergm_table.formula

Examples

if (FALSE) { # \dontrun{
library(ergm)
data(florentine)
fit <- ergm(flomarriage ~ edges + nodematch("wealth"))
tabulergm_table(fit)
tabulergm_table(fit, include_description = TRUE)
tabulergm_table(fit, format = "markdown")
} # }
if (FALSE) { # \dontrun{
library(ergm)
tabulergm_table(network ~ edges + nodematch("gender"))
} # }