使用直方图的分类数据

发布于 2025-01-11 06:00:09 字数 359 浏览 3 评论 0原文

在其他地方找不到答案。

背景:

我有来自商业动态调查的数据,这是一个按公司特征汇总公司信息的数据集。我正在尝试估算公司规模分布。 现在,该数据包含 10 个企业规模类别、该类别中相应的企业数量以及就业水平。示例:

在此处输入图像描述

对于我的一生,我无法弄清楚如何将其转换为直方图来执行内核估计。快速查看文档并没有产生任何有用的信息,因为老实说,我真的不知道我在寻找什么。也许有人可以指出我正确的方向?

Couldn't find the answer elsewhere.

Background:

I have data from the Business Dynamics Survey, a dataset that aggregates information on firms by firms' characteristics. I am trying to approximate the firms size distribution.
Now, the data features 10 firm size categories, the corresponding amount of firms in that category, and the level of employment. Sample:

enter image description here

For the life of me I can't figure out how to transform that into an histogram to perform a kernel estimation. A quick look to the docs didn't yield any useful info, because honestly I don't really know what I am looking for. Maybe someone can point me in the right direction?

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

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

发布评论

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

评论(1

柳絮泡泡 2025-01-18 06:00:09

你好,来到这里的未来互联网人。两种类似的方法来处理它。或者

sns.displot(x=list(df.fsize), weights=list(df.firms), discrete=True)

sns.catplot(x='fsize', y = 'firms', kind = "point",data = df).

为了更好地描述潜在密度,我正在关注这篇论文
https://journals.sagepub.com/doi/full/10.1177/0081175018782579# _i11

好祝你旅途愉快!

Hello future internet person who's landed here. Two similar ways to approach it. Either

sns.displot(x=list(df.fsize), weights=list(df.firms), discrete=True)

Or

sns.catplot(x='fsize', y = 'firms', kind = "point",data = df).

To better characterize the underlying density I'm following this paper:
https://journals.sagepub.com/doi/full/10.1177/0081175018782579#_i11

Good luck on your journey!

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