R中散点图标准差的计算
我使用 R 与代表 x=y 对角线的线(使用 abline)结合创建了两个向量的散点图。我希望计算点与对角线的标准偏差,并对第一和第三分位数之间找到的区域进行着色。
我不知道该怎么做,非常感谢所有帮助! 提前致谢。 朝觐。
I have created a scatter plot of two vectors, using R, combined with a line (using abline) which represents the x=y diagonal. I wish to calculate the standard deviation of the dots from the diagonal, and color the area which is found between the first and third quantiles.
I have no idea how to do this, and would appreciate all help!!!
Thanks in advance.
Haj.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
好吧,你想要做的是这样的:
我会做的是这样的:
你想要计算的标准偏差是
你可能正在寻找的正确度量是:
你应该根据 y 的线性模型来思考x 以获得任何有意义的结果,除非您有充分的理由不这样做。如果 x 和 y 之间的关系不是 1 on 1,那么假设正确的模型是没有意义的。如果 x 与 y 的关系不是 1 on 1,则 yx 将不是正态分布,因此 sd 将难以以有意义的方式解释。
Well, what you want to do is this :
What I would do is this :
The standard deviation you'd like to calculate is
The correct measure you're probably looking for is:
You should think in terms of a linear model of y on x to get any meaningful result, unless you have very good reasons not to do so. If the relation between x and y is not 1 on 1, then assuming the correct model is so won't make sense. And if the relation of x on y is not 1 on 1, y-x will not be normally distributed and hence the sd will be difficult to interprete in a meaningful way.