Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Combining categories

    Hi People,

    My question is when can I Combine categories together?

    satisfaction | Freq. Percent Cum.
    ---------------------------+-----------------------------------
    0 not satisfied | 24 0.45 0.45
    1 | 17 0.32 0.76
    2 | 48 0.90 1.66
    3 | 77 1.44 3.10
    4 | 133 2.48 5.58
    5 | 369 6.88 12.46
    6 | 378 7.05 19.51
    7 | 952 17.76 37.27
    8 | 1,989 37.10 74.37
    9 | 824 15.37 89.74
    10 total satisfied| 428 7.98 97.72
    . | 122 2.28 100.00
    ---------------------------+-----------------------------------
    Total | 5,361 100.00
    Is it in the given example because of the small Observation number ok, to put categories 0-3 together as one?


    Job Change Intention (thoughts) | Freq. Percent Cum.
    ------------------------+-----------------------------------
    every day | 80 1.51 1.51
    some times per week | 198 3.71 5.22
    sometimes per month | 446 8.34 13.56
    sometimes per year | 1,178 21.99 35.55
    never | 3,265 60.90 96.46
    . | 197 3.54 100.00
    ------------------------+-----------------------------------
    Total | 5,350 100.00

    is it here ok to put the first two categories together as one because of the Observation number smaller than 100 ?


  • #2
    Hello Seb,

    Welcome to the Stata Forum / Statalist.

    Please take a look at the FAQ.

    There, you will find how to share data and command, among other important information.

    With regards to you first question:

    Code:
    . sysuse auto
    (1978 Automobile Data)
    
    . tab rep78
    
         Repair |
    Record 1978 |      Freq.     Percent        Cum.
    ------------+-----------------------------------
              1 |          2        2.90        2.90
              2 |          8       11.59       14.49
              3 |         30       43.48       57.97
              4 |         18       26.09       84.06
              5 |         11       15.94      100.00
    ------------+-----------------------------------
          Total |         69      100.00
    
    . recode rep78 (1/3 = 1), gen(newrep78)
    (38 differences between rep78 and newrep78)
    
    . tab newrep78
    
      RECODE of |
          rep78 |
        (Repair |
         Record |
          1978) |      Freq.     Percent        Cum.
    ------------+-----------------------------------
              1 |         40       57.97       57.97
              4 |         18       26.09       84.06
              5 |         11       15.94      100.00
    ------------+-----------------------------------
          Total |         69      100.00
    With regards to your second question, yes, in general, but that will depend on the grouping as well as the rationale of the study.
    Last edited by Marcos Almeida; 03 Apr 2017, 04:30.
    Best regards,

    Marcos

    Comment

    Working...
    X