如何使R中的纵向数据制作预期值曲线
我有一个纵向数据,我想在其中制作预期价值曲线。在X轴上,我有时间,在y轴上,我有一个连续的变量。
I have a longitudinal data where I would like to make the expected value curve. In the x-axis I have time and in the y-axis I have a continuous variable.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
没有数据,首先很难重现您的问题,我生成了一些随机数据:
我不确定这是否是您想要的,但是您可以使用此代码使用
geom_smooth
来创建一个预期值曲线: :
Without data it is hard to reproduce your problem first I generated some random data:
I am not sure if this is what you want, but you can use
geom_smooth
to create an expected value curve using this code:Output: