The anthro package allows you to perform comprehensive analysis of anthropometric survey data based on the method developed by the Department of Nutrition for Health and Development at the World Health Organization.

The package is modeled after the original R macros provided by WHO. In addition to z-scores, the package adds more accurate calculations of confidence intervals and standard errors around the prevalence estimates, taking into account complex sample designs, whenever is the case by using the survey package.

activate the packages

library(anthro)
library(readxl)
## Warning: package 'readxl' was built under R version 4.1.3
library(writexl)
## Warning: package 'writexl' was built under R version 4.1.3

import the database

lokasi <- "C:/Users/almo/Dropbox/portofolio/Antropometri"
dataa <- "data dummy"

for ensure the directory is right, set the directory with ‘setwd’ instruction

setwd(lokasi)

import the file

malming <- read_xlsx(paste(dataa,".xlsx",sep = ""))

inspect the row data

data.table::data.table(malming)
##     no sex age_in_year age_in_month height weight
##  1:  1   1   5.2500000           63     74     13
##  2:  2   1   2.3333333           28    100      5
##  3:  3   1   4.8333333           58     70      6
##  4:  4   2   5.6666667           68     75      7
##  5:  5   2   3.0000000           36     93     11
##  6:  6   2   0.9166667           11     87     14
##  7:  7   1   3.2500000           39     94     10
##  8:  8   2   1.8333333           22     73      5
##  9:  9   1   2.1666667           26     98     14
## 10: 10   1   4.7500000           57     83      6

create or recode sex variable

the sex variables in this package must set as “M” for males and “F” for female

malming$sex_new <- ifelse(malming$sex==1,"M","F")

calculate the anthropometry score for nutrition status

at this file, age is in a year format, so the “is_age_in_month” must be filled with “FALSE”. if your dataset have a age data with month format, “is_age_in_month” is equal TRUE

hasil <- anthro_zscores(sex = malming$sex_new,age =malming$age_in_month,
                        is_age_in_month = TRUE,weight = malming$weight,
                        lenhei = malming$height)

the result

data.table::data.table(hasil)
##     clenhei      cbmi cmeasure csex  zlen flen  zwei fwei   zwfl fwfl   zbmi
##  1:      74 23.739956     <NA>    1    NA   NA    NA   NA     NA   NA     NA
##  2:     100  5.000000     <NA>    1  2.91    0 -6.70    1 -10.37    1 -11.19
##  3:      70 12.244898     <NA>    1 -8.52    1 -6.73    1  -4.43    0  -2.69
##  4:      75 12.444444     <NA>    2    NA   NA    NA   NA     NA   NA     NA
##  5:      93 12.718233     <NA>    2 -0.54    0 -1.85    0  -2.28    0  -2.37
##  6:      87 18.496499     <NA>    2  5.64    0  3.80    0   1.93    0   1.28
##  7:      94 11.317338     <NA>    1 -1.04    0 -3.25    0  -4.13    0  -4.02
##  8:      73  9.382623     <NA>    2 -3.72    0 -5.97    0  -6.02    1  -5.89
##  9:      98 14.577259     <NA>    1  2.90    0  0.95    0  -0.70    0  -1.18
## 10:      83  8.709537     <NA>    1 -5.60    0 -6.71    1  -7.03    1  -6.45
##     fbmi zhc fhc zac fac zts fts zss fss
##  1:   NA  NA  NA  NA  NA  NA  NA  NA  NA
##  2:    1  NA  NA  NA  NA  NA  NA  NA  NA
##  3:    0  NA  NA  NA  NA  NA  NA  NA  NA
##  4:   NA  NA  NA  NA  NA  NA  NA  NA  NA
##  5:    0  NA  NA  NA  NA  NA  NA  NA  NA
##  6:    0  NA  NA  NA  NA  NA  NA  NA  NA
##  7:    0  NA  NA  NA  NA  NA  NA  NA  NA
##  8:    1  NA  NA  NA  NA  NA  NA  NA  NA
##  9:    0  NA  NA  NA  NA  NA  NA  NA  NA
## 10:    1  NA  NA  NA  NA  NA  NA  NA  NA

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:

  1. clenhei converted length/height for deriving z-score
  2. cbmi BMI value based on length/height given by clenhei
  3. zlen Length/Height-for-age z-score
  4. flen 1, if abs(zlen) > 6
  5. zwei Weight-for-age z-score
  6. fwei 1, if zwei < -6 or zwei > 5
  7. zwfl Weight-for-length/height z-score
  8. fwfl 1, if abs(zwfl) > 5
  9. zbmi BMI-for-age z-score
  10. fbmi 1, if abs(zbmi) > 5
  11. zhc Head circumference-for-age z-score
  12. fhc 1, if abs(zhc) > 5
  13. zac Arm circumference-for-age z-score
  14. fac 1, if abs(zac) > 5
  15. zts Triceps skinfold-for-age z-score
  16. fts 1, if abs(zts) > 5
  17. zss Subscapular skinfold-for-age z-score
  18. fss 1, if abs(zss) > 5

If not all parameter values have equal length, parameter values will be repeated to match the maximum length of all arguments except is_age_in_month using rep_len. This happens without warnings.

Z-scores are only computed for children younger than 60 months (age in months < 60)

Referensi

WHO Multicentre Growth Reference Study Group (2006). WHO Child Growth Standards: Length/height-for-age, weight-for-age, weight-for-length, weight-for-height and body mass index-for-age: Methods and development. Geneva: World Health Organization; pp 312. (web site: http://www.who.int/childgrowth/publications/en/ )

WHO Multicentre Growth Reference Study Group (2007). WHO Child Growth Standards: Head circumference-for-age, arm circumference-for-age, triceps skinfold-for-age and subscapular skinfold-for-age: Methods and development. Geneva: World Health Organization; pp 217. (web site: http://www.who.int/childgrowth/publications/en/ )