当我尝试从Glmer Poisson模型中提取置信区间和赔率比时,为什么rstudio冻结?
我正在尝试运行混合效果模型。我在下面包括了一个简化的版本;
Poisson1 =
glmer(
formula =
wheezing_InD ~
age_InD +
(1|countryfactor),
family=poisson(link="log"),
data = Data46)
然后,我正在尝试使用以下代码从中获得ORS和置信区间:
exp(cbind(OR = coef(Poisson1), confint(Poisson1)))
数据的示例如下(在dput
表单中):
structure(list(wheezing_InD = c("0", "1", "1", "0", "0",
"0", "0", "0", "1", "0", "0", "0", "0", "1", "0",
"0", "1", "1", "1", "0"), age_InD = c(55L, 24L, 23L,
30L, 40L, 43L, 37L, 38L, 18L, 23L, 28L, 33L, 27L, 54L, 23L, 23L,
42L, 48L, 31L, 18L), countryfactor = structure(c(1L, 1L, 1L,
1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L,
1L), .Label = c("cameroon", "ghana", "kenya"), class = "factor")), row.names = c(NA,
20L), class = "data.frame")
代码运行良好,但是该软件在尝试时会冻结计算置信区间。它被卡在“计算配置文件置信区间...”
上,直到我手动中止代码后才进展。
这种提取ORS + CIS的方法过去对我有用,具有固定的效果二项式模型。有原因在这里不工作吗?
提前致谢
I'm trying to run a mixed effects model. I've included a simplified version of it below;
Poisson1 =
glmer(
formula =
wheezing_InD ~
age_InD +
(1|countryfactor),
family=poisson(link="log"),
data = Data46)
I am then trying to get the ORs and confidence intervals from it using the code below:
exp(cbind(OR = coef(Poisson1), confint(Poisson1)))
A sample of the data is as follows (in dput
form):
structure(list(wheezing_InD = c("0", "1", "1", "0", "0",
"0", "0", "0", "1", "0", "0", "0", "0", "1", "0",
"0", "1", "1", "1", "0"), age_InD = c(55L, 24L, 23L,
30L, 40L, 43L, 37L, 38L, 18L, 23L, 28L, 33L, 27L, 54L, 23L, 23L,
42L, 48L, 31L, 18L), countryfactor = structure(c(1L, 1L, 1L,
1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L,
1L), .Label = c("cameroon", "ghana", "kenya"), class = "factor")), row.names = c(NA,
20L), class = "data.frame")
The code runs fine, but the software freezes when trying to compute the confidence intervals. It gets stuck at "Computing profile confidence intervals ..."
and won't progress until I manually abort the code.
This method of extracting ORs + CIs has worked for me in the past with fixed effects binomial models. Is there a reason it isn't working here?
Thanks in advance
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论