Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Computing BMI z-scores zanthro malfunction

    Hi All,

    I've used "zanthro" package to compute bmi z scores numerous times and I am using Stata 13. For some reason the command is skipping some of my observations despite those observations having complete data.
    Below is the code that I use and I checked some of the obeservations and they all appear to have all the necessary data for zanthro to compute z-scores.
    Is it possible that zanthro is not computing z-scores because the bmi variables are either too small or too large?

    For example: one of the observations had a really low BMI=11 which was equal to 0 percentile according to the CDC growth chart.
    Code:
    egen bmi_z_5= zanthro(bmi_5,ba,US), xvar (chd_agey_5) gender(chd_sex) gencode(m=1, f=2) ageunit(year)

  • #2
    I don't see any problem in the code. There may be low scores in distribution, but the values fall within the distribution of your data and have gone through the Box-Cox transformation thus provided the lambda,median and variance (LMS) parameters necessary to obtain the centile values to be compared with the CDC or British growth chart. If it is very low, yet falling in a centile should achieve a value of z-score. I would try first changing the storage type of the data to float or double to ensue they are not stored as byte or integers:

    Code:
     egen float bmi_z_5= zanthro(bmi_5,ba,US), xvar (chd_agey_5) gender(chd_sex) gencode(m=1, f=2) ageunit(year)
    Last edited by Roman Mostazir; 31 Jan 2015, 05:17.
    Roman

    Comment


    • #3
      Thank you Roman for your suggestion.
      Before I ran your code I checked the type of the variable and it was float, I ran your code anyway and nothing changed. FYI BMI percentiles were run in an pre-programed excel document that was found on the CDC's website. The 0 percentile for the observation mentioned above was drawn out from that document.
      I am starting to think that the calculation using zanthro is more accurate and that I should use the following code to compute percentiles after I compute the z-scores instead of using the pre programed excel document.
      Code:
      gen bmi_per_5=normal(bmi_z_5)*100
      Thanks again for your explanation.

      Comment


      • #4
        Hi Patrick, please note the forum etiquette about mentioning the source of the program. People who contribute here are from varied fields of sciences and may not be familiar to what you are talking about. Mentioning the source helps to pin point the problem and increase the chance for you to obtain a better solution.

        "zantrho" is a user written programme by Tim Cole, but i am not sure if the program is being updated here. I installed the program to replicate an example for you and got this error message:

        Code:
        file "zbmiageus.dta" not found
        This suggests the program does not contain the necessary data files associated with it. I am not sure which excel program you mention from CDC web site as you did not provide the link.

        I am starting to think that the calculation using zanthro is more accurate
        I disagree. Because the process involves transforming your data using BoxCox transformation and find a parameter (lambda) for the measure of skewness in the data and three parameters lambda, median and variance are altogether fit into the equation to find the appropriate `z' score that correspond to the reference data. The process should be same for the Excel base program and whatever is written for other platforms.

        You can download the LMS growth excel base program free and LMS chartmaker free and I think, if my memory doesn't betray, both will give you the centile values. Here is the link for the downloads: http://www.healthforallchildren.com/...shop/software/

        Best,
        Roman

        Comment


        • #5
          Hi Roman,


          The excel file that I mention from CDC is listed at the following link "Children Group BMI Calculator" http://www.cdc.gov/healthyweight/ass...r_schools.html
          Tim Cole has played a significant role in constructing the LMS parameters for the CDC Growth charts here is a link to a publication he is second author on http://www.cdc.gov/nchs/data/nhsr/nhsr063.pdf
          This is how I looked up zanthro package
          Code:
          findit zanthro
          Afterwards I downloaded the most recent package titled "SJ13-2 dm0004_1". "zbmiageus.dta" is listed as an ancillary file see below a screen shot. I assume you followed the same procedure but I can't understand why your version doesn't have it.
          As you mentioned Tim Cole is one the authors of zanthro and in their explanation of the package they include that it follows the LMS method. That was why I felt comfortable/ confident in using the package. I am looking at the link you shared to further make up my mind on this.

          Thank you for your insights.
          Patrick
          Click image for larger version

Name:	Screen Shot 2015-01-31 at 9.38.16 PM.png
Views:	1
Size:	14.0 KB
ID:	703256

          Comment


          • #6
            Hi Patrick,

            Try the code with the "nocutoff" option at the end. This should work and will provide 'z' score without any missing values.

            Code:
             
             egen bmi_z_5= zanthro(bmi_5,ba,US), xvar (chd_agey_5) gender(chd_sex) gencode(m=1, f=2) ageunit(year) nocutoff
            Roman

            Comment


            • #7
              Hi Roman,

              The "nocutoff" option worked thank you very much for your help I appreciate it.

              Patrick

              Comment


              • #8
                You are welcome. Just to update, the program drops calculating the 'z' score anything +/-4 SD. The `nocutoff' option removes that restriction.
                Roman

                Comment


                • #9
                  Hi Roman and Patrick,

                  This discussion has sorted me out on z-scores I was working on for wa for both pediatrics and adolescents. Thank you so much.

                  Maggie.

                  Comment


                  • #10
                    Thank you all!! I have learned a lot from your posts.
                    With Best Wishes,Hassen

                    Comment

                    Working...
                    X