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

st: RE: messed up tabulate


From   "Nick Cox" <[email protected]>
To   <[email protected]>
Subject   st: RE: messed up tabulate
Date   Fri, 28 Nov 2003 16:00:51 -0000

Instead of -tabulate-, use -table-. With a set-up 
close to yours, although you may not be using weights, 
I got this by a mixture of peeking inside the code 
and fumbling around: 

. table cataggr ined [iw=freq], row col format(%12.0gc) cellwidth(12)

----------------------------------------------------------
                |                   ined                  
        cataggr |            0             1         Total
----------------+-----------------------------------------
       employed |    1,643,604       171,412     1,815,016
     inactivity |      491,819       173,642       665,461
           lost |      812,882       216,943     1,029,825
   on education |      489,318       307,425       796,743
     on program |      629,950       152,585       782,535
  part-t unempl |      120,828        16,760       137,588
registered empl |      310,365        88,014       398,379
     unemployed |    1,031,164       460,069     1,491,233
              . |    8,577,229     5,562,875    14,140,104
                | 
          Total |   14,107,159     7,149,725    21,256,884
----------------------------------------------------------

The interdependence of -format()- and type of weight 
does not appear to be documented. 

Nick 
[email protected] 

Edwin Leuven
 
> when doing a cross tabulate, stata messes up the display of 
> the numbers by 
> omitting the thousands separator and making the table 
> difficult to read:
> 
>                  |         ined
>          cataggr |         0          1 |     Total
>  ----------------+----------------------+----------
>       unemployed |   1031164    460,069 |   1491233
>    part-t unempl |   120,828     16,760 |   137,588
>       on program |   629,950    152,585 |   782,535
>  registered empl |   310,365     88,014 |   398,379
>         employed |   1643604    171,412 |   1815016
>     on education |   489,318    307,425 |   796,743
>             lost |   812,882    216,943 |   1029825
>       inactivity |   491,819    173,642 |   665,461
>                . |   8577229    5562875 |  14140104
>  ----------------+----------------------+----------
>            Total |  14107159    7149725 |  21256884
> 
> is there a way to make stata behave as it should: in a 
> consistent manner 
> and then preferably with separators everywhere?

*
*   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