ergmx.parse_formula#

ergmx.parse_formula(formula)[source]#

Parse a formula string into terms.

The syntax is R’s: terms separated by +, with arguments in parentheses. A left-hand side ("net ~ edges + mutual") is ignored; TRUE/FALSE, NA, c(2, 3) and 2:3 are accepted as in R, and so are interactions of dyad-independent terms (a:b, and a*b for a + b + a:b), R’s argument names with dots (sign.action=), and the operators offset(term), F(~terms, ~filter), N(~terms, lm=~attributes), S(~terms, ~attributes) and tergm’s Form(), Persist(), Diss(), Cross() and Change(). Nothing is evaluated: arguments must be literals.