在 R 中绘制数据集的 CDF?

发布于 2024-11-15 09:10:45 字数 250 浏览 2 评论 0原文

我不太确定 CDF(累积分布函数)和 ECDF(经验累积分布函数)之间的区别,但我通常使用 CDF 图来观察我的数据。

我最近一直在使用 R,并且拼命地想找出如何绘制我的数据的 CDF 和 CCDF(互补 CDF)。我所能找到的只是 R 有 ecdf 但我不确定这是否是我正在寻找的。绘制 ECDF 非常简单:

plot.ecdf(data)

有谁知道如何使用 R 绘制数据集的 CDF 和 CCDF?

I am not really sure about the difference between CDF (Cumulative Distribution Function) and ECDF (Empirical Cumulative Distribution Function) but I usually utilize a CDF plot to make observations about my data.

I have been using R recently and am desperately trying to find out how to plot a CDF and CCDF (Complementary CDF) of my data. All I could find was that R has ecdf but am not really sure if this is what I am looking for. Plotting an ECDF is as simple as:

plot.ecdf(data)

Does anyone know how to plot a CDF and CCDF of a dataset using R?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

╭ゆ眷念 2024-11-22 09:10:45

当您知道或假设分布时,CDF 通常需要封闭形式。另一方面,ECDF 是“经验性的”,因为它来自您的数据。我刚刚回答了有关使用 ecdf()HmiscEcdf() 在这里 前几天

更一般地说,您可以使用术语在此处进行搜索,例如

 [r] ecdf

在搜索框中查找 R 标签内的“ecdf”。在 rseek.org 上,几乎没有出现“ccdf”的情况。这可能与减去 ECDF 相同吗?如果是这样,Hmisc 中的Ecdf() 就可以做到。

我希望这会有所帮助,如果没有,请重新表述您的问题,因为尚不清楚您到底在寻找什么。 ecdf()Ecdf() 都非常有功能,因此请务必阅读它们的帮助页面。

A CDF commonly requires closed form when you know or assume a distribution. An ECDF, on the other hand, is 'empiricial' as it comes from your data. I just answered a question about using ecdf() and Hmisc's Ecdf() here the other day.

More generally, you can search here using terms such as

 [r] ecdf

in the search box to look for 'ecdf' within the R tag. At rseek.org, little comes up for 'ccdf'. Is that maybe just the same as one minus the ECDF? If so, Ecdf() in Hmisc can do it.

I hope this helps, if not please re-phrase your question as it is not quite clear exactly what you are looking for. Both ecdf() and Ecdf() are pretty featureful so make sure to read their help pages.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文