Statalist


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

st: AW: -tabulate- and ratio "number of 1/number of 0"


From   "Martin Weiss" <[email protected]>
To   <[email protected]>
Subject   st: AW: -tabulate- and ratio "number of 1/number of 0"
Date   Wed, 6 Feb 2008 12:36:30 +0100

Well, the ratio is easily obtained with the -ratio- command, and if you do need it in the table, you might have to resort to -tabdisp- and construct the table by hand (which is not as difficult as it first sounds...) :-)

Martin Weiss
_________________________________________________________________

Diplom-Kaufmann Martin Weiss
Mohlstrasse 36
Room 415
72074 Tuebingen
Germany

Fon: 0049-7071-2978184

Home: http://www.wiwi.uni-tuebingen.de/cms/index.php?id=1130

Publications: http://www.wiwi.uni-tuebingen.de/cms/index.php?id=1131

SSRN: http://papers.ssrn.com/sol3/cf_dev/AbsByAuth.cfm?per_id=669945

-----Ursprüngliche Nachricht-----
Von: [email protected] [mailto:[email protected]] Im Auftrag von Herve STOLOWY
Gesendet: Mittwoch, 6. Februar 2008 12:25
An: [email protected]
Betreff: st: -tabulate- and ratio "number of 1/number of 0"

Dear Statalisters:

I have a dummy variable "small_profit" and use the -tabulate- command
for several countries (see output excerpt below).

bysort country: tabulate small_profit

-------------------------------------------------------------------------------------------------------------------
-> country = AUS

small_profi |
          t |      Freq.     Percent        Cum.
------------+-----------------------------------
          0 |      2,651       56.52       56.52
          1 |      2,039       43.48      100.00
------------+-----------------------------------
      Total |      4,690      100.00

I am looking for a way to get the ratio: number of "1"/number of "0".

I read the help of -tabulate- and -table- but did not find a solution. 

Would you have any thoughts?

Best regards

Hervé Stolowy

***********************************************************
Professeur/Professor
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
mail: stolowy at hec dot fr
web: http://www.hec.fr/stolowy
*
*   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