将回归线更改为直形状
我实际上是在R.中建立了我的第一个线性回归,我偶然发现了最后一步:您能建议如何将我的垫脚线性回归更改为直线吗?我可以添加简单的可视化命令吗?我写的代码是:
MyDataSet.plot <- MyDataSet.plot +
geom_line(data=plotting.data2,
aes(x=MyXvariable, y=predicted.y, color=MyOtherIndependentVariable),
size=1.25)
MyDataSet.plot
请对我说非常小的r :)谢谢
I'm literally building my first ever linear regression in R. And I stumbled on the very last step: could you advise how to change my stepped linear regression into straight line? Is there simple visualisation command I can add? The code I wrote is:
MyDataSet.plot <- MyDataSet.plot +
geom_line(data=plotting.data2,
aes(x=MyXvariable, y=predicted.y, color=MyOtherIndependentVariable),
size=1.25)
MyDataSet.plot
Please speak very elementary R to me :) Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这个最小的例子是您要实现的目标吗?
在2022-06-30创建的 reprex软件包(v2.0.1)
Is this minimal example what you'd like to achieve?
Created on 2022-06-30 by the reprex package (v2.0.1)