如何在 R 中执行加权二维核密度估计?

发布于 2024-09-28 17:18:56 字数 129 浏览 1 评论 0原文

我想在 R 中生成核密度估计,并且对所有不同的包有些迷惑。我需要能够:

  1. 指定权重
  2. 指定带宽大小
  3. 指定 bin 大小

您会如何处理?代码片段的奖励积分。

I would like to produce a kernel density estimation in R, and am somewhat bamboozled by all the different packages. I need to be able to:

  1. Specify weights
  2. Specify bandwidth size
  3. Specify bin size

How would you go about this? Bonus points for a code snippet.

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

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

发布评论

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

评论(2

盗心人 2024-10-05 17:18:56

另请参阅 ks 包
和里面的漂亮图片
多元核密度估计

See also the ks package
and the nice picture in
Multivariate kernel density estimation.

画离情绘悲伤 2024-10-05 17:18:56

当然还有很多套餐。您应该首先决定您想要哪种 2D 内核估计。在 fields 包中,您有一个函数 smooth.2d,并且您有 Brian Ripley 的精彩包 KernSmooth。您可以在帮助文件中提供额外的代码片段,我不会复制它们。

对于此类问题,还可以尝试 www.rseek.org

Of course there are a number of packages. You should first decide which 2D kernel estimate you want. In the fields package you have a function smooth.2d, and you have the wonderful package of Brian Ripley, KernSmooth. The extra points for the code snippets you can give to the help files, I ain't going to copy them.

For these kind of questions, also try www.rseek.org.

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