与glm {stats}的Confint()非常非常慢 [英] Confint() with glm {stats} very, very slow

查看:95
本文介绍了与glm {stats}的Confint()非常非常慢的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在最新版本的R中,我无法根据glm计算OR置信区间,但是以前没有这个问题.在 family ="binomial" 的任何glm中,无论模型多么简单,它都可以轻松地提取摘要和exp(coef(model)),但是当我尝试提取 confint() exp(confint(model)),显示正在等待分析完成..."消息,但没有任何反应(我已经等待了到10分钟,然后取消该程序,这在我的机器上通常只需要几秒钟).有什么想法可能会破坏此功能吗?我已经在多个数据集和变量上进行了尝试,结果相同.有什么想法为什么要花这么长时间/没有完成?

I have a problem with calculating OR confidence intervals from a glm in the latest version of R, but I have not had this issue before. With any glm where family="binomial", no matter how simple the model is, it will easily allow me to extract the summary and exp(coef(model)), however when I try to extract the confint() or exp(confint(model)), the "Waiting for profiling to be done..." message is displayed and nothing happens (I've waited up to 10 mins then cancelled the procedure, this usually takes only seconds on my machine). Any ideas what might be tripping this function up? I've tried it on multiple datasets and variables, with the same result. Any ideas why it is taking so long/failing to finish?

推荐答案

由于某些未知原因,指定 exp(confint.default(model))可以立即解决此问题.

Well, for some unknown reason, specifying exp(confint.default(model)) leads to instant resolution of this problem.

这篇关于与glm {stats}的Confint()非常非常慢的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆