Using the Percentile Data Files with LMS values provided by the CDC, and Child Growth Standards provided by the World Health Organization (WHO), we provide tools for finding quantiles, percentiles, or z-scores, for the following metrics:

- BMI for age
- head circumference for age
- stature for age
- height for age
- length for age

- weight for age
- weight for stature
- weight for height
- weight for length

All lengths/heights are in centimeters, ages in months, and weights in kilograms. Stature is used to refer both height and length; specific methods are provided for each.

All methods use the published LMS parameters to define z-scores, percentiles, and quantiles for skewed distributions. L is a \(\lambda\) parameter, the Box-Cox transformation power; \(M\) the median value, and \(S\) a generalized coefficient of variation. For a given percentile or z-score, the corresponding physical measurement, \(X,\) is defined as

\[X = \begin{cases} M \left(1 + \lambda S Z \right)^{\frac{1}{\lambda}} & \lambda \neq 0 \\ M \exp\left( S Z \right) & \lambda = 0. \end{cases}\]

From this we can get the z-score for a given measurement \(X:\)

\[ Z = \begin{cases} \frac{\left(\frac{X}{M}\right)^{\lambda} - 1}{\lambda S} & \lambda \neq 0 \\ \frac{\log\left(\frac{X}{M}\right) }{ S } & \lambda = 0. \end{cases}\]

Percentiles are determined using the standard normal distribution of z-scores.

For all eight of the noted methods we provide a distribution function, quantile function, and function that returns z-scores.

Each of the growth standard metrics have quantile, distribution, and
z-score function with the naming convention of
(`q_<metric>`

), (`p_<metric>`

), and
(`z_<metric>`

), respectively.

Additionally, the function `gs_chart`

for building growth
standard charts with percentile curves, and `gs_cdf`

for
plotting the cumulative distribution function for a given set of
inputs.

**Example**

Find the distribution value for a 13 year (156 month) old male with a BMI of 21.

```
## [1] 0.8006439
## [1] 0.8006439 0.8541621
```

An easy way to visualize the BMI distribution is to use the growth standard chart

```
gs_chart(metric = "bmi_for_age", male = 1, source = "CDC") +
ggplot2::geom_point(x = 13 * 12, y = 21, inherit.aes = FALSE)
```

and a cumulative distribution function

```
gs_cdf(metric = "bmi_for_age", male = 1, age = 13*12) +
ggplot2::geom_point(x = 21, y = p_bmi_for_age(21, male = 1, age = 13*12))
```

You can also easily get the z-score instead of the distribution value.

Find the median BMI quantile for a 48 month old female is: