Announcement

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

  • Problem creating weight for age Z-scores using zanthro command

    Dear Statalist,

    This is my first time posting on here so apologies in advance for any mistakes.

    1. I am trying to create Z-scores for birth weight standardardised for gestational age in Stata version 14.0 using the UK 1990 data as my reference.
    I used 'findit zanthro' and clicked on the first link dm0004_1 installed the installation files and the ancillary files. The ancillary files were saved on the current drive while the installation files were saved in the local drive.

    I used the following command to generate Z-scores:

    egen zscoreUK= zanthro(bw_KG,wa,UK), xvar(gestage) gender(sex) gencode(male=1, female=2) ageunit(week) gestage(gestage) nocutoff

    bw_KG = birthweight in KG (it was originally in grammes, so I created a new variable in KG)
    wa= weight-for-age chart
    UK= for UK 1990 Growth Reference
    gesatge=gestational age in weeks

    The z-scores created were all negative, however my data for birth weight and gestational age are fairly normally distributed (they aren't massively skewed) which makes me think there is something wrong with my code or potentially which directory the files are saved in.

    I did then copy and paste the ancillary files into the local drive where the programme was installed, but this didn't make a difference to the result.

    2. I also don't understand what the gestage(gestage) part of the above command means? i.e. I ran the command without gestage(gestage) in it, and it gave me similar but non-identical set of results:

    egen zscoreUK2= zanthro(bw_KG,wa,UK), xvar(gestage) gender(sex) gencode(male=1, female=2) ageunit(week) nocutoff

    Many thanks in advance,
    Mona


  • #2
    Well, I haven't used -zanthro- in a while, so I'm not 100% certain of this. But:

    1. The xvar() option specifies what, along with gender, you want to standardize on. It should be either age (measured with 0 = date of birth) as of when the weight was measured (not gestational age), height, or length to get z-scores of weight for age, weight for height, or weight for length, respectively.

    2. The gestage() variable serves as an offset to age, so that if babies are born prematurely, their age is adjusted for that before standardization.

    Comment


    • #3
      Hi Clyde,

      Thank you very much. I have age measured in months at 2, 3 and 5 year follow ups. And the current exposure/outcome relationship I am looking at are for those variables measured at 5 years. Birthweight was taken from medical records (collected at first follow-up of 2 years).

      A little confused as to which age variable to standardise on. But I tried setting xvar as age2 or age5 in both months and weeks, but my results all remain extremely negative.

      Comment


      • #4
        Well, I don't know what else to tell you. When you say you tried setting xvar as age2 or age5 in both months and weeks, I don't understand what you are doing.

        -zanthro()- expects your data set to have, in each observation, a variable containing the subject's weight and another variable containing the subject's age when that weight was obtained. There shouldn't be multiple variables with multiple different ages. There needs to be a single age, and that must be the age when the weight was obtained. It sounds like you have some other kind of data organization that will need revision to become compatible with -zanthro-'s expectations. If you are not sure how to proceed, then I think your next post should include an example of your data set. Be sure to use the -dataex- command to show that example. (Run -ssc install dataex- to get the command; -help dataex- for the simple instructions for using it.)

        Comment

        Working...
        X