WHO Macro Files, CPEG Revision
For calculating Z scores in batch files, the WHO currently provides several macro packages for R, SAS, SPSS, and Stata; all are available from their website.
The application tools come in two flavours:
- igrowup: for ages 0–5 years based on the WHO growth standards
- who2007: for ages 5–19 years based on the WHO growth reference
Due to limitations in the original WHO charts, the who2007 macros calculate weight-for-age Z scores for ages 5–10 years only while reporting BMI- and height-for-age from 5–19 years.
We have therefore replaced the weight-for-age LMS lookup table (wfawho2007) with a revised tabled augmented with LMS parameters for ages 10–19 years from our re-analysis of WHO data (BMC Pediatrics 2014;14:32). This also required revisions to the accompanying macro files (who2007). Currently, we are providing versions for R, Stata, and SAS. In all cases, changes to the original file can be identified by searching for comments containing the word ‘CPEG’. The original files are also included for comparison.
- ZIP file containing the igrowup macro files, CPEG revision (for R)
- ZIP files containing the who2007 macro files, CPEG revision:
It should be noted that most LMS parameters are tabulated at monthly intervals. In our own applications, we round age to the nearest month before looking up the matching LMS parameters. In contrast, the WHO uses linear interpolation to estimate the ‘exact’ LMS parameters before calculating Z scores. In general, the difference is manifest as a slight ‘wobble’ in the second decimal place in the Z score. Use at your own risk.
We have also developed a combined macro quickZ which combines the data from igrowup and who2007, for calculating Z-scores for height, weight and BMI for children from 0–19 years of age using a single application.
- ZIP file containing the quickZ macro files (for R)
R for various computing platforms is available free of charge from the Comprehensive R Archive Network (CRAN).
Waist circumference macro
We have also provided an R macro package to calculate pediatric waist circumference and waist-height ratio Z-scores for ages 5–19 years. Calculations are based on our recently published norms [Pediatric Research 2015;78(6):723–729]. A copy of the relevant publication is included as PediatrRes_2015.pdf in the macro folder.
- ZIP file containing the pediatric waist circumference macro files (for R)
We have also provided an R macro package to calculate newborn Z-scores for gestational ages 22–49 weeks. Calculations are based on published norms [Fenton et al. BMC Pediatrics 2013;13:59].
- ZIP file containing the preterm newborn macro files (for R)
There is also an option for those wanting the CPEG macros, but uncomfortable with a statistical package. We have created an on-line application (Zapps™) running the CPEG macros on an R server (aka Shiny). Batch data may be uploaded in the form of a comma separated variable (.csv) spreadsheet, from Excel or similar.
For more information about our Shiny apps, click here.
An Excel calculator is also available for processing batch files (Windows only).