ergmx.simulate#
- ergmx.simulate(network, formula, coef, nsim=1, *, constraints=None, bipartite=None, seed=None, output='network', burnin=None, interval=None, triadic_weight=None)[source]#
Simulate networks from an ERGM, starting from
network.- Parameters:
network (
igraph.Graph,networkx.Graph,NetworksorNetSeries) – The starting network, which also provides the vertex attributes. Missing dyads (naedges) start as non-ties and are simulated too. With several networks combined, each simulation is a list of networks, one per network (for a NetSeries, each transition’s current network, given the previous one). For simulating a network over time, seeergmx.simulate_dynamic().formula (
strorterms)coef (
array-likeordict) – Coefficients, in the order of the formula’s parameters or by name, including those of offset terms (and the decays of curved terms).nsim (
int) – Number of networks.constraints (
str, optional) – Sample space constraints, as inergm().bipartite (
strorbool, optional) – For a bipartite network, the vertex attribute with each vertex’s mode, as inergm().output (
{"network", "stats"}) – Return graphs of the same kind asnetwork(lists of them, with combined networks), or annsim x statisticsarray of their statistics.burnin (
int, optional) – MCMC proposals before the first network and between networks. Default to ergm’s 16384 and 1024.interval (
int, optional) – MCMC proposals before the first network and between networks. Default to ergm’s 16384 and 1024.triadic_weight (
float, optional) – Share of MCMC proposals that close or open a triangle. Defaults to 0.5 for models with triangle or shared partner terms, 0 otherwise.