首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >如何解决R中ergm模型蒙特卡洛模拟过程中运行时间太长的问题?

如何解决R中ergm模型蒙特卡洛模拟过程中运行时间太长的问题?

提问于 2024-12-12 14:44:27
回答 1关注 1查看 233

在进行多节点(上百节点)且多变量拟合时,进行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" ) )

回答

和开发者交流更多问题细节吧,去 写回答
相关文章

相似问题

相关问答用户
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档