Announcement

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

  • #31
    The issue is caused by your weighting variable and not an error in the code. Consider:

    Code:
    tab citygnd
    tab citygnd [aw= gweightcorr_n]
    Res.:

    Code:
    . tab citygnd
    
               citygnd |      Freq.     Percent        Cum.
    -------------------+-----------------------------------
      Serekunda Female |         17       17.00       17.00
        Serekunda Male |          5        5.00       22.00
           Tema Female |         34       34.00       56.00
             Tema Male |         11       11.00       67.00
    São Vicente Female |         19       19.00       86.00
      São Vicente Male |         14       14.00      100.00
    -------------------+-----------------------------------
                 Total |        100      100.00
    
    . tab citygnd [aw= gweightcorr_n]
    
               citygnd |      Freq.     Percent        Cum.
    -------------------+-----------------------------------
      Serekunda Female | 14.1887571       14.19       14.19
        Serekunda Male |  7.0866404        7.09       21.28
           Tema Female |29.90662809       29.91       51.18
             Tema Male | 16.8797864       16.88       68.06
    São Vicente Female | 12.9402085       12.94       81.00
      São Vicente Male | 18.9979795       19.00      100.00
    -------------------+-----------------------------------
                 Total |        100      100.00
    Last edited by Andrew Musau; 06 Feb 2025, 04:57.

    Comment


    • #32
      Thank you!
      Do you know if there is a way to have the weight affect the proportions displayed, but not the total observations number?

      Comment


      • #33
        Originally posted by Mariia Chavez View Post
        Thank you!
        Do you know if there is a way to have the weight affect the proportions displayed, but not the total observations number?
        But the proportions are determined by the observation counts, so you cannot independently change one without affecting the other. Since this question was raised by one of the team members, perhaps you could ask them why they need weights in the first place. Are you dealing with complex survey data? If so, you should look at:

        Code:
        help svy_tabulate

        Comment

        Working...
        X