Jun Xu
>
> I have a question related to display format. I used corr
> to create a
> covariance matrix and the (1,1) element is 4.9e+06. But
> what I really want
> is 4912345.2. Any input about how to control the print-out
> format. I tried
> format command, but it looks like "format" is not related
> to the print-out
> format. Thanks a lot.
>
> ***************************************************
> popden hsnggrow rent
> --------+---------------------------
> popden | 4.9e+06
> hsnggrow| -17692.8 372.679
> rent | 14278.8 329.134 1249.86
>
> **************************************************
>
Arguably, the format of any single variable is
of limited relevance to a covariance, and even
less to a correlation, which is of course a pure
number with no units. In any case, if there were
a rule that the format of a variable should be
applied to the results of -correlate-, how
would they applied when several variables
are concerned?
However, there is a simple solution.
You could just calculate the covariance
matrix directly and use -matrix list, format()-
on the result.
Some possibilities (for details, use -findit-):
-matcorr-
-corrmat-
-matrixof-
Of those, the last is the most general.
Nick
[email protected]
*
* For searches and help try:
* http://www.stata.com/support/faqs/res/findit.html
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/