GLM使用波斯语

问题描述

我正在尝试使用高斯函数对某些物种数据运行GLM。

首先,我想知道是否设置正确,其次,我可以借助一些帮助来理解此结果,最后,有一种快速简便的方法可以在不同物种上运行此方法,而无需重新编写所有代码?我曾尝试研究“ lapply”和“ sapply”功能,但我还不太了解如何设置它。

在此先感谢您的帮助!

我有这个数据

https://drive.google.com/file/d/1bFzb-zj3L1XmOSkDAG0Vbis-VbK2GcI_/view?usp=sharing

我使用了这段代码

#Zone B
glm.full.pos = glm(log.cpuE~Month +Salinity +Temperature +discharge.x,data=pinfish_B_pos,family=gaussian)
glm.base.pos = glm(log.cpuE~Month,family=gaussian)

#step to simplify model and get appropriate order
glm.step.pos = step(glm.base.pos,scope=list(upper=glm.full.pos,lower=~Month),direction='forward',trace=1,k=log(nrow(pinfish_B_pos)))

#final model - may choose to reduce based on deviance and cutoff in above step
glm.final.pos  = glm.step.pos
print(summary(glm.final.pos))


#plot model
par(mfrow=c(2,2))
plot(glm.final.bin)

当我绘制它时得到这个

enter image description here

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)