zscores: Calculate z-scores for anthropometric indicators

View source: R/zscores.R

zscoresR Documentation

Calculate z-scores for anthropometric indicators

Description

zscores() computes z-scores indicating nutritional status, adding new columns to the end of a data frame.

Usage

zscores(
  data,
  units = c("months", "years", "weeks"),
  missing_flag = NA,
  extreme_flag = NA,
  id = "ID",
  age = "AGE",
  sex = "SEX",
  weight = "WT",
  height = "HT",
  measure = NA,
  headc = NA,
  armc = NA,
  triskin = NA,
  subskin = NA,
  oedema = NA,
  sw = NA
)

Arguments

data

A data frame or data frame extension with ID, AGE, SEX, WT, and HT columns.

units

Optional. Units for age Default is "months".

missing_flag

Value used to replace missing z-scores Default is NA.

extreme_flag

Value used to replace extreme/implausible z-scores. Default is NA.

id

Optional. Name of the patient identifier column.

age

Optional. Name of the age column.

sex

Optional. Name of the sex column.

weight

Optional. Name of the weight column.

height

Optional. Name of the height column.

measure

Optional. Name of the column indicating whether height was measured standing ("H" or "h"), or recumbent ("L" or "l").

headc

Optional. Name of the column containing head circumference measurements. Measurements must be in centimeters.

armc

Optional. Name of the column containing arm circumference measurements. Measurements must be in centimeters.

triskin

Optional. Name of the column containing triceps skinfold measurements. Measurements must be in millimeters.

subskin

Optional. Name of the column containing subscapular skinfold measurements. Measurements must be in millimeters.

oedema

Optional. Name of the column containing oedema information. "Y" or "y" for oedema; "N" or "n" for non-oedema.

sw

Optional. Name of the column containing the sample weights.

Details

zscores is a vectorized, more streamlined implementation of the WHO scripts igrowup_standard.R, igrowup_restricted.R, and who2007.R. In addition to BMI, zscores can calculate the following z-scores:

HAZ: Height-for-age z-score WAZ: Weight-for-age z-score WHZ: Weight-for-height z-score BAZ: BMI-for-age z-score HCZ: Head circumference-for-age z-score ACZ: Arm circumference-for-age z-score TSZ: Triceps skinfold-for-age z-score SSZ: Subscapular skinfold-for-age z-score

Value

A tibble::tibble() with z-score columns appended.

Author(s)

Sandy Floren, Dhruv Vaish, World Health Organization

Examples

zscores(pop_example, units = "months")


saviclab/savictools documentation built on Dec. 7, 2023, 11:56 p.m.