The DHS Program User Forum
Discussions regarding The DHS Program data and results
Home » Topics » Nutrition and Anthropometry » Can't get exact match between one regional calculation and reported stunting value (Stunting of children under 5)
Can't get exact match between one regional calculation and reported stunting value [message #18225] Thu, 17 October 2019 12:38 Go to next message
dhsLearner is currently offline  dhsLearner
Messages: 4
Registered: October 2019
Member
I am trying to calculate childhood (under 5) stunting rates by region in Senegal in 2012. For one region, I am getting a different result than what it is reported in the Senegal sumary report. Here is my R code:

#read in data
PR2012<-fread("..\\dhs\\dataForR\\continuousSurvey2012\\SNPR6DFL.csv ")

# Create a binary variable for children stunted
PR2012$stuntedUnderFive<-ifelse(PR2012$hc70< -200, 1, 0)
# Assign NA when z score is >9900 sd (NA) #9998 are don't know responses
PR2012$stuntedUnderFive<-ifelse(PR2012$hc70>9900|
PR2012$hc1> 59, NA, PR2012$stuntedUnderFive)

# Create weight variable
PR2012$wt<-PR2012$hv005/1000000

# Tabluate stunted by region
PR2012%>%
group_by(shzone)%>% #shzone is the four regions (north, east, south west)
summarize(meanStunting = weighted.mean(stuntedUnderFive,wt,na.rm = T))

Results:

1 centre 0.190
2 nord 0.168
3 ouest 0.145
4 sud 0.266

I calculate West (ouest) as 14.5%, but it is reported as 14.7% in the summary (https://dhsprogram.com/pubs/pdf/FR288/FR288eng.pdf).

Can anyone help me figure out what I am doing incorrectly?
Re: Can't get exact match between one regional calculation and reported stunting value [message #18226 is a reply to message #18225] Thu, 17 October 2019 14:16 Go to previous messageGo to next message
Trevor-DHS is currently offline  Trevor-DHS
Messages: 805
Registered: January 2013
Senior Member
Can you check your denominator? I suspect the problem is in the selection of children. You should be restricting to de facto children (hv103 == 1). Check the denominator first and then if you are still finding a problem, let us know.
Re: Can't get exact match between one regional calculation and reported stunting value [message #18227 is a reply to message #18226] Thu, 17 October 2019 14:25 Go to previous message
dhsLearner is currently offline  dhsLearner
Messages: 4
Registered: October 2019
Member
Thank you. This was the problem. Wow there are so many fine print notes and variables that go along with them. Definitely need to keep my eyes out for filters like this.

For future reference to other people looking at this forum post, I added hv103 (did child stay in house night before) to my code as follows:

PR2012$stuntedUnderFive<-ifelse(PR2012$hc70>9900|
PR2012$hc1> 59 | PR2012$hv103 =="no", NA, PR2012$stuntedUnderFive)
Previous Topic: Anthropometric data for children Turkey 2008 and 2013
Next Topic: 'Don't know' in exclusive breastfeeding
Goto Forum:
  


Current Time: Sat Dec 7 15:55:51 Coordinated Universal Time 2024