Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: RE: display format


From   "Nick Cox" <[email protected]>
To   <[email protected]>
Subject   st: RE: display format
Date   Thu, 23 Jan 2003 17:19:17 -0000

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/



© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index