Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

summary.formula

Calculation of network or graph statistics or other attributes specified on a formula


Description

Most generally, this function computes those summaries of the object on the LHS of the formula that are specified by its RHS. In particular, if given a network as its LHS and ergm-terms on its RHS, it computes the sufficient statistics associated with those terms.

Usage

## S3 method for class 'formula'
summary(object, ...)

Arguments

object

A formula having as its LHS a network object or a matrix that can be coerced to a network object, a network.list, or other types to be summarized using a formula. (See ‘methods(’summary_formula') for the possible LHS types.

...

further arguments passed to or used by methods.

Details

In practice, summary.formula() is a thin wrapper around the summary_formula() generic, which dispatches methods based on the class of the LHS of the formula.

summary.formula for networks understands the lasttoggle "API".

Value

A vector of statistics specified in RHS of the formula.

See Also

Examples

#
# Lets look at the Florentine marriage data
#
data(florentine)
#
# test the summary_formula function
#
summary(flomarriage ~ edges + kstar(2))
m <- as.matrix(flomarriage)
summary(m ~ edges)  # twice as large as it should be
summary(m ~ edges, directed=FALSE) # Now it's correct

ergm

Fit, Simulate and Diagnose Exponential-Family Models for Networks

v3.11.0
GPL-3 + file LICENSE
Authors
Mark S. Handcock [aut], David R. Hunter [aut], Carter T. Butts [aut], Steven M. Goodreau [aut], Pavel N. Krivitsky [aut, cre] (<https://orcid.org/0000-0002-9101-3362>), Martina Morris [aut], Li Wang [ctb], Kirk Li [ctb], Skye Bender-deMoll [ctb], Chad Klumb [ctb], Michał Bojanowski [ctb], Ben Bolker [ctb]
Initial release
2020-10-14

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.