我正在尝试将 Spearman 相关矩阵导出到rtf
或 Excel 文件使用estpost
和社区贡献的命令esttab
.
但是,我收到以下错误:
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
The 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
---------------------------------------------------
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)