`R/getWGS.R`

`getWGS.Rd`

Calculate z-scores for WHZ, HAZ, WAZ using the WHO Growth Reference (2006) for a single child data.

getWGS(sexObserved, firstPart, secondPart, index)

sexObserved | Sex of child (1 = Male; 2 = Female) |
---|---|

firstPart | Weight (in kg for WHZ and WAZ) or height (in cm for HAZ) |

secondPart | Age (in months for HAZ and WAZ) or height (in cm for WHZ) |

index | One of "wfh", "hfa", "wfa" (specifies the required index) |

z-score of the anthropometric index selected

The function fails messily when `secondPart`

is outside of the range
given in the WGS reference (i.e. 45 to 120 cm for height and 0 to 60 months
for age). It is up to you to check the ranges of your data.

The reference data for W/H assumes supine length is used for children with a standing height below 85cm

Heights should be specified in cm to the nearest mm (i.e. to 1 d.p.)

Ages should be specified in whole months

Weights should be specified in kg to available precision

The function requires reference data `wgsData`

included in this package

This is a legacy function from the first CRAN release of `zscorer`

which focused mainly on the calculation of z-scores for weight-for-age,
weight-for-height and height-for-age. This function has been kept in the
package to ensure that existing analysis workflows implemented using the
function continue to work.

# apply \code{getWGS()} to a make believe 52 month old male child with # weight of 14.6 kg and height of 98.0 cm waz <- getWGS(sexObserved = 1, # 1 = Male / 2 = Female firstPart = 14.6, # Weight in kilograms secondPart = 52, # Age in whole months index = "wfa") # Anthropometric index (weight-for-age)#> Warning: This function is now under deprecation. Please use getWGSR insteadwaz#> [1] -1.187651haz <- getWGS(sexObserved = 1, firstPart = 98, # Height in centimetres secondPart = 52, index = "hfa") # Anthropometric index (height-for-age)#> Warning: This function is now under deprecation. Please use getWGSR insteadhaz#> [1] -1.741175whz <- getWGS(sexObserved = 1, firstPart = 14.6, secondPart = 98, index = "wfh") # Anthropometric index (weight-for-height)#> Warning: This function is now under deprecation. Please use getWGSR insteadwhz#> [1] -0.1790878