Re: EpiData-list Digest, Vol 84, Issue 7
I am having trouble calculating BMI in Epidata. Height is measured in feet (separate) and inches (separate). I tried to create a new variable (BMI), which it did, but it is labelled as "Float," and unusable. Please help!
Ali
Ali B. Mansaray, MPH, PhD.c OMH, SCDHEC (803) 898-0263 (Days) *MANSA CS* [(803) 446-6958 (On Call)
*"To be or not to be: that is the question...?" (Shakespeare),* especially in public health, minority health and health disparities in these United States.
On Sun, Oct 10, 2010 at 1:00 PM, epidata-list-request@lists.umanitoba.cawrote:
Send EpiData-list mailing list submissions to epidata-list@lists.umanitoba.ca
To subscribe or unsubscribe via the World Wide Web, visit http://lists.umanitoba.ca/mailman/listinfo/epidata-list or, via email, send a message with subject or body 'help' to epidata-list-request@lists.umanitoba.ca
You can reach the person managing the list at epidata-list-owner@lists.umanitoba.ca
When replying, please edit your Subject line so it is more specific than "Re: Contents of EpiData-list digest..."
EpiData-list mailing list ___________________________________
Today's Topics:
- EpiData Manager integer vs float (epidata-list@lists.umanitoba.ca)
Message: 1 Date: Sat, 09 Oct 2010 20:37:30 +0200 From: epidata-list@lists.umanitoba.ca Subject: [EpiData-list] EpiData Manager integer vs float To: epidata-list@lists.umanitoba.ca Message-ID: 4CB0B66A.7000901@tbrieder.org Content-Type: text/plain; charset="ISO-8859-1"
EpiData-list@lists.umanitoba.ca http://lists.umanitoba.ca/mailman/listinfo/epidata-list
End of EpiData-list Digest, Vol 84, Issue 7
Dear Ali:
Not quite knowing, but assuming that the BMI in the pounds-feet-inches cultures is expressed in SI units, you may try the attached using American feet, inches, pounds to get a BMI in kg/m^2.
Hans
On 20:59, epidata-list@lists.umanitoba.ca wrote:
I am having trouble calculating BMI in Epidata. Height is measured in feet (separate) and inches (separate). I tried to create a new variable (BMI), which it did, but it is labelled as "Float," and unusable. Please help!
Ali
Ali B. Mansaray, MPH, PhD.c
By unusable, do you get an error in making the calculation? BMI should be float as you will normally want at least one decimal place unless you are simply looking at cut points. Are height and weight integers?
In Analysis you can do this several ways. What follows is for metric measurements.
1. height and weight are integers (m and kg, respectively): gen bmi = float(weight)/(float(height)^2)
2. height and weight are float: gen bmi=weight/(height^2)
3. you want bmi as integer gen i bmi = integer(float(weight)/(float(height)^2))
4. you want categories, e.g. WHO classification: define bmicat ______________ define bmi ###.## bmi = round(weight/(height^2),2) recode bmi to bmicat low-18.49 = "Underweight" 18.5 - 24.99 = "Normal" 25 - 29.99 = "Overweight" 30 - high = "Obese"
Be certain to use the ROUND function so that bmi such as 24.996 do not get lost in the recode. If you want a calculated bmi of 29.996 to be "Normal", then you'll have to be careful with the calculation and the recode.
Now, to use feet, inches and pounds, the approach is:
gen bmi = 703*float(weight)/(float(htfeet*12+htinch))^2
If you get the error "Data type mismatch", be sure to use float to turn integers into floating point variables.
If you want to do this in EpiData Entry (not sure why you would), check the help files for CHECK commands as the functions may differ.
Jamie
On 2010-10-13, at 9:30 AM, epidata-list@lists.umanitoba.ca wrote:
I am having trouble calculating BMI in Epidata. Height is measured in feet (separate) and inches (separate). I tried to create a new variable (BMI), which it did, but it is labelled as "Float," and unusable. Please help!
Ali
participants (1)
-
epidata-list@lists.umanitoba.ca