Skip to contents

Weight for age quantile, distribution, and zscore function based on LMS data from the CDC and WHO.

Usage

p_weight_for_age(
  q,
  male,
  age,
  source = getOption("pedbp_pgs_source", "CDC"),
  ...
)

q_weight_for_age(
  p,
  male,
  age,
  source = getOption("pedbp_pgs_source", "CDC"),
  ...
)

z_weight_for_age(
  q,
  male,
  age,
  source = getOption("pedbp_pgs_source", "CDC"),
  ...
)

Arguments

q

a vector of quantiles

male

integer value, 1 = male, 0 = female

age

numeric age, in months

source

a character string denoting the data source providing the parameters needed for the estimate. Valid values are "CDC" and "WHO". This can be set explicitly, or by using the pedbp_pgs_source option.

...

pass through

p

a vector of probabilities

Value

p_ method return values from the estimated distribution function.

q_ methods return values from the estimated quantile function.

z_ methods return standard scores.

Notes

CDC Recommends using WHO growth charts for infants and children ages 0 to 2 years of age in the U.S. and CDC growth charts to monitor growth for children age 2 years and older in the U.S.

Examples


# find the 80th quantile for 56 month old females;
# note - slight difference between CDC and WHO.
q_weight_for_age(p = 0.80, age = 56, male = 0, source = c("CDC", "WHO"))
#> [1] 19.38674 19.84028

# the percentiles for 42 kg 13 year old males:
p_weight_for_age(q = 42, age = 13 * 12, male = 0, source = "CDC")
#> [1] 0.3306328
p_weight_for_age(q = 42, age = 13 * 12, male = 0, source = "WHO")
#> Warning: age/stature above upper limit
#> [1] NaN

z_weight_for_age(q = 42, age = 13 * 12, male = 0, source = "CDC")
#> [1] -0.4381665
z_weight_for_age(q = 42, age = 13 * 12, male = 0, source = "WHO")
#> Warning: age/stature above upper limit
#> [1] NaN