【发布时间】:2020-02-28 09:12:53
【问题描述】:
似乎每当我在使用两列符号的二项式 glm 上使用任何 rsq 包函数(pcor 用于偏相关;rsq 和 rsq.partial 用于 R 平方)时,我得到一个错误 - 见下文。该模型实际上是正确的,拟合完美,没有数据丢失。
有什么我可以做的吗?
可重现的例子:
require(rsq)
data(esoph)
model1 <- glm(cbind(ncases, ncontrols) ~ agegp + tobgp * alcgp,
data = esoph, family = binomial)
pcor(model1)
cbind(ncases, ncontrols) 中的错误:找不到对象“ncases”
rsq(model1)
cbind(ncases, ncontrols) 中的错误:找不到对象“ncases”
rsq.partial(model1)
cbind(ncases, ncontrols) 中的错误:找不到对象“ncases”
【问题讨论】:
标签: r