The DHS Program User Forum
Discussions regarding The DHS Program data and results
Home » Data » IPUMS Demographic and Health Surveys (IPUMS-DHS)  » Melogit and Weights
Re: Melogit and Weights [message #19635 is a reply to message #19634] Thu, 23 July 2020 10:50 Go to previous messageGo to previous message
Trevor-DHS is currently offline  Trevor-DHS
Messages: 776
Registered: January 2013
Senior Member
I suspect that the problem is that you do not have constant weights for each PSU. You can check this by summarizing the weight variable by the idhspsu - the minimum and the maximum should be identical in all cases. For example:
sort idhspsu
by idhspsu: summ weight
Be warned that the output is going to be very long, and you probably want to capture the output and process it to find if there are PSUs where the weight is not a constant.

An alternative way of doing the same is:
sort idhspsu
gen dif = 0
replace dif = 1 if idhspsu == idhspsu[_n-1] & weight != weight[_n-1]
browse if dif == 1
Any case where dif equals 1 indicates a PSU where the weight is not constant.
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Weights and Strata for Pooled Samples
Next Topic: Merging DHS with IPUMS-DHS to get harmonized districts
Goto Forum:
  


Current Time: Mon Feb 6 02:07:07 Coordinated Universal Time 2023