楼主: hlfjacky
5011 5

[面板数据求助] 怎么让相关系数矩阵显示右上角数值 [推广有奖]

  • 2关注
  • 0粉丝

大专生

83%

还不是VIP/贵宾

-

威望
0
论坛币
861 个
通用积分
0
学术水平
0 点
热心指数
0 点
信用等级
0 点
经验
660 点
帖子
80
精华
0
在线时间
25 小时
注册时间
2013-1-13
最后登录
2020-4-21

+2 论坛币
k人 参与回答

经管之家送您一份

应届毕业生专属福利!

求职就业群
赵安豆老师微信:zhaoandou666

经管之家联合CDA

送您一个全额奖学金名额~ !

感谢您参与论坛问题回答

经管之家送您两个论坛币!

+2 论坛币
在用STATA做相关系数矩阵时(correlate),怎么让对角线右上角的数值也显示出来?正常情况下结果只显示左下角的值,我想同时让右上角的对称值也显示出来。哪位能给点提示?谢谢了!
  a b c d e
a   1
b   k   1
c   k k 1
d   k   k    k   1
e   k   k    k   k    1

二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

关键词:相关系数矩阵 相关系数 右上角 correlate Stata 对角线

沙发
jjjj6666 发表于 2014-1-27 06:15:43 |只看作者 |坛友微信交流群
why need to?  It's symmetric.   If you do need, you have to put the corr into matrix, so after running corr, using

mat C=r(C)
mat list C, coha
已有 1 人评分论坛币 学术水平 热心指数 收起 理由
SpencerMeng + 10 + 1 + 1 精彩帖子

总评分: 论坛币 + 10  学术水平 + 1  热心指数 + 1   查看全部评分

使用道具

藤椅
hlfjacky 发表于 2014-2-3 02:11:16 |只看作者 |坛友微信交流群
jjjj6666 发表于 2014-1-27 06:15
why need to?  It's symmetric.   If you do need, you have to put the corr into matrix, so after runni ...
Many thanks! I will try to see how far I can get.
well, in my project, I have to calculate each company's average pairwise correlation with other companies, so it would be very helpful (I think) if the result can show the right upper corner's symmetric values, since I don't know much about stata. Again, appreciate your kindly help.

使用道具

板凳
jjjj6666 发表于 2014-2-3 04:50:42 |只看作者 |坛友微信交流群
you are welcome, thanks!

使用道具

报纸
chyiping520 发表于 2015-2-6 02:45:42 |只看作者 |坛友微信交流群
Having the same problem after probably a year ago,
mat list C,coha,i found that coha is not a permitted commnad of matrix command.
in Stata12 the right way to do is
mat list C ,nohalf
it would show full correlation matrix for you.

使用道具

地板
s.hsiao 发表于 2015-11-28 09:25:49 |只看作者 |坛友微信交流群
@chyiping520  正解, cohalf应该是打错了,确实得用nohalf

使用道具

您需要登录后才可以回帖 登录 | 我要注册

本版微信群
加好友,备注jltj
拉您入交流群

京ICP备16021002-2号 京B2-20170662号 京公网安备 11010802022788号 论坛法律顾问:王进律师 知识产权保护声明   免责及隐私声明

GMT+8, 2024-5-12 05:45