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

summary_formula

Dispatching a summary function based on the class of the LHS of a formula.


Description

The generic summary_formula() (note the underscore) expects a formula argument and will attempt to identify the class of the LHS of the formula and dispatch to the appropriate summary_formula method.

Usage

summary_formula(object, ..., basis = NULL)

## S3 method for class 'ergm'
summary_formula(object, ..., basis = NULL)

## S3 method for class 'network.list'
summary_formula(object, response = NULL, ..., basis = NULL)

## S3 method for class 'network'
summary_formula(object, response = NULL, ..., basis = NULL)

## S3 method for class 'pending_update_network'
summary_formula(object, response = NULL, ..., basis = NULL)

## S3 method for class 'matrix'
summary_formula(object, response = NULL, ..., basis = NULL)

## Default S3 method:
summary_formula(object, response = NULL, ..., basis = NULL)

Arguments

object

A two-sided formula.

...

further arguments passed to or used by methods.

basis

Optional object of the same class as the LHS of the formula, substituted in place of the LHS.

response

Name of the edge attribute whose value is to be modeled in the valued ERGM framework. Defaults to NULL for simple presence or absence, modeled via a binary ERGM.

Value

A vector of statistics measured on the network.

Methods (by class)

  • ergm: an ergm fit method, extracting its model from the fit.

  • network.list: a method for a network.list on the LHS of the formula.

  • network: a method for a network on the LHS of the formula.

  • pending_update_network: a method for the semi-internal pending_update_network on the LHS of the formula.

  • matrix: a method for a matrix on the LHS of the formula.

  • default: a fallback method.

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.