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

Re: st: -Table- output presented horizontally and exported


From   "Herve STOLOWY" <[email protected]>
To   <[email protected]>
Subject   Re: st: -Table- output presented horizontally and exported
Date   Thu, 03 Nov 2005 16:16:06 +0100

Dear Svend:

Thank you for your reply. I tried -tabm- and I get the correct output. However, do you know if there is easy way to produce a tab-delimited file based on -tabm-?

If not, I will use the solution proposed by Jean.

Best regards

Herve
***********************************************************
Professeur/Professor
Coordinateur du D�partement/Head of Department
HEC Paris
D�partement Comptabilit� Contr�le de gestion / Dept of Accounting and Management Control
1, rue de la Liberation
78351 - Jouy-en-Josas
France
Tel: +33 1 39 67 94 42 - Fax: +33 1 39 67 70 86
[email protected]
http://campus.hec.fr/profs/stolowy/perso/home.htm
>>> [email protected] 11/03/05 3:07 PM >>>
Herv=E9 Stolowy wrote:

I have a basic stat on a dummy variable with -table-:

table auditor_d

-------------------------
       Auditor |      Freq.
-------------+-----------
Non-Big four |         43
      Big four |        156

I don't find a way to have the results presented horizontally (in a row) an=
d not vertically.
If this is possible, I would like then to export the results in a tab-delim=
ited file.
=2E..
(The origin of my question is that I have in reality several dummy variable=
s and I would like to have those variables in lines and the output in two c=
olumns).

------------------------------------------------------

Nick Cox wrote (among other things) -tabm-; I think it does what you want. =
I start creating an artifical dataset with five dummy variables:

    clear
    set obs 100
    foreach V of newlist v1-v5 {
       gen `V' =3D uniform()>0.5
    }

    tabm v1-v5

             |        Values
    Variable |         0          1 |     Total
-----------+----------------------+----------
          v1 |        54         46 |       100
          v2 |        44         56 |       100
          v3 |        53         47 |       100
          v4 |        58         42 |       100
          v5 |        37         63 |       100
-----------+----------------------+----------
       Total |       246        254 |       500

-tabm- is part of the tab_chi package at SSC:
    ssc install tab_chi

Best,
Svend

__________________________________________

Svend Juul
Institut for Folkesundhed, Afdeling for Epidemiologi
(Institute of Public Health, Department of Epidemiology)
Vennelyst Boulevard 6
DK-8000  Aarhus C, Denmark
Phone: +45 8942 6090
Home:  +45 8693 7796
Email: [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/


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