Announcement

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

  • calculating Z-score

    Dear Statalist,

    Can anyone help me to calculate WAZ, HAZ and WHZ scores using the "zscore06" command using the below example data. here age in MONTH. Thank you so much in advance!

    clear
    input double ID double age double weight double height
    1 47 13.2 93.5
    2 49 19.5 103.4
    3 6 7.2 64.3
    4 31 10.7 84.5
    5 7 6.5 64
    6 38 12 91.3
    end

  • #2
    Don't you also need gender? And possibly some other variables? When I try to use zscore06 I get

    Code:
    . zscore06, a(age) w(weight) h(height)
    option s() required
    r(198);
    -------------------------------------------
    Richard Williams
    Professor Emeritus of Sociology
    University of Notre Dame
    StataNow Version: 19.5 MP (2 processor)

    EMAIL: [email protected]
    WWW: https://academicweb.nd.edu/~rwilliam/

    Comment


    • #3
      I just made up a gender variable. So is this what you want? It seems very straightforward but I am otherwise not familiar with the program or method.

      Code:
      clear all
      input double ID double age double weight double height double sex
      1 47 13.2 93.5 1
      2 49 19.5 103.4 2
      3 6 7.2 64.3 1
      4 31 10.7 84.5 2
      5 7 6.5 64 1
      6 38 12 91.3 2
      end
      
      zscore06, a(age) w(weight) h(height) s(sex)
      list
      Code:
      . zscore06, a(age) w(weight) h(height) s(sex)
      
      Z-scores (haz06, waz06, bmiz06 and whz06) succesfully calculated
      *** note 1: 99 indicates that height, weight or age were out of the reference value range
      *** note 2: no zscores are calculated for children with missing age
      
      . list
      
           +-------------------------------------------------------------------+
           | ID   age   weight   height   sex   haz06   waz06   whz06   bmiz06 |
           |-------------------------------------------------------------------|
        1. |  1    47     13.2     93.5     1   -2.23   -1.62    -.47      -.2 |
        2. |  2    49     19.5    103.4     2     .02    1.27    1.91     1.84 |
        3. |  3     6      7.2     64.3     1   -1.56    -.89     .17      .05 |
        4. |  4    31     10.7     84.5     2   -1.94   -1.53    -.59     -.41 |
        5. |  5     7      6.5       64     1   -2.38   -2.21    -.96    -1.09 |
           |-------------------------------------------------------------------|
        6. |  6    38       12     91.3     2   -1.32   -1.34    -.88     -.77 |
           +-------------------------------------------------------------------+
      -------------------------------------------
      Richard Williams
      Professor Emeritus of Sociology
      University of Notre Dame
      StataNow Version: 19.5 MP (2 processor)

      EMAIL: [email protected]
      WWW: https://academicweb.nd.edu/~rwilliam/

      Comment


      • #4
        Dear William,
        Thank you so much for the help.

        Just to know whether any other ways/methods of calculating Z-scores in STATA!

        Thank you,
        Rumana

        Comment


        • #5
          Depends on what you mean by z scores. zscore06 is doing something fairly specialized. If you want something more conventional, try

          ssc describe center

          You can also do it with the std function of egen.
          -------------------------------------------
          Richard Williams
          Professor Emeritus of Sociology
          University of Notre Dame
          StataNow Version: 19.5 MP (2 processor)

          EMAIL: [email protected]
          WWW: https://academicweb.nd.edu/~rwilliam/

          Comment


          • #6
            Hi, i am also using the zscore06 to calculate the HAZ, BMIZ, WHZ, but my children's age is in years not in months, as I used the China health and nutrition survey, they are not available in months, so what command can I use to calculate the scores? hope to get your reply, thank you in advance.

            Comment

            Working...
            X