The DHS Program User Forum
Discussions regarding The DHS Program data and results
Home » Countries » Other countries » Postnatal Care for Mothers (Is my calculation wrong?)
Re: Postnatal Care for Mothers [message #19235 is a reply to message #19010] Tue, 12 May 2020 11:57 Go to previous messageGo to previous message
Trevor-DHS is currently offline  Trevor-DHS
Messages: 803
Registered: January 2013
Senior Member
I think there are two issues:
1) In your code you are using:
IF (MIDX EQ 1 AND B19 LE 24) birth2 = 1.
but this should be LESS THAN (LT) 24
IF (MIDX EQ 1 AND B19 LT 24) birth2 = 1.
If I use this code and then tabulate birth2 (with weights on) I have 6616 cases of birth2 = 1, matching the report.
2) I think your further code is then dropping some other cases that should be kept, probably because on of the variables is still set to SYSMIS. I didn't try to work out where exactly the problem is.
 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Education of Young Men
Next Topic: Indonesia 2017 report
Goto Forum:
  


Current Time: Sat Nov 30 01:48:15 Coordinated Universal Time 2024