The DHS Program User Forum
Discussions regarding The DHS Program data and results
Home » Topics » Child Health » Age in months: Missing values
Re: Age in months: Missing values [message #6794 is a reply to message #6691] Fri, 17 July 2015 10:50 Go to previous messageGo to previous message
Liz-DHS
Messages: 1516
Registered: February 2013
Senior Member
Dear User,
Here is a response from one of our technical experts, Dr. Tom Pullum:
Quote:
You are apparently talking about age at immunization, rather than age. Age in months is given as hw1 for all surviving children age 0-4 years. The KR file includes children born in the past 5 years who died, as well as those who survived. If the child died (b5=0) then hw1 is missing and there is also no immunization data.

Age at immunization can only be calculated if we have the date of immunization, which requires a health card with a date. That's given as h7=1. If h7 has any other code, then h7d, h7m, and h7y will be missing and you cannot calculate date of immunization or age at immunization.

There are other children who are taken to be immunized because the mother said so, but for them, no date is recorded. If there were a date, it would not be reliable.

I will paste below some Stata lines for calculating age at immunization, in months, for those children with non-missing date.

set more off
tab1 h7*

gen h7d_rev=h7d
replace h7d_rev=. if h7d>31

gen h7m_rev=h7m
replace h7m_rev=. if h7m>12

gen h7y_rev=h7y
replace h7y_rev=. if h7y>v007

gen h7_mdy=mdy(h7m_rev,h7d_rev,h7y_rev)

gen dob_mdy=mdy(b1,hw16,b2)

* "exact" age in months; the average days in a month is 365.25.12 = 30.4375
gen h7_age_in_months=(h7_mdy-dob_mdy)/30.4375
summarize h7_age_in_months 

* completed age in months
gen h7_completed_age_in_months =int(h7_age_in_months)

summarize h7_age_in_months
tab h7_completed_age_in_months


[Updated on: Fri, 17 July 2015 14:46]

Report message to a moderator

 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Dominican Republic 2007 child immunization
Next Topic: Using svy: tab
Goto Forum:
  


Current Time: Sat Dec 21 22:50:18 Coordinated Universal Time 2024