Learn R Programming

ergm (version 3.9.4)

ergm_model: Internal representation of an ergm network model

Description

These methods are generally not called directly by users, but may be employed by other depending packages. ergm_model constructs it from a formula. Each term is initialized via the InitErgmTerm functions to create a ergm_model object.

Usage

ergm_model(formula, nw = NULL, response = NULL, silent = FALSE,
  role = "static", ..., term.options = list())

# S3 method for ergm_model c(...)

as.ergm_model(x, ...)

# S3 method for ergm_model as.ergm_model(x, ...)

# S3 method for formula as.ergm_model(x, ...)

# S3 method for ergm_model is.curved(object, ...)

# S3 method for ergm_model is.durational(object, ...)

# S3 method for ergm_model is.dyad.independent(object, ...)

# S3 method for ergm_model nparam(object, canonical = FALSE, offset = NA, byterm = FALSE, ...)

# S3 method for ergm_model param_names(object, canonical = FALSE, ...)

Arguments

formula

An ergm() formula of the form network ~ model.term(s) or ~ model.term(s).

nw

The network of interest; if passed, the LHS of formula is ignored. This is the recommended usage.

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.

silent

logical, whether to print the warning messages from the initialization of each model term.

role

A hint about how the model will be used. Used primarily for dynamic network models.

additional parameters for model formulation

term.options

a list of optional settings such as calculation tuning options to be passed to the InitErgmTerm functions.

x

object to be converted to an ergm_model.

object

An ergm_model object.

canonical

Whether the canonical (eta) parameters or the curved (theta) parameters are used.

offset

If NA (the default), all model terms are counted; if TRUE, only offset terms are counted; and if FALSE, offset terms are skipped.

byterm

Whether to return a vector of the numbers of coefficients for each term.

Value

ergm_model returns an ergm_model object as a list containing:

formula

the formula inputted to ergm_model

coef.names

a vector of coefficient names

offset

a logical vector of whether each term was "offset", i.e. fixed

terms

a list of terms and 'term components' initialized by the appropriate InitErgmTerm.X function.

network.stats0

NULL always??

etamap

the theta -> eta mapping as a list returned from <ergm.etamap>

Methods (by generic)

  • c: A method for concatenating terms of two or more initialized models.

  • is.curved: Tests whether the model is curved.

  • is.durational: Test if the model has duration-dependent terms, which call for lasttoggle data structures.

  • is.dyad.independent: Tests whether the model is dyad-independent.

  • nparam: Number of parameters of the model.

  • param_names: Parameter names of the model.

See Also

summary.ergm_model()