data(iotf)
## calculate z-scores by sex corresponding to IOTF cutoffs for thinness,
## overweight and obesity
co <- data.frame(cutoff = c(16, 17, 18.5, 25, 30),
grade = c('thinness 3', 'thinness 2', 'thinness 1',
'overweight', 'obesity'))
sexes <- c('boys', 'girls')
with(co,
cbind(co, lapply(setNames(sexes, sexes), function(x)
LMS2z(x = 18, y = cutoff, sex = x,
measure = 'bmi', ref = 'iotf'))))
Run the code above in your browser using DataLab