在进行多节点(上百节点)且多变量拟合时,进行mcmc模拟时,运行速度会变得很长(数小时)。有什么办法可以优化一下模型,缩短运行时间。
modelm2 <- mtergm(tpf ~ edges + mutual + ttriple + ctriple + delrecip + istar(3) + ostar(3) +
gwesp(decay = 0.25, fixed = TRUE) + gwdsp(decay = 0.25, fixed = TRUE) +
nodeicov("idegsqrttpf") + nodeocov("odegsqrttpf") + nodecov("tpfout") + nodecov("tpfinn") +
memory(type = "stability") + timecov(transform = function(t) t),
control=control.ergm(MCMC.samplesize = 1000,
MCMC.interval = 500,
parallel = 8,
parallel.type = "PSOCK" ) )
相似问题