Announcement

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

  • BMI calculation

    Hello,

    I have a question regarding the calculation of BMI. I have in my data set the variables weight and height but when i calculate the BMI i get the wrong outcomes (big percentage underweight people for example). My question is, what am i doing wrong? Do i need to generate new variables for weight or height or something like that?

    Thank you very much in advance!

    The variable height (var452) is devided as follows:

    Code:
      Lengte in cm |      Freq.     Percent        Cum.
    ---------------+-----------------------------------
                 5 |          1        0.01        0.01
                 6 |          1        0.01        0.02
         tot 52 cm |          1        0.01        0.02
          58-62 cm |          1        0.01        0.03
          63-67 cm |          1        0.01        0.04
          68-72 cm |         10        0.08        0.12
          73-77 cm |          7        0.05        0.17
          78-82 cm |          1        0.01        0.18
          83-87 cm |          1        0.01        0.19
          88-92 cm |          3        0.02        0.21
          93-97 cm |          1        0.01        0.22
         98-102 cm |          6        0.05        0.27
        103-107 cm |         43        0.34        0.60
        108-112 cm |        187        1.47        2.07
        113-117 cm |        550        4.32        6.39
        118-122 cm |        940        7.38       13.77
        123-127 cm |      1,274       10.00       23.77
        128-132 cm |      1,035        8.12       31.89
        133-137 cm |      1,048        8.23       40.11
        138-142 cm |        757        5.94       46.06
        143-147 cm |        313        2.46       48.51
        148-152 cm |        201        1.58       50.09
        153-157 cm |        212        1.66       51.75
        158-162 cm |        595        4.67       56.42
        163-167 cm |        903        7.09       63.51
        168-172 cm |      1,361       10.68       74.19
        173-177 cm |      1,001        7.86       82.05
        178-182 cm |      1,014        7.96       90.01
        183-187 cm |        725        5.69       95.70
        188-192 cm |        309        2.43       98.12
        193-197 cm |        129        1.01       99.14
        198-202 cm |         30        0.24       99.37
    203 cm of meer |          9        0.07       99.44
          onbekend |         71        0.56      100.00
    ---------------+-----------------------------------
             Total |     12,741      100.00


    And the variable weight (var453) is devided as follows:

    Code:
     Gewicht in kg |      Freq.     Percent        Cum.
    ---------------+-----------------------------------
            3-7 kg |          4        0.03        0.03
           8-12 kg |          3        0.02        0.05
          13-17 kg |          4        0.03        0.09
          18-22 kg |          3        0.02        0.11
          23-27 kg |          2        0.02        0.13
          28-32 kg |          1        0.01        0.13
          33-37 kg |          3        0.02        0.16
          38-42 kg |          9        0.07        0.23
          43-47 kg |         48        0.38        0.60
          48-52 kg |        249        1.95        2.56
          53-57 kg |        542        4.25        6.81
          58-62 kg |      1,211        9.50       16.32
          63-67 kg |      1,411       11.07       27.39
          68-72 kg |      1,756       13.78       41.17
          73-77 kg |      1,590       12.48       53.65
          78-82 kg |      1,710       13.42       67.07
          83-87 kg |      1,279       10.04       77.11
          88-92 kg |      1,048        8.23       85.34
          93-97 kg |        633        4.97       90.31
         98-102 kg |        488        3.83       94.14
        103-107 kg |        234        1.84       95.97
        108-112 kg |        143        1.12       97.10
        113-117 kg |         73        0.57       97.67
        118-122 kg |         50        0.39       98.06
    123 kg of meer |         67        0.53       98.59
          onbekend |        180        1.41      100.00
    ---------------+-----------------------------------
             Total |     12,741      100.00

    The code i used to calculate the BMI is the following:

    Code:
    gen bmi = (1000*var453/(var452*var452))
    sum bmi
    
    gen underweight= 1 if bmi <=18.5
    replace underweight = 0 if bmi >18.5
    gen normal_weight= 1 if bmi >=18.5 | bmi <=24.9
    replace normal_weight = 0 if bmi <18.5 | bmi >24.9
    gen overweight= 1 if bmi >=25 | bmi <=29.9
    replace overweight = 0 if bmi <25 | bmi >29.9
    gen obese= 1 if bmi >= 30
    replace obese = 0 if bmi <30
    
    gen bmi_categories=0
    replace bmi_categories= 1 if underweight==1
    replace bmi_categories= 2 if normal_weight==1
    replace bmi_categories= 3 if overweight==1
    replace bmi_categories= 4 if obese==1
    
    label define bmi 0 "Missing" 1 "Underweight" 2 "Normal Weight" 3 "Overweight" 4 "Obese"
    label values bmi_categories bmi
    
    tab bmi_categories
    Last edited by Florian Maissan; 21 Nov 2015, 08:12.

  • #2
    Your variables appear to be numeric variables with value labels. The calculation of BMI will pay absolutely no attention to the value labels, but be based entirely on the underlying numeric values.

    Code:
    tab var452, nola
    tab var453, nola
    


    will tell you more.


    Incidentally note that two individuals are reported as having heights 5 and 6. Regardless of the tacit units (cm, m, km?) I would advise thinking about the possibility that those data points need checking. In addition some of the weights, unless for neonates, do not appear plausible at all.

    For intervals, it would usually be customary to use midpoints in calculations.

    Comment


    • #3
      It seems like you have only categorical variables describing height and weight. To each height and weight interval some number is assigned, but you do not have individual values of height and weight. You can see the assigned categorical values of height by typing for example: codebook var452, tab(100).

      Comment


      • #4
        I'll point out another problem with your data. Even after you fix what the others have pointed out, the cutpoints you are using for BMI categories apply when BMI is calculated as kg/m2. But the height information you have is denominated in cm. So even after you figure out how to go from labeled categories to real continuous valued variables, you will need to either change the units of height, or change the cutpoints.

        Comment


        • #5
          Thank you all very much for the responses.I found the numeric values behind the labels of the variable height and weight, but it still makes no sense!? I think i need to generate new variables of height and weight before i properly can calculate the BMI per individual!?

          Code:
          var452                                                                                                                                                                              Lengte in cm
          ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
          
                            type:  numeric (double)
                           label:  var452, but 2 nonmissing values are not labeled
          
                           range:  [5,99]                       units:  1
                   unique values:  34                       missing .:  0/12741
          
                      tabulation:  Freq.   Numeric  Label
                                       1         5  
                                       1         6  
                                       1        10  tot 52 cm
                                       1        12  58-62 cm
                                       1        13  63-67 cm
                                      10        14  68-72 cm
                                       7        15  73-77 cm
                                       1        16  78-82 cm
                                       1        17  83-87 cm
                                       3        18  88-92 cm
                                       1        19  93-97 cm
                                       6        20  98-102 cm
                                      43        21  103-107 cm
                                     187        22  108-112 cm
                                     550        23  113-117 cm
                                     940        24  118-122 cm
                                    1274        25  123-127 cm
                                    1035        26  128-132 cm
                                    1048        27  133-137 cm
                                     757        28  138-142 cm
                                     313        29  143-147 cm
                                     201        30  148-152 cm
                                     212        31  153-157 cm
                                     595        32  158-162 cm
                                     903        33  163-167 cm
                                    1361        34  168-172 cm
                                    1001        35  173-177 cm
                                    1014        36  178-182 cm
                                     725        37  183-187 cm
                                     309        38  188-192 cm
                                     129        39  193-197 cm
                                      30        40  198-202 cm
                                       9        41  203 cm of meer
                                      71        99  onbekend
          Code:
          ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
          var453                                                                                                                                                                             Gewicht in kg
          ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
          
                            type:  numeric (double)
                           label:  var453
          
                           range:  [1,99]                       units:  1
                   unique values:  26                       missing .:  0/12741
          
                      tabulation:  Freq.   Numeric  Label
                                       4         1  3-7 kg
                                       3         2  8-12 kg
                                       4         3  13-17 kg
                                       3         4  18-22 kg
                                       2         5  23-27 kg
                                       1         6  28-32 kg
                                       3         7  33-37 kg
                                       9         8  38-42 kg
                                      48         9  43-47 kg
                                     249        10  48-52 kg
                                     542        11  53-57 kg
                                    1211        12  58-62 kg
                                    1411        13  63-67 kg
                                    1756        14  68-72 kg
                                    1590        15  73-77 kg
                                    1710        16  78-82 kg
                                    1279        17  83-87 kg
                                    1048        18  88-92 kg
                                     633        19  93-97 kg
                                     488        20  98-102 kg
                                     234        21  103-107 kg
                                     143        22  108-112 kg
                                      73        23  113-117 kg
                                      50        24  118-122 kg
                                      67        25  123 kg of meer
                                     180        99  onbekend

          Comment


          • #6
            You should recode what makes sense and ignore what does not. onbekend evidently means missing. 123 kg or more can't be used. 52 cm or less can't be used. 5 and 6 for height can't be used.

            Comment

            Working...
            X