I-ergmTerm-ca2567ac: Substitute a formula into the model formula

I-ergmTermR Documentation

Substitute a formula into the model formula

Description

This is a convenience operator that can be used to paste terms constructed elsewhere into a formula.

Usage

# binary: I(formula)

# valued: I(formula)

Arguments

formula

a one-sided ergm()-style formula with the terms to be evaluated

Note

formula can also be a term_list or character. In the latter case, if there are multiple strings, they will be concatenated with +, and if they do not start with "~", one will be prepended. Its environment will be inherited from the top-level formula.

See Also

base::I() (a.k.a. AsIs)

ergmTerm for index of model terms currently visible to the package.

\Sexpr[results=rd,stage=render]{ergm:::.formatTermKeywords("ergmTerm", "I", "subsection")}

Examples

data(florentine)

(terms <- paste0("degree(", 0:5, ")"))
(s <- summary(flomarriage ~ I(terms)))



ergm documentation built on Feb. 18, 2026, 1:06 a.m.