The DHS Program User Forum
Discussions regarding The DHS Program data and results
Home » Topics » Nutrition and Anthropometry » igrowup Macro
Re: igrowup Macro [message #3291 is a reply to message #3267] Tue, 18 November 2014 13:21 Go to previous message
Trevor-DHS is currently offline  Trevor-DHS
Messages: 805
Registered: January 2013
Senior Member
Yes, we do use age in days in the calculations. Try replacing "rename hw1 agemons" with the following code:
*if working with the PR file:
replace hc16 = 15 if hc16 == 98 | hc16 == 99
gen agemons = (mdy(hc18,hc17,hc19) - mdy(hc30,hc16,hc31))/30.4375

or
*if working with the KR file
replace hw16 = 15 if hw16 == 98 | hw16 == 99
gen agemons = (mdy(hw18,hw17,hw19) - mdy(b1,hw16,b2))/30.4375

 
Read Message
Read Message
Read Message
Previous Topic: height and weight for Indonesia Round 6 and 5
Next Topic: BF
Goto Forum:
  


Current Time: Thu Jan 2 19:13:25 Coordinated Universal Time 2025