The DHS Program User Forum
Discussions regarding The DHS Program data and results
Home » Countries » Ethiopia » Anthropometry_Ethiopia_2011DHS
Anthropometry_Ethiopia_2011DHS [message #16832] Thu, 07 March 2019 12:23 Go to next message
Bubbu is currently offline  Bubbu
Messages: 6
Registered: February 2018
Member
Hi all,

Please look at the following case and help me!
NB: I use mac book

I am working on anthropometric z scores using Ethiopia DHS 2011.

I have various data sets in "/Users/mes/Documents/ET_2011_DHS_messu/" directory. From the DHS data sets in this directory, I have one data set with variables: hv001, hv002, hvidx, gender, age_months, ageunit, weight, height, oedema, measure, sw, hv120 which are relevent to calculate anthropometry Z scores. The dataset is saved in "/Users/mes/Documents/WHO igrowup STATA/WHO igrowup workdata/ETH11_survey.dta"

I ran the following syntax as guided in WHO Anthro files (from https://www.who.int/childgrowth/software/en/) for STATA.

*THIS RUNS THE ANTHRO ADO FILE FROM WHO *

clear
set more 1
/* Higher memory might be necessary for larger datasets */
set memory 20m
set maxvar 10000


/* Example: survey_standard.do using survey.dta */



/* Indicate to the Stata compiler where the igrowup_standard.ado file is stored*/

adopath + "/Users/mes/Documents/WHO igrowup STATA/"


/* Load the data file */

use "/Users/mes/Documents/WHO igrowup STATA/WHO igrowup workdata/ETH11_survey.dta", clear


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

gen str60 reflib="/Users/mes/WHO igrowup STATA"
lab var reflib "Directory of reference tables"

gen str60 datalib="/Users/mes/Documents/WHO igrowup STATA/WHO igrowup workdata"
lab var datalib "Directory for datafiles"

gen str30 datalab="ETH11_survey"
lab var datalab "Working file"

/* check the variable for "sex" 1 = male, 2=female */
desc gender
tab gender


/* check the variable for "age" */
ren age_months agemons
desc agemons
summ agemons


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


/* check the variable for body "weight" which must be in kilograms*/
/* NOTE: if not available, please create as [gen weight=.]*/
desc weight
summ weight

/* check the variable for "height" which must be in centimeters*/
/* NOTE: if not available, please create as [gen height=.]*/
desc height
summ height


/* check the variable for "measure"*/
/* NOTE: if not available, please create as [gen str1 measure=" "]*/
desc measure
tab measure

/* check the variable for "headc" which must be in centimeters*/
/* NOTE: if not available, please create as [gen headc=.]*/
gen headc=.
desc head
summ head

/* check the variable for "armc" which must be in in centimeters*/
/* NOTE: if not available, please create as [gen armc=.]*/
gen muac=.
desc muac
summ muac

/* check the variable for "triskin" which must be in millimeters*/
/* NOTE: if not available, please create as [gen triskin=.]*/
gen triskin=.
desc tri
summ tri

/* check the variable for "subskin" which must be in millimeters*/
/* NOTE: if not available, please create as [gen subskin=.]*/
gen subskin=.
desc sub
summ sub

/* check the variable for "oedema"*/
/* NOTE: if not available, please create as [gen str1 oedema="n"]*/
desc oedema
tab oedema


/* check the variable for "sw" for the sampling weight*/
/* NOTE: if not available, please create as [gen sw=1]*/
desc sw
summ sw


/* Fill in the macro parameters to run the command */
igrowup_standard reflib datalib datalab gender agemons ageunit weight height measure head muac tri sub oedema sw




However, I got the following error message:

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

..............................................
file /Users/mes/igrowup_stata\weianthro.dta not found r(601);


end of do-file

r(601);>>

And I checked back that weianthro.dta exists in the directory: "/Users/mes/Documents/WHO igrowup STATA/". Yet I see the above error message.
Please help me get it right!


Best wishes!

[Updated on: Thu, 07 March 2019 16:04]

Report message to a moderator

Re: Anthropometry_Ethiopia_2011DHS [message #16943 is a reply to message #16832] Thu, 14 March 2019 08:57 Go to previous messageGo to next message
Bridgette-DHS is currently offline  Bridgette-DHS
Messages: 3172
Registered: February 2013
Senior Member

Following is a response from Senior DHS Stata Specialist, Tom Pullum:

The problem is probably that you do not have the right path to get to weianthro.dta. You have to set the path with the "cd" command (for the syntax, type "help cd"). If there are any spaces in the path name, it will not be read correctly; it's safest always to put the path name in quotes. Hope this works.
Re: Anthropometry_Ethiopia_2011DHS [message #17712 is a reply to message #16943] Thu, 09 May 2019 09:04 Go to previous message
Bubbu is currently offline  Bubbu
Messages: 6
Registered: February 2018
Member
Hi Bridgette,

I checked the paths several times and re-run the commands but that did not solve the problem. However, the same command worked when I did in windows operating machine. . As I use Stata/SE15.1 mac version, the problem might be from the iOS operating system which is not compatible with few software packages.

Thank you!


Best wishes!
Previous Topic: anemia among lactating mothers
Next Topic: matching data with the report
Goto Forum:
  


Current Time: Fri Oct 11 19:31:36 Coordinated Universal Time 2024