getWGSR: Calculate WHO Growth Reference z-score for a given...

Description Usage Arguments Value Examples

View source: R/addWGSR.R

Description

This function is usually called by the addWGSR() function but could be used as a stand-alone calculator for getting z-score for a given anthropometric measurement.

Usage

1
2
getWGSR(sex, firstPart, secondPart, index = NA, standing = NA,
  thirdPart = NA)

Arguments

sex

Sex of the subject. This must be coded as 1 = male and 2 = female.

firstPart

Name of variable specifying:

  • Weight (kg) for BMI/A, W/A, W/H, or W/L

  • Head circumference (cm) for HC/A

  • Height (cm) for BMI/A for H/A

  • Length (cm) for L/A

  • MUAC (cm) for MUAC/A

  • Sub-scapular skinfold (mm) for SSF/A

  • Triceps skinfold (mm) for TSF/A

Give a quoted variable name as in (e.g.) "weight". Be careful with units (weight in kg; height, length, head circumference, and MUAC in cm, skinfolds in mm).

secondPart

Name of variable specifying:

  • Age (days) for H/A, HC/A, L/A, MUAC/A, SSF/A, or TSF/A

  • Height (cm) BMI/A or W/H

  • Length (cm) for W/L

Give a quoted variable name as in (e.g.) "age". Be careful with units (age in days; height and length in cm).

index

The index to be calculated and added to data. One of:

bfa

BMI for age

hca

Head circumference for age

hfa

Height for age

lfa

Length for age

mfa

MUAC for age

ssa

Sub-scapular skinfold for age

tsa

Triceps skinfold for age

wfa

Weight for age

wfh

Weight for height

wfl

Weight for length

Give a quoted index name as in (e.g.) "wfh".

standing

Variable specifying how stature was measured. If NULL then age (for "hfa" or "lfa") or height rules (for "wfh" or "wfl") will be applied. This must be coded as 1 = Standing; 2 = Supine; 3 = Unknown. All other values will be recoded to 3 = Unknown. Give a quoted variable name as in (e.g.) "measured" or a single value (e.g."measured = 1"). If no value (or NULL) is specified then height and age rules will be applied. zz

thirdPart

Name of variable specifying age (in days) for BMI/A. Give a quoted variable name as in (e.g.) "age". Be careful with units (age in days).

Value

A numeric value or vector of z-scores for the specified index.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
# Given a male child 10 months old with a weight of 5.7 kgs, height of 64.2
# cms, and MUAC of 125 mm:
#
# Calculate weight-for-height
getWGSR(sex = 1,
        firstPart = 5.7,
        secondPart = 64.2,
        index = "wfh",
        standing = 3)

# calculate weight-for-age
getWGSR(sex = 1,
        firstPart = 5.7,
        secondPart = 10,
        index = "wfa",
        standing = 3)

# calculate height-for-age
getWGSR(sex = 1,
        firstPart = 64.2,
        secondPart = 10,
        index = "hfa",
        standing = 3)

# Calculate MUAC-for-age z-score for a girl
getWGSR(sex = 1,
        firstPart = 20,
        secondPart = 62 * (365.25 / 12),
        index = "mfa")

zscorer documentation built on Oct. 30, 2019, 9:43 a.m.