anthroplus_zscores {anthroplus}R Documentation

Compute z-scores for age 5 to 19

Description

Compute z-scores for age 5 to 19

Usage

anthroplus_zscores(
  sex,
  age_in_months = NA_real_,
  oedema = NA_character_,
  height_in_cm = NA_real_,
  weight_in_kg = NA_real_
)

Arguments

sex

A numeric or text variable containing gender information. If it is numeric, its values must be: 1 for males and 2 for females. If it is character, it must be "m" or "M" for males and "f" or "F" for females. No z-scores will be calculated if sex is missing.

age_in_months

A numeric variable containing age information; Age-related z-scores will NOT be calculated if age is missing.

oedema

The values of this character variable must be "n", "N" or "2" for non-oedema, and "y", "Y", "1" for oedema. Although it is highly recommended that this variable is provided by the survey, it is possible to run the analysis without specifying this variable. If unspecified, the default vector of all "n" with values considered as non-oedema is used. Missing values will be treated as non-oedema. For oedema, weight related z-scores are NOT calculated (set to missing), BUT they are treated as being < -3 SD in the weight-related indicator prevalence (anthroplus_prevalence) estimation.

height_in_cm

A numeric variable containing standing height information, which must be in centimeters. Height-related z-scores will not be calculated if missing.

weight_in_kg

A numeric variable containing body weight information, which must be in kilograms. Weight-related z-scores are not calculated if missing.

Details

The following age cutoffs are used:

Value

A data.frame with three types of columns. Columns starting with a "c" are cleaned versions of the input arguments. Columns beginning with a "z" are the respective z-scores and columns prefixed by a "f" indicate if these z-scores are flagged (integers). The number of rows is given by the length of the input arguments.

The following columns are returned:

Examples

anthroplus_zscores(
  sex = c("f", "m"),
  age_in_months = c(100, 110),
  height_in_cm = c(100, 90),
  weight_in_kg = c(30, 40)
)

[Package anthroplus version 0.9.0 Index]