Stata 中的偏度
我尝试了许多不同的 sktest 组合,但遗憾的是没有任何效果。
我几乎可以肯定 sktest
可以与 by
组合一起使用,但事实并非如此。
问题是:我有二进制数据gender
(男性 0 和女性 1),我想测量变量 returns
中每个数据(男性和女性)的回报偏度。你能建议一下吗?
我希望得到与我们运行时得到的结果类似的结果,例如按性别:汇总返回
I have tried many different combinations of sktest
and sadly nothing works.
I was almost certain that sktest
will work with by
combination but it doesn't.
The issue is: I have binary data gender
(male 0 and female 1) and I want to measure the skewness of returns for each (male and female) in the variable returns
. Can you please advise?
I was hoping for a result similar to what we get when we run e.g. by gender: summarize returns
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
不同的问题在这里捆绑在一起。
测试
如果您想为不同的组运行
sktest
,您可以重复该命令或编写自己的包装程序来执行相同的操作。
sktest
本质上显示 P 值,但不显示汇总度量。或者执行如下操作:
测量
如果您想查看(基于时刻的)偏斜测量,您只需重复
总结
SSC 上已经提供了更具选择性的包装器。
。
警告
Stata 使用一个估计器来计算基于矩的偏度。还有其他的。
测量偏度的方法有很多。 本文第 7 节中提到的其他内容并非完整列表;也许最重要的遗漏是 L 偏度(参见 SSC 的
lmoments
)。Different questions are bundled together here.
Testing
If you want to run
sktest
for different groups, you can just repeat the commandor write your own wrapper program to do the same.
sktest
in essence shows P-values but no summary measures.Or do something like this:
Measuring
If you want to see (moment-based) skewmess measures, you can just repeat
summarize
A wrapper is already available on SSC that is more selective.
.
Warnings
Stata uses one estimator for moment-based skewness. There are others.
There are many ways to measure skewness. Those others mentioned in Section 7 of this paper are not a complete list; perhaps the most important omission is L-skewness (see
lmoments
from SSC).