SAS Program for WHO Growth Charts

What to know

This SAS program calculates the percentiles and z-scores (standard deviations) for a child’s sex and age from birth to 2 years based on the World Health Organization (WHO) growth charts. The calculations are for body mass index (BMI), weight, height, skinfold thicknesses (triceps and subscapular), arm circumference, head circumference and weight-for-height.

Health care provider using a computer with a large monitor.

Overview

This SAS program calculates the z-scores (standard deviations) and percentiles for a child’s sex and age from birth to 2 years. The calculations are for body mass index (BMI), weight, height, skinfold thicknesses (triceps and subscapular), arm circumference, and head circumference based on WHO growth charts. Weight-for-height z-scores and percentiles are also calculated.

Observations with extreme values (absolute z-scores above 5 or 6) are flagged as biologically implausible. Although WHO provides several macros and a PC program for these calculations, this SAS program follows the same steps as the SAS program for the CDC growth charts. Additional details about the ages for which the various z-scores and percentiles are calculated are in Table 2 below.

The SAS program calculates z-scores and percentiles based on reference values in WHOref_d.sas7bdat. This reference dataset combines values from several WHO datasets. If you are not using SAS, you can download WHOref_d.csv and create a program based on who-source-code.sas to do the necessary calculations.

Reminder‎

For children from birth to 2 years, use WHO growth charts. For children 2 to 20 years, use CDC growth charts.

Instructions

Step 1: Download the SAS program (who-source-code.sas [SAS-6KB]) and the reference data file (WHOref_d.sas7bdat). Do not alter these files. Move them to a directory (folder) that SAS can access. If you are using Chrome or Firefox, right click to save the who-source-code.sas file.

For the example provided in Table 1, the files have been saved in:

c:\sas\growth charts\who\data

Step 2: Create a libname statement in your SAS program to point at the folder location of 'WHOref_d.sas7bdat'. An example would be:

libname refdir ‘c:\sas\growth charts\who\data’;

Note that the SAS code expects this name to be refdir. Do not change this name.

Step 3: Set your existing dataset containing height, weight, sex, age, and other variables into a temporary dataset named mydata. Rename and code variables in your dataset as follows:

Table 1: Instructions for SAS users (step 3), guidance on renaming and coding variables in your dataset.
Variable Description
agedays

Child’s age in days; must be present.

If this value is not an integer, the program rounds to the nearest whole number. If age is known only to the completed number of weeks (for example, 5 weeks of age would represent any number of days between 35 and 41), multiply by 7 and consider adding 4 (median number of days in a week). If age is known only to the completed number of months, multiply by 365.25/12, and consider adding 15.

sex Coded as 1 for boys and 2 for girls.
height Recumbent length in cm. If standing height (rather than recumbent length) was recorded, add 0.7 cm to the values. For more information, see WHO Child Growth Standards based on length/height, weight and age
weight Weight (kg)
bmi BMI (weight (kg) / height (m)2). If your data do not contain BMI, the program calculates it. If BMI is present in your data, the program will not overwrite it.
headcir Head circumference (cm)
armcir Arm circumference (cm)
tsf Triceps skinfold thickness (mm)
ssf Subscapular skinfold thickness (mm)

Percentiles and Z-scores for variables that are not in mydata will be coded as missing (.) in the output dataset (named _whodata). Sex (coded as 1 for boys and 2 for girls) and agedays must be in mydata. SAS code is unlikely to overwrite other variables in your dataset. Avoid having variable names that begin with an underscore, such as _bmi.

Step 4: Copy and paste the following line into your SAS program after the line (or lines) in step 3.

%include ‘c:\sas\growth charts\who\data\WHO-source-code.sas’; run;

If necessary, change this statement to point at the folder containing the downloaded 'WHO-source-code.sas' file. This tells your SAS program to run the statements in 'WHO-source-code.sas'.

Step 5: Submit the %include statement. This will create a dataset named _whodata. This dataset will contain all of your original variables, along with percentiles, z-scores, and flags for extreme values. The names and descriptions of these new variables in _whodata are in Table 2.

Table 2: Z-Scores, percentiles, and extreme values (biologically implausible, BIV) in output dataset, _whodata
Description Variable Cutoff for Extreme Z-Scores
Percentile Z-score Modified Z-score to Identify Extreme Values Flag for Extreme Values Low (Flag = -1) High (Flag = +1)
Weight-for-age for children aged 0 to < 240 months wapct waz mod_waz _bivwt < -5 >8
Height-for-age for children aged 0 to < 240 months. hapct haz mod_haz _bivht < -5 >4
Weight-for-height for children with heights 45 to 121 cm (these heights approximately correspond to ages 0 to 6 years) whpct whz mod_whz _bivwh < -4 >8
BMI-for-age for children aged 24 to < 240 months. bmipct bmiz mod_bmiz _bivbmi < -4 >8
Head circumference-for-age for children aged 0 to < 36 months headcpct headcz mod_headcz _bivhc < -5 >5
Original calculations for BMI original_bmipct original_bmiz

Step 6: Examine the new dataset, _whodata, with PROC MEANS or some other procedure to verify that the z-scores and other variables have been created. If a variable in Table 1 was not in your original dataset (for example, arm circumference), the output dataset will indicate that all values for the percentiles and z-scores of this variable are missing. If values for other variables are unexpectedly missing, make sure that you've renamed and recoded variables as indicated in Table 1 and that your SAS dataset is named mydata. The program should not modify your original data but will add new variables to your original dataset.

Sample SAS code corresponding to steps 2 to 6. You can cut and paste these lines into a SAS program, but you'll need to change the libname and %include statements to point at the folders containing the downloaded files.

c:\sas\growth charts\who\data

Additional Information

Z-scores are calculated as Z = [ ((value / M)**L) – 1] / (S * L), in which n which "value" is a variable such as the child's BMI, weight, or height. The L, M, and S values are in WHOref_d.sas7bdat and vary according to the child's sex and age or according to the child's sex and height. Percentiles are then calculated from the z-scores (for example, a z-score of 1.96 is equal to the 97.5 percentile). See more information on the LMS method.

Extreme or biologically implausible values

The SAS code also flags extreme values (biologically implausible values, or BIVs) according to the WHO criteria. Each variable has a BIV flag coded as -1 (an extremely low z-score), +1 (extremely high z-score), or 0 (the z-score is between the low and high cut-points). These BIV flags, along with other variables in the output dataset _whodata, are shown in Table 2.

The z-scores in the output data set, _whodata, can also be used to construct other cut-points for extreme (or biologically implausible) values. For example, if the distribution of weight in your data is strongly skewed to the right, you might use bmiz > 7 (rather than bmiz > 5) as the cut-point for extremely high BMI-for-age. This could be recoded as:

if -5 <= bmiz <= 7 then _bivbmi=0; *plausible; else if bmiz > 7 then _bivbmi=1; *high BIV; else if . < bmiz < -5 then _bivbmi= -1; *low BIV;

There are also two overall indicators of extreme values in the output dataset: _bivlow and _bivhigh. These variables indicate whether any measurement is extremely high ( _bivhigh=1) or extremely low (_bivlow=1). If a child does not have an extreme value for any measurement, both variables are coded as 0.