【发布时间】:2016-11-28 09:07:24
【问题描述】:
我已经考虑了 2 x 2 的表格,数据是关于学生跑步前后的脉搏率。我针对 PulseBefore 和 PulseAfter 考虑了 Ran(是/否)并制作了一个列联表。我拟合了一个泊松对数线性模型,得到了这样的输出。
inde<-glm(dat$Ran1~dat$Pulse1+dat$Pulse2,family=poisson)
inde
Call: glm(formula = dat$Ran1 ~ dat$Pulse1 + dat$Pulse2, family = poisson)
Coefficients:
(Intercept) dat$Pulse1 dat$Pulse2
-2.09795 -0.02745 0.02968
Degrees of Freedom: 108 Total (i.e. Null); 106 Residual
Null Deviance: 79.37
Residual Deviance: 37.21 AIC: 135.2
这是正确的吗?
【问题讨论】:
-
也许将脉搏率 2 预测为脉搏率 1 的函数加上脉率 1 与他们是否跑步的相互作用 - 例如。 (
glm(Pulse2 ~ Pulse1+ Pulse1:Ran1, data=at, family = poisson)) -
@Marc in the box 如果我考虑这个模型,那么我的列联表会是什么样子?如何识别行列效应模型?
标签: r model-fitting