| Title: | Sex- and Age-Standardized Metrics from the Centers for Disease Control and Prevention (CDC) Growth Charts |
| Version: | 0.3.0 |
| Date: | 2026-07-26 |
| Description: | Calculation of sex- and age-standardized growth metrics based on the 2000 CDC growth charts for children and adolescents with ages of >= 24.0 to < 240 months. Provides functions to generate z-scores and percentiles for weight, height, and body mass index (BMI) using the LMS method (lambda-mu-sigma). Includes extended BMI z-scores for values above the 95th percentile to more accurately characterize the sex- and age-standardized BMI of children with very high BMIs. |
| License: | GPL-3 |
| Encoding: | UTF-8 |
| LazyData: | true |
| ByteCompile: | true |
| Depends: | R (≥ 3.5.0) |
| Imports: | data.table (≥ 1.15.0), tibble, stats |
| Suggests: | testthat (≥ 3.0.0) |
| NeedsCompilation: | no |
| Packaged: | 2026-07-28 18:46:42 UTC; davidfreedman |
| Author: | David Freedman |
| Maintainer: | David Freedman <DavidSFreedman@gmail.com> |
| Repository: | CRAN |
| Date/Publication: | 2026-07-28 19:10:02 UTC |
Sample Anthropometric Data from NHANES
Description
A sample dataset containing height, weight, sex, and age for testing the cdcanthro function.
Usage
data(NHanes)
Format
A data frame or data table with observations on multiple anthropometric variables.
CDC Growth Chart Reference Data (2000)
Description
LMS parameters (L, M, S) for age- and sex-standardized growth metrics.
Usage
data(cdc_ref_data)
Format
A data.table with columns for sex, age, and LMS values. Parameter names represent the first letter of weight, height, or BMI; this is follow by 'l', 'm', or 's' for the LMS parameters. 'mref' and 'sref' are the M and S parameters at 240 months of age. For sexn, '1' are boys and '2' are girls.
Source
https://www.cdc.gov/growthcharts/percentile_data_files.htm
Generate Sex- and Age-Standardized Weight, Height, and BMI Metrics From the CDC Growth Charts
Description
Generate z-scores, percentiles, and other sex- and age-standardized metrics
for weight, height, and BMI based on the 2000 CDC growth charts. The calculations are restricted
to children with ages between 24.0 (inclusive) and < 240 months.
Has a single function, cdcanthro.
The BMI metrics include z-scores and percentiles, along with newer metrics such as extended BMIz and percent of the 50th and 95th percentiles. The extended BMI metrics are used for BMIs above the 95th percentile.
Usage
cdcanthro(data, age, wt, ht, bmi, all_vars = FALSE)
Arguments
data |
a |
age |
age in months, specified as accurately as possible. Required. |
wt |
weight in kg. Optional. If omitted, WAZ-related metrics will be missing. |
ht |
height in cm. Optional. If omitted, HAZ-related metrics will be missing. |
bmi |
BMI in |
all_vars |
logical. If |
Details
The function expects the child's sex to be named sex; either upper- or
lower-case is fine. You cannot have both SEX and sex in your data.
Values can be coded as boys/girls, b/g, male/female,
m/f, or 1/2. Character values can be in upper- or lower-case;
only the first character is considered.
Weight is in kg, height is in cm, and BMI is in kg/m^2.
At least one of wt, ht, or bmi must be present. Metrics
that cannot be calculated from the supplied variables will be missing from the output,
and warnings will indicate which variables were missing. For
example, supplying only wt returns WAZ but omits HAZ and BMI metrics
from the output.
Age in months should be given as accurately as possible because the function linearly interpolates between ages.
If all ages are given as integer number of months (e.g., NHANES), add 0.5
because values such as 36 represent the interval [36, 37) months.
If age is in days, divide by 30.4375 so that a child who is 3672 days old would have an age in months of 120.641. For additional information on age, see the ‘See Also’ section below.
If all_vars = TRUE, all variables in the Freedman et al. paper will be
output, along with the L, M, and S values for each child and the value of
sigma for the half-normal distribution.
For children without obesity, BMI z-scores are calculated as
Z = ((BMI / M)^L - 1) / (L \times S)
where BMI is the child's BMI, L is the Box-Cox transformation
for normality for the child's sex and age, M is the median, and
S is the coefficient of variation. Reference data are the merged
LMS files from the CDC (see ‘See Also’).
For children with obesity, BMI percentiles are calculated as
90 + 10 \times \Phi((BMI - p95) / \sigma)
where p95 is the sex- and age-specific 95th percentile, and
sigma is the scale parameter of the half-normal distribution. Values
of sigma for children with obesity are based on formulas in Wei et al.
The class of the returned object matches the class of the input data:
a data.frame input returns a data.frame, a data.table
returns a data.table, and a tibble (tbl_df) returns a tibble
(provided the tibble package is installed; otherwise a
data.frame is returned with a warning).
Value
A data.table, data.frame, or tibble containing the original
data and various weight, height, and BMI metrics.
If your dataset has ages that are < 24 or >= 240 months, these rows will be present in the output
dataset. All calculated metrics will be NA. If this is not what you want, delete these rows before
running cdcanthro().
Variables in output:
waz,haz,bmizSex- and age-standardized z-scores for weight, height, and BMI.
bmizis based on the 2000 CDC growth charts for non-obese children and extended BMIz for obese children.wap,hap,bmipSex- and age-standardized percentiles for weight, height, and BMI.
bmipis based on the extended BMI metrics for obese children.mod_waz,mod_haz,mod_bmizModified z-scores.
orig_bmip,orig_bmizOriginal BMI percentiles and z-scores based solely on the LMS method.
orig_bmizandbmizare identical for children with BMI at or below the 95th percentile.p50,p95Sex- and age-specific 50th and 95th percentiles of BMI.
bmip95BMI expressed as a percentage of the 95th percentile; 120 percent is the lower threshold for severe obesity.
perc_medianPercent difference between the child's BMI and the median (50th percentile) BMI for the child's sex and age.
If all_vars = TRUE, additional BMI metrics described in Freedman et al.
are also returned. These express BMI as distance or percent distance from
the median. To convert to percent of the median, add 100 to the values.
Note
The input data must not contain a column named seq_, as this name is
used internally to preserve row order. Rename any such column before calling
cdcanthro().
library(cdcanthro) will also load the data.table package.
Do not quote the argument names. Use cdcanthro(data, age, wt, ht, bmi),
not cdcanthro(data, 'age', 'wt', 'ht', 'bmi').
Author(s)
David Freedman
References
Kuczmarski RJ, Ogden CL, Guo SS, Grummer-Strawn LM, Flegal KM, Mei Z, et al. 2000 CDC Growth Charts for the United States: methods and development. Vital and Health Statistics. Series 11, Data from the National Health Survey 2002;(246):1–190. PMID: 12043359.
Wei R, Ogden CL, Parsons VL, Freedman DS, Hales CM. A method for calculating BMI z-scores and percentiles above the 95th percentile of the CDC growth charts. Annals of Human Biology 2020;47(6):514–21. doi:10.1080/03014460.2020.1808065
Freedman DS, Woo JG, Ogden CL, Xu JH, Cole TJ. Distance and percentage distance from median BMI as alternatives to BMI z score. British Journal of Nutrition 2020;124(5):493–500. doi:10.1017/S0007114519002046
See Also
CDC LMS percentile data files: https://www.cdc.gov/growthcharts/percentile_data_files.htm
CDC extended BMI data files: https://www.cdc.gov/growthcharts/extended-bmi-data-files.htm
CDC SAS programs and more information on agemos in Table 1 of
https://www.cdc.gov/growth-chart-training/hcp/computer-programs/sas.html
The section on modified z-scores in 'Extreme values, implausible values, and data errors' near the end of https://www.cdc.gov/growth-chart-training/hcp/computer-programs/sas.html
Examples
data <- data.table::CJ(sex = 1:2, agem = 120.5, wtk = c(30, 65), htc = c(135, 144))
data[, bmi := wtk / (htc / 100)^2]
out <- cdcanthro(data, age = agem, wt = wtk, ht = htc, bmi = bmi)
round(out, 2)[1:5]
out <- cdcanthro(data, age = agem, wt = wtk, ht = htc, bmi = bmi, all_vars = TRUE)
round(out, 2)[1:5]
d <- data.frame(sex = c(1, 2, 1, 2, 2),
age = c(141, 54, 217, 155, 52),
wt = c(57, 25, 72, NA, 17.7),
ht = c(143, 102, 166, 169, 105))
d <- cdcanthro(d, age, wt, ht)
round(d, 2)
d <- data.frame(sex = c(1, 2, 1),
age = c(120.5, 60.5, 180.5),
wt = c(40, 25, 65))
d <- tibble::as_tibble(d)
cdcanthro(d, age, wt)
head(NHanes) # note that age is given as completed months
d <- data.table::copy(NHanes)
head(cdcanthro(d, agemos, wt, ht, bmi))[,.(seqn, agemos, waz, haz, bmiz)]
d[, agemos := agemos + 0.5]
head(cdcanthro(d, agemos, wt, ht, bmi))[,.(seqn, agemos, waz, haz, bmiz)]
# same Z-scores