[statnet_help] scaling issue in stergm/EpiModel

Tom Kraft kraft.tom at gmail.com
Fri Jul 24 12:20:03 PDT 2020


Hi all,

I am observing unexpected behavior when scaling up the size of networks
using stergm and functions from the EpiModel package. The problem occurs
using the netest() function. Specifically, I am setting target parameters
that encourage complete homophily across a categorical nodal attribute. But
when I increase the size of the input network keeping the cluster size of
the nodal attribute the same, the resulting model no longer converges and
diagnostics indicate a failure to reproduce the homophily term.

The problem is easily reproduced with the following code:

# works fine

> nw2 <- network.initialize(n = 90, directed=F)

> nw2 %v% "com2" <- c(rep(as.character(c(1:9)), each=10 ))

> fit1 <- netest(nw2, formation = ~edges + nodematch("com2") , target.stats

= c(200, 200), coef.diss = dissolution_coefs(dissolution = ~offset(edges),
duration = c(25)))

> dx1 <- netdx(fit1, nsims = 2, nsteps = 200, nwstats.formula = ~edges +

nodematch("com2"), ncores = 2)

> dx1


# fails

> nw2 <- network.initialize(n = 9000, directed=F)

> nw2 %v% "com2" <- c(rep(as.character(c(1:900)), each=10 ))

> fit2 <- netest(nw2, formation = ~edges + nodematch("com2") , target.stats

= c(20000, 20000), coef.diss = dissolution_coefs(dissolution =
~offset(edges), duration = c(25)))

> dx2 <- netdx(fit2, nsims = 2, nsteps = 200, nwstats.formula = ~edges +

nodematch("com2"), ncores = 2)

> dx2

-----------

Originally I thought this issue might have to do with exceeding the
possible number of links per cluster. In both cases, however, this
shouldn't be an issue: in the examples above with complete homophily the
number of possible links should be
(n_per_group*(n_per_group-1)/2)*(#_groups) = 4050 and 40500, respectively.
The mean target degree is also the same in both (200*2/90 = 20000*2/9000).

I suspect I am missing something obvious here that causes a structural
problem. Any help is greatly appreciated,

Tom

Thomas Kraft
Postdoctoral Scholar
Department of Anthropology
University of California, Santa Barbara
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman13.u.washington.edu/pipermail/statnet_help/attachments/20200724/0445da87/attachment.html>


More information about the statnet_help mailing list