I am trying to use the zanthro package to compute Z-scores for BMI on my data. I keep getting missing values, no matter what I do. I even tried to run the command by creating randomly generated observations, but continue to get missing values for the Z-scores. See below for my code and output. Any help would be appreciated.
Code:
set obs 100 gen age = float((18-8)*runiform()+5) gen sex = runiform()>.5 gen bmi = float((30-18)*runiform()+18) egen zbmius = zanthro(bmi,ba,US), xvar(age) gender(sex) gencode(male=1, female=0) ageunit(year) nocutoff (Z values can be missing because xvar is nonpositive or otherwise out of range for the chart code, or the gender variable is missing) (100 missing values generated) list in 1/10, noobs clean age sex bmi zbmius 10.79541 1 23.27344 . 6.556831 0 27.80624 . 7.794309 0 26.47512 . 10.63324 0 23.09287 . 8.573705 1 29.12665 . 6.488252 1 22.14978 . 14.19374 0 24.28196 . 6.270454 0 21.03813 . 6.600626 0 24.17842 . 12.7402 0 27.19227 .
Comment