summary_formula {ergm}R Documentation

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. Defaults to NULL for simple presence or absence, modeled via binary ERGM terms. Passing anything but NULL uses valued ERGM terms.

Value

A vector of statistics measured on the network.

Methods (by class)

See Also

ergm(), network(), ergm-terms

summary.ergm_model()

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


[Package ergm version 3.10.4 Index]