Skip Navigation Links
Centers for Disease Control and Prevention

 CDC Home Search Health Topics A-Z

National Center for Chronic Disease Prevention and Health Promotion
Nutrition and Physical Activity
Home | About Us | Site Map | Topic Index | Contact Us


A SAS Program for the CDC Growth Charts

The purpose of this SAS program is to easily generate a dataset that contains indices of the anthropometric status of children from birth to 20 years of age based on the 2000 CDC growth charts (http://www.cdc.gov/growthcharts/). This program uses an existing SAS dataset with height, weight, sex and age data on children. It is intended to be easy to use for someone with basic SAS programming skills.

Step by step instructions (Please print this file for later reference):


Step One: Save the SAS programs to your PC.

Windows Internet Explorer users, right-click on each file below and select the Save Target As... option.

Windows Netscape users, right-click on each file below and select the Save Link As... option.

In either case, keep the file names and file extensions as they are - gc-setup.sas and gc-calculate.sas. Save them in a location where you can access them from your SAS program.

gc-setup.sas (485-B)

gc-calculate.sas (230-K)


Step Two: Prepare your existing dataset.

Your dataset must include the following variables with the same exact name and the given data format before you run the SAS programs:

AGEMOS Child's age in month. Numeric variable (you may need to calculate this from the date of measurement and the date of birth).
SEX Child's gender. Numeric variable. 1 for male and 2 for female.
HEIGHT Child's recumbent length or standing height in centimeters. Numeric variable.
RECUMBNT Indicator of child's height measurement. 1 for recumbent length and 0 for standing height. Numeric variable.
WEIGHT Child's weight in kilograms. Numeric variable.
HEADCIR Child's head circumference in centimeters (may be set to missing if not collected).

Note: Avoid variable names starting with underscore "_" in your dataset, otherwise your data maybe replaced by some data from the SAS program.


Step Three: Modify the gc-setup.sas program.

Open the gc-setup.sas program using your PC SAS PROGRAM EDITOR. Then modify the program as following:

%let datalib='x:\xxxxxx\'; Insert the subdirectory for your existing input dataset (e.g., 'c:\project1\').
%let datain=xxxx; Insert the name of your existing input dataset (e.g., data1).
%let dataout=xxxx; Insert the name of the file you wish to put the results into. If the file name is the same as the input file name, the original file will be overwritten. All data from the input file will be placed in the output file, with the anthropometric indices (z-scores and percentiles) added to the end of the record.
%let saspgm='x:\xxxxxx\gc-calculate.sas'; Insert the subdirectory where the downloaded program gc-calculate.sas was saved (e.g., 'c:\growthcharts\gc-calculate.sas').

No changes are needed in the gc-calculate.sas program file.


Step Four: Run the modified gc-setup.sas program.

Submit the modified gc-setup.sas program. The newly created SAS dataset will contain all the original variables as well as the following variables for percentiles and z-scores.

HTPCT: percentile for length-for-age or stature-for-age
HAZ: z-score for length-for-age or stature-for-age
WTPCT: percentile for weight-for-age
WAZ: z-score for weight-for-age
WHPCT: percentile for weight-for-length or weight-for-stature
WHZ: z-score for weight-for-length or weight-for-stature
BMIPCT: percentile for body mass index-for-age
BMIZ: z-score for body mass index-for-age
BMI: calculated body mass index value
[weight(kg)/height(m)2 ]
HCPCT: percentile for head circumference-for-age
HCZ: z-score for head circumference-for-age



Privacy Policy | Accessibility

Home | About Us | Site Map | Contact Us

CDC Home | Search | Health Topics A-Z

This page last updated July 26, 2004

United States Department of Health and Human Services
Centers for Disease Control and Prevention
National Center for Chronic Disease Prevention and Health Promotion
Division of Nutrition and Physical Activity