Statalist The Stata Listserver


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: an ordinary two-way table


From   "Giovanni Vecchi" <[email protected]>
To   <[email protected]>
Subject   st: an ordinary two-way table
Date   Thu, 10 May 2007 23:42:02 +0200

Dear Statalisters,

I'd like to produce a simple two-way table... but have failed to do
so. To illustrate:

sysuse auto, clear
replace rep78=. if rep78==1

The table that I've been dreaming of during the last hour or so (sic!)
is the following:


    Repair |
    Record |       Car type
      1978 |  Domestic    Foreign |     Total
-----------+----------------------+----------
         1 |         0          0 |         0
         2 |         8          0 |         8 
         3 |        27          3 |        30 
         4 |         9          9 |        18 
         5 |         2          9 |        11 
-----------+----------------------+----------
     Total |        46         21 |        67 


Please note the first row with all zeros...

I've tried with tabcount, tab2way, tabdisp, etc. ... but did not
manage to obtain *exactly* the above table. 

Any suggestions?

Best,

- Giovanni


----------------------------------------------------------
Giovanni VECCHI
Dipartimento di Economia e Istituzioni
Universit� di Roma "Tor Vergata"
Via Columbia, 2
00133 Roma
Italy

voice   + 39 06 7259 5730
fax     + 39 06 2020 500
email   [email protected]
webpage http://www.economia.uniroma2.it/vecchi/
----------------------------------------------------------
 


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