rergm is used to draw from exponential family random network
models in their natural parameterizations.
See ergm for more information on these models.rergm(object, ...)## S3 method for class 'default':
rergm(object,\dots,prob,theta0,n=1,
directed=TRUE,numedges=NULL)
## S3 method for class 'ergm':
rergm(object, \dots, theta0=NULL, n=1,
burnin=1000, interval=1000,
randseed=NULL,
sequential=TRUE, summarizestats=FALSE,
verbose=FALSE)
ergm.
If the number of nodes in the network is given then
Bernoulli networks are drawn.burnin should be set to a fairly large number.sample(10000000, size=1).sequential=TRUE option is useful for dynamic dTRUE, we will print out more information as
we run the program, including (currently) some goodness of fit
statistics.rergm returns an object of class network.series that is a list
consisting of the following elements:prob or theta0. Note that the first network is sampled after burnin + interval
steps, and any subsequent networks are sampled each
interval steps after the first.
More information can be found by looking at the documentation of
ergm.
#
# Let's draw from a Bernoulli model with 16 nodes
# and tie probability 0.1
#
g.use <- rergm(16,prob=0.1,directed=FALSE)
#
data(sampson)
gest <- ergm(samplike ~ latent(k=2))
summary(gest)
#
# Draw from the fitted model
#
g.sim <- rergm(gest,n=100,burnin=1000,interval=1000)
g.simRun the code above in your browser using DataLab