The DHS Program User Forum
Discussions regarding The DHS Program data and results
Home » Data » Weighting data » Sampling weights with value zero
Re: Sampling weights with value zero [message #30273 is a reply to message #30266] Fri, 25 October 2024 11:28 Go to previous messageGo to previous message
albena is currently offline  albena
Messages: 12
Registered: February 2015
Member


Thank you very much for the clarifications!

I would like to still go back to the Pakistan 2006/07 DHS as my question was on it, I was just not complete in my explanation why I indicated you that there are women with a sampling weight of zero. In fact, these zeros appear because of zeros in the hh member recode (PKPR53FL.dta). I merge the PR with the IR recode (PKIR53FL.dta) as the women data is based only on the ever-married women, but I also need the never married. When I do the merge between the PR and IR file, it works perfectly and I merge all 10,023 ever married women in the IR data. What I do is to assign the hv005 as a sampling weight for the never married women as they don't have a v005. This is how I got to the 55,000 women that have a value of zero for their sampling weight. So, I went back to check the hv005 in the PR data and what I saw is that 657,364 observations out of 727,493 have hv005 =0.

So, I was wondering why is this. I also checked in the report, but there seems to be no information on this. What I read though is that there was a long and a short household questionnaire, the long one was used to identify the eligible women, men and children (?). I thought that this could be the reason why I see these zeros as the PR file I am using might be not the one I need to use to merge with the IR data. Do you have more information on these two household questionnaires and if this could be the reason for the zeros I see in the hv005? In any case the reason should be different that the reason for the zeros in the 2017-18 data as there it was clear that two regions had to be excluded.

Thank you!

Albena



Here also my code for merging the PR and IR data:

use "dir/PKPR53FL.dta", clear

keep if hv104 ==2

keep if hv105 >=15 & hv105 <=49

// keep if hv103 ==1 // not considered for now

rename hv001 v001 
rename hv002 v002
rename hvidx v003

replace hv005 = hv005/1000000

sort v001 v002 v003

save "dir/PakistanPR2006.dta", replace


use "dir/PKIR53FL.dta", clear

keep v001 v002 v003 v005 v006 v007 v009 v010 v012 v014 v016 v024 v025 v135 v149 v190 v211 v503 v505 v507 v508 v509 v510 v511 b1_01 b2_01 
 
save "dir/PakistanIR2006.dta", replace


use "dir/PakistanPR2006.dta", clear

merge 1:1 v001 v002 v003 using "/PakistanIR2006"
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: Weighting and pooling multicountry datasets
Next Topic: weighting data in regression analysis
Goto Forum:
  


Current Time: Sat Nov 30 18:59:35 Coordinated Universal Time 2024