x_to_z: X to Z-score function

View source: R/growth_functions.R

x_to_zR Documentation

X to Z-score function

Description

Function to take vectors of measurements, age, and gender, and unique chart and measure, to return Z score

Usage

x_to_z(x, age, gender, chart, measure = "weight")

Arguments

x

Vector of measurements

age

Vector of age parameters

gender

Vector of genders, either 'm' or 'f'

chart

Uniquely specified chart to obtain LMS parameters for

measure

Uniquely specified measure for the chart. Defaults to 'weight'.

Details

The following charts are available, with their corresponding measures.

chart age_units measures
abdel-rahman_2017 months arm_circ(cm)
addo_2010_skin years subscapular(mm), triceps(mm)
cdc_2000_bmi months bmi(kg/m2)
cdc_2000_infant months head_circ(cm), length(cm), weight(kg)
cdc_2000_pedi months height(cm), weight(kg)
fenton_2003 weeks head_circ(cm), length(cm), weight(kg)
mramba_2017 months arm_circ(cm)
olsen_2010 weeks head_circ(cm), length(cm), weight(g)
olsen_2015_bmi weeks bmi(g/cm2)
who_2006_infant months head_circ(cm), length(cm), weight(kg)
who_2007_skin_arm months arm_circ(cm), subscapular(mm), triceps(mm)
zemel_2015_infant months head_circ(cm), length(cm), weight(kg)
zemel_2015_pedi years bmi(kg/m2), head_circ(cm), height(cm), weight(kg)

Examples

# 3, 10, 50, 90, and 97%ile weight for 8.5 month old female on CDC 2000 infant chart
x_to_z(
    c(6.720327734, 7.197413532, 8.314178377, 9.573546299, 10.2153883),
    rep(8.5, 5),
    rep('f', 5),
    chart = 'cdc_2000_infant',
    measure = 'weight'
  )
round( pnorm( x_to_z(
    c(6.720327734, 7.197413532, 8.314178377, 9.573546299, 10.2153883),
    rep(8.5, 5),
    rep('f', 5),
    chart = 'cdc_2000_infant',
    measure = 'weight'
  ) ), 4)

jhchou/peditools documentation built on Dec. 22, 2024, 3:35 a.m.