Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

RE: st: body mass index

From   "Rogge, Mary M" <>
To   <>
Subject   RE: st: body mass index
Date   Wed, 5 Nov 2003 10:02:08 -0500

Thanks, Sarah, I made be able to modify it to tackle my problem.  Thanks
for responding.

-----Original Message-----
[] On Behalf Of Sarah A.
Sent: Tuesday, November 04, 2003 12:15 PM
Subject: Re: st: body mass index

Mary -

This isn't exactly what you are asking for, but it may be helpful.  This
a simple do-file that creates variables for overweight and obese based
the 85th and 95th percentiles on the CDC growth charts by age and sex. 
This do-file assumes you already have a variable for bmi in your dataset



*generate overweight for girls;

gen overweight=.;
replace overweight=1 if sex==0&age==9&bmi>=19.1;
replace overweight=1 if sex==0&age==10&bmi>=20;
replace overweight=1 if sex==0&age==11&bmi>=20.9;
replace overweight=1 if sex==0&age==12&bmi>=21.7;
replace overweight=1 if sex==0&age==13&bmi>=22.6;
replace overweight=1 if sex==0&age==14&bmi>=23.4;
replace overweight=1 if sex==0&age==15&bmi>=24.1;
replace overweight=1 if sex==0&age==16&bmi>=24.7;

replace overweight=0 if sex==0&age==9&bmi<19.1;
replace overweight=0 if sex==0&age==10&bmi<20;
replace overweight=0 if sex==0&age==11&bmi<20.9;
replace overweight=0 if sex==0&age==12&bmi<21.7;
replace overweight=0 if sex==0&age==13&bmi<22.6;
replace overweight=0 if sex==0&age==14&bmi<23.4;
replace overweight=0 if sex==0&age==15&bmi<24.1;
replace overweight=0 if sex==0&age==16&bmi<24.7;

*for boys;

replace overweight=1 if sex==1&age==9&bmi>=18.6;
replace overweight=1 if sex==1&age==10&bmi>=19.4;
replace overweight=1 if sex==1&age==11&bmi>=20.2;
replace overweight=1 if sex==1&age==12&bmi>=21;
replace overweight=1 if sex==1&age==13&bmi>=21.9;
replace overweight=1 if sex==1&age==14&bmi>=22.7;
replace overweight=1 if sex==1&age==15&bmi>=23.5;
replace overweight=1 if sex==1&age==16&bmi>=24.2;

replace overweight=0 if sex==1&age==9&bmi<18.6;
replace overweight=0 if sex==1&age==10&bmi<19.4;
replace overweight=0 if sex==1&age==11&bmi<20.2;
replace overweight=0 if sex==1&age==12&bmi<21;
replace overweight=0 if sex==1&age==13&bmi<21.9;
replace overweight=0 if sex==1&age==14&bmi<22.7;
replace overweight=0 if sex==1&age==15&bmi<23.5;
replace overweight=0 if sex==1&age==16&bmi<24.2;

replace overweight=. if bmi==.

*generate obese for girls;
gen obese=.;
replace obese=1 if sex==0&age==9&bmi>=21.8;
replace obese=1 if sex==0&age==10&bmi>=23;
replace obese=1 if sex==0&age==11&bmi>=24.1;
replace obese=1 if sex==0&age==12&bmi>=25.3;
replace obese=1 if sex==0&age==13&bmi>=26.3;
replace obese=1 if sex==0&age==14&bmi>=27.3;
replace obese=1 if sex==0&age==15&bmi>=28.1;
replace obese=1 if sex==0&age==16&bmi>=28.9;

replace obese=0 if sex==0&age==9&bmi<21.8;
replace obese=0 if sex==0&age==10&bmi<23;
replace obese=0 if sex==0&age==11&bmi<24.1;
replace obese=0 if sex==0&age==12&bmi<25.3;
replace obese=0 if sex==0&age==13&bmi<26.3;
replace obese=0 if sex==0&age==14&bmi<27.3;
replace obese=0 if sex==0&age==15&bmi<28.1;
replace obese=0 if sex==0&age==16&bmi<28.9;

*for boys;

replace obese=1 if sex==1&age==9&bmi>=21.1;
replace obese=1 if sex==1&age==10&bmi>=22.2;
replace obese=1 if sex==1&age==11&bmi>=23.2;
replace obese=1 if sex==1&age==12&bmi>=24.2;
replace obese=1 if sex==1&age==13&bmi>=25.2;
replace obese=1 if sex==1&age==14&bmi>=26.1;
replace obese=1 if sex==1&age==15&bmi>=26.8;
replace obese=1 if sex==1&age==16&bmi>=27.6;

replace obese=0 if sex==1&age==9&bmi<21.1;
replace obese=0 if sex==1&age==10&bmi<22.2;
replace obese=0 if sex==1&age==11&bmi<23.2;
replace obese=0 if sex==1&age==12&bmi<24.2;
replace obese=0 if sex==1&age==13&bmi<25.2;
replace obese=0 if sex==1&age==14&bmi<26.1;
replace obese=0 if sex==1&age==15&bmi<26.8;
replace obese=0 if sex==1&age==16&bmi<27.6;

replace obese =. if bmi==.;

--On Tuesday, November 04, 2003 11:46 AM -0500 "Rogge, Mary M" 
<> wrote:

> I am attempting to analyze an NIH data set for prenatal factors
> to child overweight status at age 7 years.  Does anyone have a Stata
> program that calculates the BMI from height and weight and gives the
> percentile for age? Thanks!
> Mary Rogge
> Indiana University School of Nursing
> *
> *   For searches and help try:
> *
> *
> *

Sarah A. Mustillo, Ph.D
Department of Psychiatry and Behavioral Sciences
Duke University School of Medicine
Box 3454
Durham NC 27710

919 687-4686 x231
*   For searches and help try:

*   For searches and help try:

© Copyright 1996–2017 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index