Learn R Programming

ergm (version 4.12.0)

I-ergmTerm: 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

See Also

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

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

ergm:::.formatTermKeywords("ergmTerm", "I", "subsection")

Examples

Run this code
data(florentine)

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

# \dontshow{
stopifnot(identical(s, summary(flomarriage ~ degree(0:5))))
# }

Run the code above in your browser using DataLab