R线性回归模型的不同摘要结果
这是我的代码:
m1 <- lm(Y ~ dummy, data)
“虚拟”包含12个不同的变量(A1,A2,A3,A4,B1,B2,B2,B3,B4,B4,B5,B6,B6,B7,C)。我们正在使用相同的数据,但得到不同的结果。这是我的mod的摘要:
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept)
a2
a3
a4
b1
b2
b3
b4
b5
b6
b7
c
这是我的队友得到的结果:
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept)
b7
b6
b5
b4
b3
b2
b1
c
a1
a2
a3
从我的角度来看,我的模型是“ A1”作为比较,而另一个模型则将“ A4”作为比较,这就是不同的。
如果我必须获得与队友相同的摘要结果,那么我该怎么办?
Here is my code:
m1 <- lm(Y ~ dummy, data)
The 'dummy' contains 12 distinct variables (a1,a2,a3,a4,b1,b2,b3,b4,b5,b6,b7,c). We are using same data but get different result. Here is the summary of my mod:
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept)
a2
a3
a4
b1
b2
b3
b4
b5
b6
b7
c
Here is the result my teammate got:
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept)
b7
b6
b5
b4
b3
b2
b1
c
a1
a2
a3
From my perspective, my model is making 'a1' as the comparison while the other model is making 'a4' as the comparison and that's the difference.
If I have to get the summary result same as my teammate, what can I do in R ?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

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