View source: R/simulate.ergm.ego.R
simulate.ergm.ego | R Documentation |
ergm.ego
fit.A wrapper around simulate.formula
to simulate networks
from an ERGM fit using ergm.ego
.
## S3 method for class 'ergm.ego'
simulate(
object,
nsim = 1,
seed = NULL,
constraints = object$constraints,
popsize = if (object$popsize == 1 || object$popsize == 0 || is(object$popsize, "AsIs"))
object$ppopsize else object$popsize,
control = control.simulate.ergm.ego(),
output = c("network", "stats", "edgelist", "pending_update_network", "ergm_state"),
...,
basis = NULL,
verbose = FALSE
)
object |
An |
nsim |
Number of realizations to simulate. |
seed |
Seed value (integer) for the random number generator. See
|
constraints, ... |
Additional arguments passed to |
popsize, basis |
A network size to which to scale the model for
simulation; a |
control |
A |
output |
one of |
verbose |
A logical or an integer to control the amount of
progress and diagnostic information to be printed. |
The ouput has the same format (with the same options) as
simulate.formula
. If output="stats"
is passed, an
additional attribute, "ppopsize"
is set, giving the actual size of
the network reconstructed, when the pop.wt
control parameter is set
to "round"
and "popsize"
is not a multiple of the egocentric
sample size or the sampling weights.
Pavel N. Krivitsky
Pavel N. Krivitsky and Martina Morris (2017). "Inference for social network models from egocentrically sampled data, with application to understanding persistent racial disparities in HIV prevalence in the US." Annals of Applied Statistics, 11(1): 427–455. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1214/16-AOAS1010")}
Pavel N. Krivitsky, Martina Morris, and Michał Bojanowski (2019). "Inference for Exponential-Family Random Graph Models from Egocentrically-Sampled Data with Alter–Alter Relations." NIASRA Working Paper 08-19. https://www.uow.edu.au/niasra/publications/
Pavel N. Krivitsky, Mark S. Handcock, and Martina Morris (2011). "Adjusting for Network Size and Composition Effects in Exponential-Family Random Graph Models." Statistical Methodology, 8(4): 319–339. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1016/j.stamet.2011.01.005")}
simulate.formula
,
simulate.ergm
data(faux.mesa.high)
data(fmhfit)
colMeans(egosim <- simulate(fmhfit, popsize=300,nsim=50,
output="stats", control=control.simulate.ergm.ego(
simulate=control.simulate.formula(MCMC.burnin=2e6))))
colMeans(egosim)/attr(egosim,"ppopsize")*network.size(faux.mesa.high)
summary(faux.mesa.high~edges+degree(0:3)+nodefactor("Race")+nodematch("Race")
+nodefactor("Sex")+nodematch("Sex")+absdiff("Grade"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.