Package {cdcanthro}


Title: Sex- and Age-Standardized Metrics from the Centers for Disease Control and Prevention (CDC) Growth Charts
Version: 0.2.0
Date: 2026-05-21
Description: Calculation of sex- and age-standardized growth metrics based on the 2000 CDC growth charts. 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.12.8), tibble, stats
Suggests: testthat (≥ 3.0.0)
NeedsCompilation: no
Packaged: 2026-05-22 19:01:59 UTC; davidfreedman
Author: David Freedman [aut, cre]
Maintainer: David Freedman <DavidSFreedman@gmail.com>
Repository: CRAN
Date/Publication: 2026-05-22 19:20: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.

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. 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 = FALSE)

Arguments

data

a data.frame, data.table, or tibble (tbl_df) containing the input data. The class of the returned object matches the class of data.

age

age in months, specified as accurately as possible. Required.

wt

weight in kg. Optional. If omitted, WAZ-related metrics will be NA.

ht

height in cm. Optional. If omitted, HAZ-related metrics will be NA.

bmi

BMI in kg/m^2. Optional. If omitted but both wt and ht are supplied, BMI is computed as wt / (ht / 100)^2. If all three of wt, ht, and bmi are omitted, the function stops with an error.

all

logical. If TRUE, returns additional intermediate variables (L, M, S values; sigma; and the distance-from-median metrics from Freedman et al.). Default is FALSE.

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 returned as NA, and warnings will indicate which variables were missing. For example, supplying only wt returns WAZ but leaves HAZ and BMI metrics as NA; supplying only bmi returns BMI metrics but leaves WAZ and HAZ as NA.

Age in months should be given as accurately as possible because the function linearly interpolates between ages.

If all ages are given as completed 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 documentation for agemos at the CDC SAS program page (see cdcanthro ‘See Also’ section).

If all = 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. (2020).

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.

Variables in output:

waz, haz, bmiz

Sex- and age-standardized z-scores for weight, height, and BMI. bmiz is based on the 2000 CDC growth charts for non-obese children and extended BMIz for obese children.

mod_waz, mod_haz, mod_bmiz

Modified z-scores.

orig_bmip, orig_bmiz

Original BMI percentiles and z-scores based on the LMS method. orig_bmiz and bmiz are identical for children with BMI at or below the 95th percentile.

bmip95

BMI expressed as a percentage of the 95th percentile; 120 percent is the lower threshold for severe obesity.

If all = 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 (but not attach) the data.table and tibble packages.

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;11:1–190.

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:514–21.

Freedman DS, Woo JG, Ogden CL, Xu JH, Cole TJ. Distance and Percent Distance from Median BMI as Alternatives to BMI z-score. British Journal of Nutrition 2019;124:1–8.

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 agemos documentation: 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 = 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)

NHanes[, agemos := agemos + 0.5]   # age was given as completed months
out <- cdcanthro(NHanes, agemos, wt, ht, bmi)
round(out, 2)