The DHS Program User Forum
Discussions regarding The DHS Program data and results
Home » Topics » Child Health » how to get the right case numbers in child recode, & then restrict further
how to get the right case numbers in child recode, & then restrict further [message #876] Sat, 26 October 2013 13:13 Go to next message
French Smith
Messages: 2
Registered: October 2013
Member
Dear DHS STATA crowd,

I wish to analyze the Demographic and Health Surveys (DHS) data on children under five.

I have set up my analysis as follows, using at Tanzania DHS 2010 as a starting point.

But I have two questions:
1. Why do I have 8,023 cases not the 8,081 that the report (the report and dataset are available at http://www.measuredhs.com/what-we-do/survey/survey-display-3 45.cfm) says exit?
2. How do I restrict the analysis to V465, which was a question asked only of respondents with a youngest child under five living with them?

Probably simple questions, sorry, but my STATA mind needs jogging!

Thanks!

French

set mem 450m

set matsize 800

use TZKR62DT/TZKR62FL.DTA

*v022 is sample stratum number
gen stratid = v022

*v021 is PSU
gen psu = v021

*v005 is sample weight
gen weight = v005/1000000

svyset psu [pw=weight], strata(stratid)

*Just to compare totals. Should get 8,081 for Tanzania DHS 2010 not 8,023!
tab stratid

*keep if complete response
keep if v015==1

*keep if child lives with respondent. But this command isn't recognized!
keep if B9==0
Re: how to get the right case numbers in child recode, & then restrict further [message #878 is a reply to message #876] Mon, 28 October 2013 09:15 Go to previous messageGo to next message
French Smith
Messages: 2
Registered: October 2013
Member
P.S. I expected 8,081 cases because page 14 of the report says there were 8,081 children aged 0-4.
Re: how to get the right case numbers in child recode, & then restrict further [message #958 is a reply to message #878] Tue, 03 December 2013 15:25 Go to previous message
Sarah B is currently offline  Sarah B
Messages: 23
Registered: June 2013
Member
Can you tell us which table you are looking at to get your denominator? Are you looking at children of interviewed mothers (that's who is in the KR file), or children living in households (which would be in the PR file)?

I just went back and realized you do specify the table in your earlier message. Table 2.3 is de jure children living in the household -- i.e., it is not restricted to children of interviewed mothers. To match the sample sizes here, you need to use the PR file and restrict to children under 5 who are usual residents. Given that you want children of interviewed mothers, though, you do want the KR file. For matching denominators (which is a great starting point), I suggest you use tables in chapters 10 and 11. Note that sample sizes are weighted.

By the way, the reason your command

keep if B9==0

doesn't work is that Stata is case-sensitive. It reads b9 and B9 as two different variables -- you need to use b9. This is different than SPSS, which considers b9 and B9 to be the same.

Happy Stata-ing!

[Updated on: Sun, 02 February 2014 20:19]

Report message to a moderator

Previous Topic: infant and young child feeding
Next Topic: Birth Interval-Data Missing
Goto Forum:
  


Current Time: Mon Dec 30 09:29:17 Coordinated Universal Time 2024