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.
ergm_state(x, ...)# S3 method for edgelist
ergm_state(
x,
nw0,
model = NULL,
proposal = NULL,
stats = NULL,
ext.state = NULL,
...
)
# S3 method for matrix
ergm_state(
x,
nw0,
model = NULL,
proposal = NULL,
stats = NULL,
ext.state = NULL,
...
)
# S3 method for network
ergm_state(x, ...)
is.ergm_state(x)
# S3 method for ergm_state
as.edgelist(x, ...)
# S3 method for ergm_state
as.matrix(x, matrix.type = NULL, ...)
# S3 method for ergm_state_full
as.network(x, ..., populate = TRUE)
# S3 method for ergm_state
network.edgecount(x, na.omit = TRUE, ...)
# S3 method for ergm_state_full
network.dyadcount(x, na.omit = TRUE, ...)
# S3 method for ergm_state_full
network.size(x, ...)
# S3 method for ergm_state
network.naedgecount(x, ...)
# S3 method for ergm_state_full
%ergmlhs%(lhs, setting)
# S3 method for ergm_state_full
%ergmlhs%(lhs, setting) <- value
# S3 method for ergm_state
as.rlebdm(x, ...)
# S3 method for ergm_state_send
as.ergm_model(x, ...)
# S3 method for ergm_state_send
is.curved(object, ...)
# S3 method for ergm_state_send
param_names(object, ...)
# S3 method for ergm_state_send
nparam(object, ...)
# S3 method for ergm_state_full
update(
object,
el = NULL,
nw0 = NULL,
model = NULL,
proposal = NULL,
stats = NULL,
ext.state = NULL,
state = NULL,
...
)
# S3 method for 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 ergm_state_send
ergm_state_send(x, ...)
# S3 method for ergm_state_full
ergm_state_send(x, ...)
# S3 method for ergm_state_receive
ergm_state_send(x, ...)
# S3 method for ergm_state_send
update(object, state, ...)
ergm_state_receive(x, ...)
# S3 method for ergm_state
ergm_state_receive(x, ...)
# S3 method for ergm_state_full
ergm_state_receive(x, ...)
# S3 method for ergm_state
summary(object, ...)
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:
a tibble
edgelist
representing the edge state of the network
a network
object with all edges removed.
an ergm_model
object.
an ergm_proposal
object.
a list of length equalling to the number of terms in the model.
one of ERGM_STATE_R_CHANGED
, ERGM_STATE_C_CHANGED
, and ERGM_STATE_R_RECONCILED
.
a numeric vector of network statistics or some other statistics used to resume.
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
An object of class integer
of length 1.
An object of class integer
of length 1.
An object of class integer
of length 1.
Additional arguments, passed to further methods.
a network
object, whose edges are absent or ignored.
an ergm_model
object.
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.
Whether missing edges should be counted. Note that missing edge information is not stored.
An ergm_state
to replace the state with.
ergm_state(edgelist)
: a method for constructing an ergm_state from an edgelist
object and an empty network
.
ergm_state(matrix)
: a method for constructing an ergm_state from a matrix object and an empty network
.
ergm_state(network)
: a method for constructing an ergm_state from
a network
object. Note that ...
arguments will be passed
directly to the edgelist
method.
ergm_state(ergm_state)
: a method for constructing an ergm_state
.
network.edgecount(ergm_state)
: Note that this method fails when
na.omit=FALSE
, since missing edges are not stored.
network.naedgecount(ergm_state)
: A stub that returns 0.
summary(ergm_state)
: a very low-level function that calculates summary statistics associated with an ergm_state
object.
network.dyadcount(ergm_state_full)
: Note that this method fails with
its default argument, since missing edges are not stored.
update(ergm_state_full)
: a method for updating an ergm_state
and reconciling extended state.
ergm_state
is actually a hierarchy of classes, defined by what
they can be used for. Specifically,
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.
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.
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.
ergm_MCMC_sample()
for an example of manually
constructing and manipulating an ergm_state
.