【发布时间】:2021-03-13 22:36:39
【问题描述】:
如何在 MICE 的池化 GLM 上使用 simulate 函数?
我在对象miceData 中有我的MICE 估算数据。根据这些数据,我制作了这样的模型:
form3 <- survived ~ sex + age * pclass - 1
glm3 <- glm.mids(data=miceData, form3, family = binomial(link=logit))
glm_pooled <- pool(glm3)
我现在以以下等价方式模拟来自该模型的数据:
form3 <- survived ~ sex + age * pclass - 1
glm3_ref <- glm(form3, family = binomial(link=logit), data = titanic)
yNew <- simulate(glm3_ref)[,1]
我该怎么做?
【问题讨论】:
标签: r simulation glm r-mice