The DHS Program User Forum
Discussions regarding The DHS Program data and results
Home » Countries » Nepal » Weighted sample for recent birth
Weighted sample for recent birth [message #28801] Mon, 11 March 2024 03:50 Go to next message
swadeshgrg is currently offline  swadeshgrg
Messages: 2
Registered: July 2018
Location: Kathmandu
I was computing ANC visits for recent births (livebirth and still birth) using updated codes provided in GitHub for Nepal DHS 2022. However, I am getting 1951 as the total weighted population size (screenshot of the generated table attached) but it should be 1949 according to table 9.2 of the report. The total proportions are matching, though (for categories of number of ANC visits). Also, when I tabulate separately for livebirth and still birth, the weighted sample matches as well.
Could you please help and clarify this?

Thank you.
Re: Weighted sample for recent birth [message #28857 is a reply to message #28801] Tue, 19 March 2024 09:43 Go to previous message
Janet-DHS is currently offline  Janet-DHS
Messages: 685
Registered: April 2022
Senior Member
Following is a response from DHS staff member, Tom Pullum:

It's good that you raised this question, because it relates to other potential analyses of the pregnancy histories, not just table 9.2. The most recent birth is identified by bidx=1, and the most recent pregnancy is identified by pidx=1, but for table 9.2 you need the most recent birth or stillbirth. You need to construct another index, which I will call bsidx, which is limited to pregnancies that end in a birth or a stillbirth. I will paste below the lines that do this. They construct a new index that is based on births and stillbirths in the past two years and then select for that index equal to 1. This gives 1949 weighted cases, as in the table.

Actually the match is still not perfect, because I get 1932.37 live births and 16.64 stillbirths, which round to 1932 and 16, for the most recent birth/stillbirth, but table 9.2 gives 1933 and 16. However, I am willing to say that rounding error accounts for this discrepancy of about 1/6 of a case.

use "...NPNR82FL.DTA", clear
sort v001 v002 v003 pidx
egen bsidx=seq() if p32<=2 & p19<=23,by(v001 v002 v003)
tab m14 if bsidx==1 [iweight=v005/1000000]
tab p32 if bsidx==1 [iweight=v005/1000000]
Previous Topic: NEPAL DHS 2022 PR data
Next Topic: BMI
Goto Forum:

Current Time: Sat Apr 13 08:34:33 Coordinated Universal Time 2024