ergm.godfather: A function to apply a given series of changes to a network.

View source: R/godfather.R

ergm.godfatherR Documentation

A function to apply a given series of changes to a network.


Gives the network a series of proposals it can't refuse. Returns the statistics of the network, and, optionally, the final network.


  changes = NULL,
  response = NULL, = FALSE,
  stats.start = FALSE,
  changes.only = FALSE,
  verbose = FALSE,
  control = control.ergm.godfather()



An ergm-style formula, with a network on its LHS.


Either a matrix with three columns: tail, head, and new value, describing the changes to be made; or a list of such matrices to apply these changes in a sequence. For binary network models, the third column may be omitted. In that case, the changes are treated as toggles. Note that if a list is passed, it must either be all of changes or all of toggles.


Either a character string, a formula, or NULL (the default), to specify the response attributes and whether the ERGM is binary or valued. Interpreted as follows:


Model simple presence or absence, via a binary ERGM.

character string

The name of the edge attribute whose value is to be modeled. Type of ERGM will be determined by whether the attribute is logical (TRUE/FALSE) for binary or numeric for valued.

a formula

must be of the form NAME~EXPR|TYPE (with | being literal). EXPR is evaluated in the formula's environment with the network's edge attributes accessible as variables. The optional NAME specifies the name of the edge attribute into which the results should be stored, with the default being a concise version of EXPR. Normally, the type of ERGM is determined by whether the result of evaluating EXPR is logical or numeric, but the optional TYPE can be used to override by specifying a scalar of the type involved (e.g., TRUE for binary and 1 for valued).

Whether to return a network that results. Defaults to FALSE.


Whether to return the network statistics at start (before any changes are applied) as the first row of the statistics matrix. Defaults to FALSE, to produce output similar to that of simulate for ERGMs when output="stats", where initial network's statistics are not returned.


Whether to return network statistics or only their changes relative to the initial network.


A logical or an integer to control the amount of progress and diagnostic information to be printed. FALSE/0 produces minimal output, wit higher values producing more detail. Note that very high values (5+) may significantly slow down processing.


A list of control parameters for algorithm tuning, typically constructed with control.ergm.godfather(). Its documentation gives the the list of recognized control parameters and their meaning. The more generic utility snctrl() (StatNet ConTRoL) also provides argument completion for the available control functions and limited argument name checking.


If (the default), an mcmc object with the requested network statistics associed with the network series produced by applying the specified changes. Its mcmc attributes encode the timing information: so start(out) gives the time point associated with the first row returned, and end(out) out the last. The "thinning interval" is always 1.

If, return a network object, representing the final network, with a matrix of statistics described in the previous paragraph attached to it as an attr-style attribute "stats".

See Also

tergm::tergm.godfather(), simulate.ergm(), simulate.formula()



ergm documentation built on June 2, 2022, 1:07 a.m.