全部版块 我的主页
论坛 计量经济学与统计论坛 五区 计量经济学与统计软件 Stata专版
5340 5
2014-01-27
在用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

二维码

扫码加我 拉你入群

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

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

全部回复
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
二维码

扫码加我 拉你入群

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

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

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.
二维码

扫码加我 拉你入群

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

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

2014-2-3 04:50:42
you are welcome, thanks!
二维码

扫码加我 拉你入群

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

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

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.
二维码

扫码加我 拉你入群

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

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

2015-11-28 09:25:49
@chyiping520  正解, cohalf应该是打错了,确实得用nohalf
二维码

扫码加我 拉你入群

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

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

相关推荐
栏目导航
热门文章
推荐文章

说点什么

分享

扫码加好友,拉您进群
各岗位、行业、专业交流群