如何导出Spearman关联式 [英] How to export Spearman correlations

查看:9
本文介绍了如何导出Spearman关联式的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用estpost社区贡献的命令esttab将Spearman关联矩阵导出为rtf或Excel文件。

但是,我收到以下错误:

invalid subcommand
r(198);

以下是我的代码:

estpost spearman varlists, matrix stats(rho p) star(.05)
estimates store cl

esttab * using corrtable.rtf, b(%6.3f) label alignment(l) unstack not noobs compress replace

推荐答案

spearman命令与estpost不起作用,这就是Stata投诉的原因。

以下内容适用于我:

sysuse auto, clear

spearman price mpg weight
matrix A = r(Rho)

esttab matrix(A, fmt(%5.2f)) using corrtable.rtf

---------------------------------------------------
                        A                          
                    price          mpg       weight
---------------------------------------------------
price                1.00        -0.54         0.49
mpg                 -0.54         1.00        -0.86
weight               0.49        -0.86         1.00
---------------------------------------------------

这篇关于如何导出Spearman关联式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆