WHO macros

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:

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:

Note: These macros were updated from the original WHO files (2007), which have not been regularly maintained. We will not likely be updating these further, and we strongly recommend using our Shiny Apps, which are based on the WHO R code.