Announcement

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

  • WHO Anthro Macro files error message in calculating anthropometric z scores

    Dear All,

    I tried using WHO Anthro files (from https://www.who.int/childgrowth/software/en/) with STATA for calculating anthropometric z scores. It was working fine until the last command line after placing all the relevant variables. Then, I got the error message as below. I have checked that the file weianthro.dta file does exist. Yet, the error message says it cannot find weianthro.dta file. It would be of great help if you can help me. I wrote to WHO anthro team and they usually take long time to get back.

    //mac
    adopath + "/Volumes/NO NAME/WHO igrowup STATA"


    //mac
    use "/Volumes/NO NAME/WHO igrowup workdata/myownsurvey(08 FEB 2019).dta"

    /* generate the first three parameters reflib, datalib & datalab*/

    gen str80 reflib="/Volumes/NO NAME/WHO igrowup STATA"
    lab var reflib "Directory of reference tables"

    gen str80 datalib="/Volumes/NO NAME/WHO igrowup workdata"
    lab var datalib "Directory for datafiles"

    gen str60 datalab="mysurvey"
    lab var datalab "Working file"


    /* define your ageunit *//* or gen ageunit="days" */
    gen str6 ageunit="months"
    lab var ageunit "=months"


    igrowup_standard reflib datalib datalab gender agemons ageunit weight height measure head muac tri sub oedema sw

    Please wait, programme is running.............

    ..............................................
    file /Volumes/NO NAME/WHO igrowup STATA\weianthro.dta not found
    r(601);

    end of do-file

    r(601);










  • #2
    Hey Aye,

    Did you find any solution for this error? I am struggling with exactly the same thing. I would really appreciate your answer.

    Comment


    • #3
      Hi,

      The Who anthropometric team replied to me saying that their macros work better in PC/Window version of State. It would give that error message if I am running the commands out of MAC.

      Comment


      • #4
        I had this problem while working with the restricted program, it is because of the direction of the slashes in mac and windows. I'm listing the steps I followed to solve it. It is possible that not all of them are necessary:
        1. I altered the direction of the slashes in the reflib and datalib variables, so they would look like this in my case:

          gen str60 reflib="/Users/valeriarolle/Documents/who"
          lab var reflib "Directory of reference tables"

          gen str60 datalib="/Users/valeriarolle/Documents/who"
          lab var datalib "Directory for datafiles"
        2. I opened the ado file and searched for all "xxx" (the three x are literally in the script) and replaced that slash for a forward slash "/".
        3. Select all and run the do file to load the program.

        I hope this can help someone!

        bw

        Comment

        Working...
        X