Statalist The Stata Listserver


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

R�p. : Re: st: Tabout and frequency tables (second try)


From   "Herve STOLOWY" <[email protected]>
To   <[email protected]>
Subject   R�p. : Re: st: Tabout and frequency tables (second try)
Date   Wed, 12 Apr 2006 18:21:23 +0200

Dear Austin:

Thank you for your help. Your second suggestion is the good one.

I would like to have the rows with the same common meanings across tables.

With -tabout-, I get the second table below the first one. My question was about having the second table on the right of the first.

Of course, the first column including the different categories would be common to both tables.

Best regards

Herv�

***********************************************************
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://studies.hec.fr/web/stolowy
>>> [email protected] 11/04/06 20:25 >>>
Herv� --
Do you want something that looks like:

Repair |
Record |
  1978 |  Freq.    Percent    Car type |  Freq.     Percent
-------+-------------------- ----------+---------------------
     1 |      2       2.90    Domestic |     52       70.27
     2 |      8      11.59     Foreign |     22       29.73
     3 |     30      43.48   ----------+---------------------
     4 |     18      26.09       Total |     74      100.00
     5 |     11      15.94
-------+--------------------
 Total |     69     100.00

or do you want the rows to have some common meaning across tables
(e.g. aligning Foreign with 1 and Domestic with 0, so the z-axis, if
you will, has a physical interpretation of some kind)?

If you don't care so much about alignment, you could just
. tab var1, matcell(m1) matrow(r1)
. tab var2, matcell(m2) matrow(r2)
and then use a -file- command with row and col -forv- loops to write
out the matrices.  Formats, etc, could also be added inside the loops.
--Austin

On 4/10/06, Herve STOLOWY <[email protected]> wrote:
> Dear Statalisters:
>
> I sent this e-mail this afternoon but never received it myself. I fear that something wrong happened when I sent it. So, I try again. Sorry if you received it.
>
> I use the -tabout- command (downloadable from ssc) to get two frequency tables (with count and percentage):
>
> tabulate var1
> tabout var1, cells(fcount fper), using filename1, replace
>
> tabulate var2
> tabout var2, cells(fcount fper), using filename1, append
>
> With -tabout-, the second table appears below the first one.
>
> I have then two questions:
>
> - Is there a possibility with -tabout- to get  the two tables side by side?
> - If not, is there another command which could get the desired result (two tables side by side, exported to a tab-delimited file)?
>
> Best regards
>
> Herv� 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