Statalist


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

Re: st: Question about tab1


From   "Sergiy Radyakin" <[email protected]>
To   [email protected]
Subject   Re: st: Question about tab1
Date   Tue, 18 Sep 2007 10:09:52 +0200

Hello Ada,

I could not reproduce your problem with a random data. It seems to be
working as it is supposed to:

. list

     +--------------------+
     | income2   income~d |
     |--------------------|
  1. |       1          0 |
  2. |       2          0 |
  3. |       3          0 |
  4. |       4          0 |
  5. |       5          0 |
     |--------------------|
  6. |       6          1 |
  7. |       7          1 |
  8. |       8          1 |
  9. |       9          1 |
     +--------------------+

. tab1 income2 income2_d

-> tabulation of income2

    income2 |      Freq.     Percent        Cum.
------------+-----------------------------------
          1 |          1       11.11       11.11
          2 |          1       11.11       22.22
          3 |          1       11.11       33.33
          4 |          1       11.11       44.44
          5 |          1       11.11       55.56
          6 |          1       11.11       66.67
          7 |          1       11.11       77.78
          8 |          1       11.11       88.89
          9 |          1       11.11      100.00
------------+-----------------------------------
      Total |          9      100.00

-> tabulation of income2_d

  income2_d |      Freq.     Percent        Cum.
------------+-----------------------------------
          0 |          5       55.56       55.56
          1 |          4       44.44      100.00
------------+-----------------------------------
      Total |          9      100.00

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

The situation that you describe (Stata confusing variables) might be a
result of an str0 bug that I posted here some time ago. It might also
be a result of an improper data conversion using external programs.

It would help if:

1. you specify your Stata version (number, platform etc)
2. you tell us if any other programs were involved into data
processing (e.g. the file is a product of StatTransfer, DBMS Copy,
etc)
3. you try other Stata commands and tell us if the problem relates to
tab1 only, or to other commands as well (e.g. try -regress income2
income2_d-)
4. Do you see your data correctly after -list-, or in the data editor?

Best regards,
   Sergiy Radyakin




On 9/18/07, Ada C. Chen <[email protected]> wrote:
> Hi All,
>
> I have two variables: income2 (categorical) & income2_d (dummy). I ran
>
> tab income2
>
> And this was fine.
>
> However, when I ran
>
> tab1 income2 income2_d
>
> The program ignored income2 and ran income2_d TWICE (It is suppose to
> run income2 once, followed by income2_d). I wonder what happened?
> Please help! Many thanks!
>
> Best,
>
> Ada C. Chen
> *
> *   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