However I like using Ben Jann's -esttab- for its superior formatting abilities.
Unfortunately it seems that it is not possible to export a covariance matrix using -esttab-.
Ben Jann might consider extending his command -estpost correlate- to accommodate the export of covariance matrices.
So when I export correlation matrix, everything works fine:
Code:
. sysuse auto, clear
(1978 Automobile Data)
. correlate price mpg headroom
(obs=74)
| price mpg headroom
-------------+---------------------------
price | 1.0000
mpg | -0.4686 1.0000
headroom | 0.1145 -0.4138 1.0000
. qui estpost correlate price mpg headroom, matrix
. eststo correlations
. esttab correlations using TEMPcorrelations.csv, unstack compress b(2)
(output written to TEMPcorrelations.csv)Code:
. correlate price mpg headroom, cov
(obs=74)
| price mpg headroom
-------------+---------------------------
price | 8.7e+06
mpg | -7996.28 33.472
headroom | 285.721 -2.02536 .715707
. qui estpost correlate price mpg headroom, matrix cov
option cov not allowed
r(198);
0 Response to Export covariance matrix using esttab : Is it really impossible?
Post a Comment