向后选择GLM不会改变完整的模型
我是与GLM合作的新手。我有一个具有分类(因素)和数值预测变量的数据集,并且响应变量是计数数据,而数据是泊松分布的。我将这些放入GLM中:
glm2< - glm(配方= count〜盐度 +盐度 +周期 +强度 + depth + temp + temp +治疗,data = dfglm,family =“ poisson”)
治疗(1.1-3.6 )和周期(上午/中午)是因素。
输出看起来像这样:
我已经在此输出中看到了多个令人惊讶的事物(无效和残留偏差之间的差异很大,治疗1.1未显示,周期早晨和中午未显示为单独的水平,非常非常高标准错误),但我现在将继续。
对于向后的选择,我使用了此代码:
backward<-step(glm2,direction="backward",trace=0)
summary(backward)
我获得的输出与上面的输出完全相同。同样,当检查向后$系数
时,所有系数都保留。
最后我尝试了一下:
如果有人可以给我建议/解释此输出以及如何通过工作后的选择来制作更好的模型,那将是非常感谢的!
I am very new to working with GLM. I have a dataset with categorical (as factors) and numerical predictor variables and the response variable is count data wiht a poisson distribution. These I put in a glm:
glm2<- glm(formula = count ~ Salinity + Period + Intensity + Depth + Temp + Treatment, data = dfglm, family = "poisson")
Treatment(1.1 - 3.6) and Period (morning/midday) are factors.
The output looks like this:
I already see multiple suprising things in this output (very big difference between the null-deviance and residual deviance, treatment 1.1 not showing, period morning and midday not shown as separate levels, very high standard errors) but I will continue for now.
For the backward selection I used this code:
backward<-step(glm2,direction="backward",trace=0)
summary(backward)
I got exactly the same output as given above. Also when checking backward$coefficients
, all coefficients remained.
Lastly I tried this:
If anyone could give me advice/an interpretation of this output and how to make a better model with a working backward selection, it is greatly appreciated!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

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