Learn R Programming

ergm (version 3.0-3)

simulate.stergm: Draw from the distribution of an Separable Temporal Exponential Family Random Graph Model

Description

simulate is used to draw from separable temporal exponential family random network models in their natural parameterizations. See stergm for more information on these models.

Usage

## S3 method for class 'stergm':
simulate(object, nsim=1, seed=NULL,
                             coef.form=object$formation.fit$coef,coef.diss=object$dissolution.fit$coef,
                             monitor = object$targets,
                             time.slices, time.burnin=0, time.interval=1,
                             control=control.simulate.stergm(),
                             statsonly=time.burnin>0||time.interval>1,
                             stats.form = FALSE,
                             stats.diss = FALSE,
                             verbose=FALSE, 
                             ...)
  ## S3 method for class 'network':
simulate(object, nsim=1, seed=NULL,
                             formation, dissolution,
                             coef.form,coef.diss,
                             monitor = NULL,
                             time.slices, time.burnin=0, time.interval=1,
                             control=control.simulate.stergm(),
                             statsonly=time.burnin>0||time.interval>1,
                             stats.form = FALSE,
                             stats.diss = FALSE,
                             verbose=FALSE,
                             ...)

Arguments

object
an Robject of type stergm giving a model fit or of type network giving the initial network.
formation, dissolution
One-sided ergm-style formulas for the formation and dissolution models, respectively.
nsim
Number of replications (separate chains of networks) of the process to run and return.
seed
Random number integer seed. See set.seed.
coef.form
Parameters for the model from which the post-formation network is drawn.
coef.diss
As coef.form, but for the post-dissolution network.
monitor
Either a one-sided formula specifying one or more terms whose value is to be monitored, or a string containing "formation" or "dissolution", to monitor their respective terms, or "all" to monitor distinct
time.slices
Number of networks or network statistics to return from each replication of the dynamic process. See below for return types.
time.burnin
Number of time steps to discard before starting to collect network statistics. Actual network will only be returned if time.burnin==0.
time.interval
Number of time steps between successive recordings of network statistics. Actual network will only be returned if time.interval==1.
control
A list of control parameters for algorithm tuning. Constructed using control.simulate.stergm or control.simulate.network
statsonly
Logical: If TRUE, return only the network statistics, not the network(s) themselves. Defaults to FALSE if both time.burnin==0 and time.interval==1, and TRUE otherwise.
stats.form, stats.diss
Logical: Whether to return formation/dissolution model statistics. This is not the recommended method: use monitor argument instead.
verbose
Logical: If TRUE, extra information is printed as the Markov chain progresses.
...
Further arguments passed to or used by methods.

Value

  • If nsim>1, If statsonly==TRUE, then if stats.form==FALSE and stats.diss==FALSE, returns an mcmc matrix with monitored statistics, and if either of them is TRUE, returns a list containing elements stats for statistics specified in the monitor argument, and stats.form and stats.diss for the respective formation and dissolution statistics. Finally, if nsim>1, an mcmc.list (or list of them) of the statistics is returned instead.

    If statsonly==FALSE, a networkDynamic object representing the process, with ties present in the initial network having onset -Inf and ties present at the end of the simulation having terminus +Inf. Additionally, attributes (attr, not network attributes) are attached as follows:

  • formation, dissolutionFormation and dissolution formulas used in the simulation, respectively.
  • stats, stats.form, stats.dissNetwork statistics as above.
  • coef.form, coef.dissCoefficients used in the simulation.
  • start, endStart and end times of the simulation.

Details

The dynamic process is run forward and the results are returned.