ergm_state {ergm}R Documentation

A Representation of ERGM state

Description

ergm_state is a family of semi-internal classes for passing around results of MCMC sampling, particularly when the result is used to start another MCMC sampler. It is deliberately loosely specified, and its structure and even name are subject to change.

Usage

ergm_state(x, ...)

## S3 method for class 'edgelist'
ergm_state(
  x,
  nw0,
  model = NULL,
  proposal = NULL,
  stats = NULL,
  ext.state = NULL,
  ...
)

## S3 method for class 'matrix'
ergm_state(
  x,
  nw0,
  model = NULL,
  proposal = NULL,
  stats = NULL,
  ext.state = NULL,
  ...
)

## S3 method for class 'network'
ergm_state(x, ...)

is.ergm_state(x)

## S3 method for class 'ergm_state'
as.edgelist(x, ...)

## S3 method for class 'ergm_state'
as.matrix(x, matrix.type = NULL, ...)

## S3 method for class 'ergm_state_full'
as.network(x, ..., populate = TRUE)

## S3 method for class 'ergm_state'
network.edgecount(x, na.omit = TRUE, ...)

## S3 method for class 'ergm_state_full'
network.dyadcount(x, na.omit = TRUE, ...)

## S3 method for class 'ergm_state_full'
network.size(x, ...)

## S3 method for class 'ergm_state'
network.naedgecount(x, ...)

## S3 method for class 'ergm_state_full'
lhs %ergmlhs% setting

## S3 method for class 'ergm_state_full'
lhs %ergmlhs% setting <- value

## S3 method for class 'ergm_state'
as.rlebdm(x, ...)

## S3 method for class 'ergm_state_send'
as.ergm_model(x, ...)

## S3 method for class 'ergm_state_send'
is.curved(object, ...)

## S3 method for class 'ergm_state_send'
param_names(object, ...)

## S3 method for class 'ergm_state_send'
nparam(object, ...)

## S3 method for class 'ergm_state_full'
update(
  object,
  el = NULL,
  nw0 = NULL,
  model = NULL,
  proposal = NULL,
  stats = NULL,
  ext.state = NULL,
  state = NULL,
  ...
)

## S3 method for class 'ergm_state'
ergm_state(x, model = NULL, proposal = NULL, stats = NULL, ...)

ERGM_STATE_R_CHANGED

ERGM_STATE_C_CHANGED

ERGM_STATE_RECONCILED

ergm_state_send(x, ...)

## S3 method for class 'ergm_state_send'
ergm_state_send(x, ...)

## S3 method for class 'ergm_state_full'
ergm_state_send(x, ...)

## S3 method for class 'ergm_state_receive'
ergm_state_send(x, ...)

## S3 method for class 'ergm_state_send'
update(object, state, ...)

ergm_state_receive(x, ...)

## S3 method for class 'ergm_state'
ergm_state_receive(x, ...)

## S3 method for class 'ergm_state_full'
ergm_state_receive(x, ...)

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

Arguments

...

Additional arguments, passed to further methods.

nw0

a network object, whose edges are absent or ignored.

model

an ergm_model object.

ext.state

a list equal to the number of terms in the model, providing the encoded extended state. This vector is usually generated by ext.encode() function of an ergm term, but it can be specified directly.

na.omit

Whether missing edges should be counted. Note that missing edge information is not stored.

state

An ergm_state to replace the state with.

Format

An object of class integer of length 1.

An object of class integer of length 1.

An object of class integer of length 1.

Details

ergm_state is actually a hierarchy of classes, defined by what they can be used for. Specifically,

c(ergm_state_receive,ergm_state)

needs to contain only el, ext.state, and ext.flag: it is the information that can change in the process of MCMC sampling; it is the one returned by the ⁠*_slave⁠ functions, to minimize the amount of data being sent between nodes in parallel computing.

c(ergm_state_send,ergm_state_receive,ergm_state)

needs the above but also the model and the proposal: is needed to initiate MCMC sampling; it is the information required by the ⁠*_slave⁠ functions, again, to minimize the amount of data being sent between nodes in parallel computing.

c(ergm_state_full, ergm_state_send,ergm_state_receive,ergm_state)

needs the above but also the nw0: is needed to reconstruct the original network.

Value

At this time, an ergm_state object is (subject to change) a list containing some subset of the following elements, with el, ext.state, and ext.flag mandatory and others depending on how it is used:

el

a tibble edgelist representing the edge state of the network

nw0

a network object with all edges removed.

model

an ergm_model object.

proposal

an ergm_proposal object.

ext.state

a list of length equalling to the number of terms in the model.

ext.flag

one of ERGM_STATE_R_CHANGED, ERGM_STATE_C_CHANGED, and ERGM_STATE_R_RECONCILED.

stats

a numeric vector of network statistics or some other statistics used to resume.

uids

a named list of globally unique ID strings associated with a model and/or proposal; for the ergm_state_send and ergm_state_receive, these strings may be retained even if these values are set to NULL

Methods (by class)

Methods (by generic)

Functions

See Also

ergm_MCMC_sample() for an example of manually constructing and manipulating an ergm_state.


[Package ergm version 4.6.0 Index]