[EpiData-list] BMI from US measures

epidata-list at lists.umanitoba.ca epidata-list at lists.umanitoba.ca
Fri Apr 13 17:25:35 CDT 2007


If you do not wish to show conversion of US measures into SI units in 
the QES file, then your QES file should have this:

*.QES file
wtpd       Weight in US pounds ###.#
htft         Height in US feet #
htin       Height in US inches ##
bmi  Body Mass Index in kg/m^2 ##.#

You then make all your calculations in the CHK file to get the BMI in SI 
units:

*.CHK file
* Definitions from Wikipedia
* 1 US foot=(1200/3937) meters
* 1 US inch=25.4 millimeters
* 1 US pound= 453.59237 grams

wtpd
  MUSTENTER
END

htft
  MUSTENTER
END

htin
  MUSTENTER
  AFTER ENTRY
    bmi=(wtpd*0.45359237)/((htft*(1200/3937)+(htin*0.0254))^2)
  END
END

bmi
  NOENTER
END


and that should do it.  Beware of empty fields contributing to the 
denominator.  Should that be the case, you must make provisions in the 
CHK file.  The above works only if there are no zeros for the two 
denominator variables, and not permitting any blank fields.

Hans

-- 
Hans L Rieder, MD, MPH
Jetzikofenstr. 12
3038 Kirchlindach
   Switzerland

Tel: +41 31 829 4577
Mob: +41 79 321 9122
Web: http://www.tbrieder.org




More information about the EpiData-list mailing list