向后选择GLM不会改变完整的模型

发布于 2025-02-09 17:54:48 字数 956 浏览 0 评论 0原文

我是与GLM合作的新手。我有一个具有分类(因素)和数值预测变量的数据集,并且响应变量是计数数据,而数据是泊松分布的。我将这些放入GLM中:

glm2< - glm(配方= count〜盐度 +盐度 +周期 +强度 + depth + temp + temp +治疗,data = dfglm,family =“ poisson”)

治疗(1.1-3.6 )和周期(上午/中午)是因素。

输出看起来像这样:

“输出glm”

我已经在此输出中看到了多个令人惊讶的事物(无效和残留偏差之间的差异很大,治疗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:

output glm

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:

enter image description here

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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文