Statalist


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

st: logout for twoway tabulate


From   Falco Möller <[email protected]>
To   [email protected]
Subject   st: logout for twoway tabulate
Date   Fri, 02 Oct 2009 17:23:50 +0200

Dear statalist,

after a long search through all the different possibillities to get
stata sum and tab outputs into latex and excel I finally found the
logout command.

It works great for tabulate twoway without percentages. But including
column percentages leads to a percentage line that is shifted to the
left. In other words, the command misinterprets the blank field below
the variable label.


webuse dose, clear

logout, clear: tab dose function, col

            |             Function
     Dosage |    < 1 hr     1 to 4         4+ |     Total
-----------+---------------------------------+----------
      1/day |        20         10          2 |        32
            |     43.48      26.32      16.67 |     33.33
-----------+---------------------------------+----------
      2/day |        16         12          4 |        32
            |     34.78      31.58      33.33 |     33.33
-----------+---------------------------------+----------
      3/day |        10         16          6 |        32
            |     21.74      42.11      50.00 |     33.33
-----------+---------------------------------+----------
      Total |        46         38         12 |        96
            |    100.00     100.00     100.00 |    100.00


logout, save(C:\mytable) tex excel replace

I also experimented with the tabout command, but did not find a
possibillity to save an output in excel or tex as shown above.

Thanks in advance
Falco

*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   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