View source: R/tergm.getMCMCsample.R
tergm_MCMC_sample | R Documentation |
tergm_MCMC_sample
is a low-level internal function not intended to
be called directly by end users. It collects a sample of networks and
returns the statistics of each sample, along with a toggle matrix of the
changes needed from the original network to each in the sample.
tergm_MCMC_slave
is an even
lower-level function that actually calls the C code.
tergm_MCMC_sample(
nw,
model,
model.mon = NULL,
proposal,
control,
theta,
verbose = FALSE,
...,
eta = ergm.eta(theta, model$etamap)
)
tergm_MCMC_slave(state, eta, control, verbose)
nw |
a |
model |
the model, as returned by |
model.mon |
the optional monitoring model, as returned by |
proposal |
the proposal, as returned by |
control |
the list of control parameters |
theta |
the vector of curved parameters |
verbose |
A logical or an integer to control the amount of
progress and diagnostic information to be printed. |
eta |
the vector of natural parameters |
This function is normally called inside simulate.tergm()
functions
to prepare inputs for the C sampling code and return its results
returns the MCMC sample as a list containing:
statsmatrix.gen: the matrix of sampled statistics for model
,
relative to the initial network
statsmatrix.mon: the matrix of sampled statistics for model.mon
,
relative to the initial network
newnetwork: ergm_state
with the final network from the
sampling process
changed: a matrix of changes, where the first column is
the timestamp of the change, the second and third columns are the tail and head
(respectively) of the changed dyad, and the fourth column is the edge state to which
the dyad was changed; this is only returned if control$changes
is TRUE
maxchanges: the maxchanges
value from the control list
simulate.tergm()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.