我正在创建多个泊松回归,每个模型都有不同的结果。在这个与其他人没有区别的特殊结果(所有二进制,无论是0还是1)上,我都会遇到这个我从未见过的奇怪错误。GLM中的奇怪错误
mix_1<- glm(count~ offset(log(time)) + age + gender, data=x[x$diagnosis=="match",], family=poisson)
glm模型没有问题,我没有按预期工作。尝试执行cbind和指数化系数时收到错误。
mix_2 <- cbind(exp(coef(mix_1)), exp(confint(mix_1)))
这是我的错误:
Waiting for profiling to be done...
Error in glm.fit(x = Xi, y = Y, weights = W, etastart = LP, offset = o, :
NA/NaN/Inf in 'x'
warning
Warning messages:
1: glm.fit: fitted rates numerically 0 occurred
我没有想到的是数据的一个子集将为这个问题是必要的,所以我没有提供一个。但如果我真的不需要,只需告诉我,我将创建一个子集。
所有帮助非常感谢!